当前位置:   article > 正文

Centos hydra安装_centos安装hydra

centos安装hydra

工具

1.nmap

2.cmake

3.hydra

4.SecLists

安装

[root@144 /]# 安装必要的组件
[root@144 /]# yum -y install gcc libssh-devel openssl-devel

Running transaction
  Installing : libssh-0.7.1-7.el7.x86_64                                                                                                         1/3 
  Installing : cmake-2.8.12.2-2.el7.x86_64                                                                                                       2/3 
  Installing : libssh-devel-0.7.1-7.el7.x86_64                                                                                                   3/3 
  Verifying  : libssh-devel-0.7.1-7.el7.x86_64                                                                                                   1/3 
  Verifying  : cmake-2.8.12.2-2.el7.x86_64                                                                                                       2/3 
  Verifying  : libssh-0.7.1-7.el7.x86_64                                                                                                         3/3 
Complete!

[root@144 /]# 安装 hydra
[root@144 /]# wget https://github.com/vanhauser-thc/thc-hydra/archive/master.zip
[root@144 /]# unzip master.zip 
[root@144 /]# cd thc-hydra-master
[root@144 /]# ./configure
[root@144 /]# make && make install

[root@144 /]# 安装 nmap
[root@144 /]# yum install nmap
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

演示案例

hydra ssh登录vps主机

[root@144 /]# hydra -l root -p xxxxxx -s 28977 xxx.xx.xxx.xxx ssh
Hydra v9.0 (c) 2019 by van Hauser/THC - Please do not use in military or secret service organizations, or for illegal purposes.

Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2019-07-24 23:31:33
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[WARNING] Restorefile (you have 10 seconds to abort... (use option -I to skip waiting)) from a previous session found, to prevent overwriting, ./hydra.restore
[DATA] max 1 task per 1 server, overall 1 task, 1 login try (l:1/p:1), ~1 try per task
[DATA] attacking ssh://xxx.xx.xxx.xxx :28977/

[28977][ssh] host: xxx.xx.xxx.xxx login: root password: xxxxxx
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

注意问题

  • 不建议新手编译安装hydra,因为ssh功能,依赖libssh,libssh又需要cmake 3以上版本,而cmake 又要求至少g++ 11。
  • 如果真的编译安装hydra,出现[ERROR] Compiled without LIBSSH v0.4.x support, module is not available!,表示缺少libssh模块。
[root@144 hacker]# wget https://www.libssh.org/files/0.9/libssh-0.9.0.tar.xz
[root@144 hacker]# tar xf libssh-0.9.0.tar.xz 
[root@144 hacker]# cd libssh-0.9.0
[root@144 libssh-0.9.0]# mkdir build
[root@144 libssh-0.9.0]# cd build/

[root@144 build]# ..表示上级目录,cmake需要上级目录的CMakeLists.txt
[root@144 build]# cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_SSH1=ON ..

-bash: cmake: command not found

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 缺少或cmake版本过低
[root@144 hacker]# wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz
[root@144 hacker]# tar zxvf cmake-3.12.3.tar.gz
[root@144 hacker]# cd cmake-3.12.3
[root@144 cmake-3.12.3]# ./bootstrap --prefix=/usr/local

Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
The C++ flags are "".
They can be changed using the environment variable CXXFLAGS.
See cmake_bootstrap.log for compilers attempted.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 缺少g++
[root@144 hacker]# yum install g++
  • 1
  • 搞了一大圈,执行命令[hydra -l root -p xxxxxx xxx.xx.xxx.xxx ssh],依然[ERROR] Compiled without LIBSSH v0.4.x support, module is not available!
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/130769
推荐阅读
相关标签
  

闽ICP备14008679号