vanhauser-thc / thc-hydra

hydra
GNU Affero General Public License v3.0
9.78k stars 2.04k forks source link

centos7 install error, Please help。 #858

Closed zhangketong closed 1 year ago

zhangketong commented 1 year ago

Install Hydra 9.5 on CentOS 7: (1) Install required libraries Execute the following command with root permission and network connection. yum install epel-release yum groupinstall "Development Tools" yum install cmake gcc zlib openssl-devel libssh-devel unzip zip freerdp libidn-devel pcre-devel gtk2-devel mysql-devel postgresql-devel subversion-devel firebird-devel libmemcached-devel libgpg-error-devel libgcrypt-devel (2) Install libssh Execute the following command with root permission and network connection. wget http://www.libssh.org/files/0.7/libssh-0.7.7.tar.xz tar xf libssh-0.7.7.tar.xz chmod 755 -R libssh-0.7.7 cd libssh-0.7.7 mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_SSH1=ON .. make make install (3) Install Oracle Instant Client yum-config-manager --add-repo https://yum.oracle.com/public-yum-ol7.repo curl https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -o /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle yum install oracle-instantclient-sqlplus.x86_64 (4) Install cx_Oracle

yum install python-pip Install cx_Oracle with pip: pip install cx_Oracle==7.3.0 pip install --upgrade pip Verify the installation of cx_Oracle Run the following command to verify whether cx_Oracle is installed successfully: python -c "import cx_Oracle; print(cx_Oracle.version)" If the version number 7.3.0 is output, it indicates that cx_Oracle is installed successfully. (5) Install Hydra yum install gcc yum install unzip yum install firebird netatalk yum install gtk+ ncurses-devel yum install libz* wget https://github.com/vanhauser-thc/thc-hydra/archive/master.zip unzip master.zip chmod 755 -R thc-hydra-master cd thc-hydra-master/ ./configure make

During the 'make' process, an error occurred and the following information was reported:

[root@localhost thc-hydra-master]# ./configure

Starting hydra auto configuration ... Detected 64 Bit Linux OS Checking for zlib (libz/zlib.h) ... ... found Checking for openssl (libssl/libcrypto/ssl.h/sha.h) ... ... found Checking for gcrypt (libgcrypt/gpg-error.h) ... ... found Checking for idn (libidn) ... ... found Checking for curses (libcurses/term.h) ... ... found, color output enabled Checking for pcre2 (libpcre/pcre.h) ... ... NOT found, server response checks will be less reliable Checking for Postgres (libpq/libpq-fe.h) ... ... found Checking for SVN (libsvn_client-1/libapr-1/libaprutil-1) ... ... found Checking for firebird (libfbclient) ... ... found Checking for MYSQL client (libmysqlclient/math.h) ... ... found Checking for AFP (libafpclient) ... ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway Checking for NCP (libncp/nwcalls.h) ... ... NOT found, module NCP disabled Checking for SAP/R3 (librfc/saprfc.h) ... ... NOT found, module sapr3 disabled Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp Checking for libssh (libssh/libssh.h) ... ... found Checking for Oracle (libocci/libclntsh/oci.h/libaio/liboci) ... ... NOT found, module Oracle disabled Get basic and sdk package from http://www.oracle.com/technetwork/database/features/instant-client/index.html Checking for Memcached (libmemcached/memcached.h) ... ... found Checking for Freerdp3 (libfreerdp3/freerdp.h/libwinpr3/winpr.h) ... ... NOT found, checking for freerdp2 module next... Checking for Freerdp2 (libfreerdp2/freerdp.h/libwinpr2/winpr.h) ... ... found Checking for Mongodb (libmongoc-1.0/mongoc.h/libbson-1.0/bson.h) ... ... NOT found, module mongodb disabled Checking for smbclient (libsmbclient/libsmbclient.h) ... ... NOT found, module smb2 disabled Checking for GUI req's (pkg-config/gtk+-2.0) ... ... found Checking for Android specialities ... ... strrchr() found ... RSA_generate_key() found Checking for secure compile option support in gcc ... Compiling... yes Linking... yes Checking for --allow-multiple-definition linker option ... yes

Hydra will be installed into .../bin of: /usr/local (change this by running ./configure --prefix=path)

Writing Makefile.in ... now type "make" [root@localhost thc-hydra-master]# make cc -I. -O3 -g -fcommon -pie -fPIE -fstack-protector-all --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -Wl,--allow-multiple-definition -g -D_GNU_SOURCE -c hydra-rdp.c -DHAVE_MYSQL_MYSQL_H -DLIBOPENSSL -DLIBNCURSES -DLIBFIREBIRD -DLIBIDN -DHAVE_PR29_H -DLIBMYSQLCLIENT -DLIBPOSTGRES -DLIBSVN -DLIBSSH -DHAVE_ZLIB -DHAVE_GCRYPT -DLIBMCACHED -DLIBFREERDP -DLIBWINPR2 -DHAVE_MATH_H -DHAVE_SYS_PARAM_H -I/usr/include/mysql -I/usr/include/ncurses -I/usr/include/firebird -I/usr/include -I/usr/include -I/usr/include -I/usr/include/subversion-1 -I/usr/include/apr-1 -I/usr/include/subversion-1 -I/usr/include/libmemcached -I/usr/include/freerdp2 -I/usr/include/winpr2 hydra-rdp.c: In function 'rdp_connect': hydra-rdp.c:35:21: error: 'rdpSettings' has no member named 'TcpConnectTimeout' instance->settings->TcpConnectTimeout = hydra_options.waittime * 1000; ^ make: *** [hydra-rdp.o] Error 1

vanhauser-thc commented 1 year ago

I have never used centos so no clue if 7.1 is a recent release or an ancient one. the librdp installed is version 2, my guess is the version is too old. either you update librdp (e.g. downloading and compiling yourself from their main repository) or remove that single line 35 in hydra-rdp.c

zhangketong commented 1 year ago

thank you! After multiple installation tests, I have successfully installed Hydra 9.4 on CentOS 7. However, it still cannot detect weak passwords for RDP. You mentioned trying to install FreeRDP 3. Where can I download FreeRDP 3? I couldn't find it through my search.