官方网站:http://www.openwall.com/john/

下载:wget http://www.openwall.com/john/j/john-1.8.0.tar.gz

解压:tar -xvf john-1.8.0.tar.gz

进入src目录:

cd john-1.8.0 && cd src

  1. root@ubuntu:/usr/local/john/john-1.8.0/src# make
  2. To build John the Ripper, type:
  3. make clean SYSTEM
  4. where SYSTEM can be one of the following:
  5. linux-x86-64-avx         Linux, x86-64 with AVX (2011+ Intel CPUs)
  6. linux-x86-64-xop         Linux, x86-64 with AVX and XOP (2011+ AMD CPUs)
  7. linux-x86-64             Linux, x86-64 with SSE2 (most common)
  8. linux-x86-avx            Linux, x86 32-bit with AVX (2011+ Intel CPUs)
  9. linux-x86-xop            Linux, x86 32-bit with AVX and XOP (2011+ AMD CPUs)
  10. linux-x86-sse2           Linux, x86 32-bit with SSE2 (most common, if 32-bit)
  11. linux-x86-mmx            Linux, x86 32-bit with MMX (for old computers)
  12. linux-x86-any            Linux, x86 32-bit (for truly ancient computers)
  13. linux-alpha              Linux, Alpha
  14. linux-sparc              Linux, SPARC 32-bit
  15. linux-ppc32-altivec      Linux, PowerPC w/AltiVec (best)
  16. linux-ppc32              Linux, PowerPC 32-bit
  17. linux-ppc64              Linux, PowerPC 64-bit
  18. linux-ia64               Linux, IA-64
  19. freebsd-x86-64           FreeBSD, x86-64 with SSE2 (best)
  20. freebsd-x86-sse2         FreeBSD, x86 with SSE2 (best if 32-bit)
  21. freebsd-x86-mmx          FreeBSD, x86 with MMX
  22. freebsd-x86-any          FreeBSD, x86
  23. freebsd-alpha            FreeBSD, Alpha
  24. openbsd-x86-64           OpenBSD, x86-64 with SSE2 (best)
  25. openbsd-x86-sse2         OpenBSD, x86 with SSE2 (best if 32-bit)
  26. openbsd-x86-mmx          OpenBSD, x86 with MMX
  27. openbsd-x86-any          OpenBSD, x86
  28. openbsd-alpha            OpenBSD, Alpha
  29. openbsd-sparc64          OpenBSD, SPARC 64-bit (best)
  30. openbsd-sparc            OpenBSD, SPARC 32-bit
  31. openbsd-ppc32            OpenBSD, PowerPC 32-bit
  32. openbsd-ppc64            OpenBSD, PowerPC 64-bit
  33. openbsd-pa-risc          OpenBSD, PA-RISC
  34. openbsd-vax              OpenBSD, VAX
  35. netbsd-sparc64           NetBSD, SPARC 64-bit
  36. netbsd-vax               NetBSD, VAX
  37. solaris-sparc64-cc       Solaris, SPARC V9 64-bit, cc (best)
  38. solaris-sparc64-gcc      Solaris, SPARC V9 64-bit, gcc
  39. solaris-sparcv9-cc       Solaris, SPARC V9 32-bit, cc
  40. solaris-sparcv8-cc       Solaris, SPARC V8 32-bit, cc
  41. solaris-sparc-gcc        Solaris, SPARC 32-bit, gcc
  42. solaris-x86-64-cc        Solaris, x86-64 with SSE2, cc (best)
  43. solaris-x86-64-gcc       Solaris, x86-64 with SSE2, gcc
  44. solaris-x86-sse2-cc      Solaris 9 4/04+, x86 with SSE2, cc
  45. solaris-x86-sse2-gcc     Solaris 9 4/04+, x86 with SSE2, gcc
  46. solaris-x86-mmx-cc       Solaris, x86 with MMX, cc
  47. solaris-x86-mmx-gcc      Solaris, x86 with MMX, gcc
  48. solaris-x86-any-cc       Solaris, x86, cc
  49. solaris-x86-any-gcc      Solaris, x86, gcc
  50. sco-x86-any-gcc          SCO, x86, gcc
  51. sco-x86-any-cc           SCO, x86, cc
  52. tru64-alpha              Tru64 (Digital UNIX, OSF/1), Alpha
  53. aix-ppc32                AIX, PowerPC 32-bit
  54. macosx-x86-64            Mac OS X 10.5+, Xcode 3.0+, x86-64 with SSE2 (best)
  55. macosx-x86-sse2          Mac OS X, x86 with SSE2
  56. macosx-ppc32-altivec     Mac OS X, PowerPC w/AltiVec (best)
  57. macosx-ppc32             Mac OS X, PowerPC 32-bit
  58. macosx-ppc64             Mac OS X 10.4+, PowerPC 64-bit
  59. macosx-universal         Mac OS X, Universal Binary (x86 + x86-64 + PPC)
  60. hpux-pa-risc-gcc         HP-UX, PA-RISC, gcc
  61. hpux-pa-risc-cc          HP-UX, PA-RISC, ANSI cc
  62. irix-mips64-r10k         IRIX, MIPS 64-bit (R10K) (best)
  63. irix-mips64              IRIX, MIPS 64-bit
  64. irix-mips32              IRIX, MIPS 32-bit
  65. dos-djgpp-x86-mmx        DOS, DJGPP, x86 with MMX
  66. dos-djgpp-x86-any        DOS, DJGPP, x86
  67. win32-cygwin-x86-sse2    Win32, Cygwin, x86 with SSE2 (best)
  68. win32-cygwin-x86-mmx     Win32, Cygwin, x86 with MMX
  69. win32-cygwin-x86-any     Win32, Cygwin, x86
  70. beos-x86-sse2            BeOS, x86 with SSE2 (best)
  71. beos-x86-mmx             BeOS, x86 with MMX
  72. beos-x86-any             BeOS, x86
  73. generic                  Any other Unix-like system with gcc
  74. root@ubuntu:/usr/local/john/john-1.8.0/src#

根据自己系统版本选择。

make clean linux-x86-64

编译成功会在run目录下生成john可执行文件。

把想破解的/etc/shadow放在shadow.txt文件夹下:

执行:./john shadow.txt

但凡是暴力破解密码,都需要一个足够强悍的密码字典。

John the Ripper的默认密码字典为run目录下的password.lst。

而密码字典的构造就看自己收集信息的能力了。

hydra爆破ssh

这款暴力密码破解工具相当强大,支持几乎所有协议的在线密码破解,其密码能否被破解关键在于字典是否足够强大。对于社会工程型渗透来说,有时能够得到事半功倍的效果。本文仅从安全角度去探讨测试,使用本文内容去做破坏者,与本人无关。

一、简介

hydra是著名黑客组织thc的一款开源的暴力密码破解工具,可以在线破解多种密码。官网: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-PROXYHTTPS-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下载地址:http://www.thc.org/releases/hydra-7.3.tar.gz

# tar zxvf hydra-7.0-src.tar.gz
# cd hydra-7.0-src
# ./configure
# make
# make install

hydra支持GUI图形界面,不过习惯还是命令好用。

三、参数说明

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 可选项

四、各种用法实例

简单演示:

破解成功,直接显示结果,上图画红线的地方就是破解出来的密码,也可以通过参数-o输出到文件里。如果字典够强大,结合社工,密码不用很久就出来。

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^:<title>wrong username or password</title>"

(参数说明:-t同时线程数3,-l用户名是admin,字典pass.txt,保存为out.txt,-f 当破解了一个密码就停止, 10.36.16.18目标ip,http-post-form表示破解是采用http的post方式提交的表单密码破解,<title>中的内容是表示错误猜解的返回信息提示。)

5、破解https:

hydra -m /index.php -l muts -P pass.txt 10.36.16.18 https

6、破解teamspeak:

hydra -l 用户名 -P 密码字典 -s 端口号 -vV ip teamspeak

7、破解cisco:

hydra -P pass.txt 10.36.16.18 cisco
hydra -m cloud -P pass.txt 10.36.16.18 cisco-enable

8、破解smb:

hydra -l administrator -P pass.txt 10.36.16.18 smb

9、破解pop3:

hydra -l muts -P pass.txt my.pop3.mail pop3

10、破解rdp:

hydra ip rdp -l administrator -P pass.txt -V

11、破解http-proxy:

hydra -l admin -P pass.txt http-proxy://10.36.16.18

12、破解imap:

hydra -L user.txt -p secret 10.36.16.18 imap PLAIN
hydra -C defaults.txt -6 imap://[fe80::2c:31ff:fe12:ac11]:143/PLAIN

爆破root密码hash John the Ripper和hydra爆破ssh密码的更多相关文章

  1. 利用 John the Ripper 破解用户登录密码

    一.什么是 John the Ripper ? 看到这个标题,想必大家都很好奇,John the Ripper 是个什么东西呢?如果直译其名字的话就是: John 的撕裂者(工具). 相比大家都会觉得 ...

  2. John the Ripper破解密码

    目录 John the Ripper 破解Linux系统密码 破解Windows系统密码 John the Ripper John the Ripper是一个快速的密码破解工具,用于在已知密文的情况下 ...

  3. [原创]内网SSH密码爆破工具sshcrack(配合Cscan批量弱口令检测)

    0x000 前言 sshcrack是一个命令行下的SSH密码爆破工具,适用于内渗中SSH密码检测 当然也可用于外网SSH密码爆破,支持Windows/Linux,其它系统未测.Tip1 0x001 目 ...

  4. 如何破解密码的哈希值,破解双MD5密码值

    这是关于我如何破解密码的哈希值1亿2200万* John the Ripper和oclHashcat-plus故事. 这是几个月前,当我看到一条推特:从korelogic约含共1亿4600万个密码的密 ...

  5. 关闭ssh密码登录

    我们经常使用SSH登录管理服务器,在享受便利的同时也会遇到一些安全隐患,最常见的就是SSH密码被暴力破解.如果我们将SSH密码设置的过于复杂,又不容易记,因此限制SSH登录方式,只能使用key登录是一 ...

  6. 使用BurpSuite和Hydra爆破相关的服务(9.25 第十一天)

    使用BP和Hydra爆破相关的服务 Hydra:九头蛇,开源的功能强大的爆破工具,支持的服务有很多,使用Hydra爆破C/S架构的服务. 使用BurpSuite爆破web服务 DVWA:web应用程序 ...

  7. 密码破解工具John the Ripper使用说明

    John the Ripper John 包描述 John the Ripper 既功能丰富又运行快速. 它在一个程序中结合了几种破解模式,并且可以根据您的特定需求进行全面地配置(你甚至可以使用支持C ...

  8. 使用John the ripper工具来尝试破解Linux密码

    这篇文章主要介绍了使用John the ripper工具来尝试破解Linux密码的方法,这款工具可能主要被用来破解系统用户的密码以获得文件操作权限,需要的朋友可以参考下 John有别于Hdra之类的工 ...

  9. John the Ripper快速密码破解工具简单使用

    在某场比赛中师傅们说需要用到该工具,学习之 题目给了我们一个流量包,分析 发现 .hint.php.swp文件 该文件是使用 vim 编辑文件时异常退出而产生的,可以通过 vim -r 文件名 进行相 ...

随机推荐

  1. 三、K3 Cloud 开发插件《K3 Cloud插件开发新手指导 + K3 Cloud插件开发代码调试》

    案例需求:在销售订单上新增一个按钮,在订单明细中新增一个字段,命名[即时库存]. 点击按钮,弹出“Hello World!”,并获取订单明细物料的即时库存,填入字段[即时库存]. 开发工具:Visua ...

  2. 【zheng环境准备】安装redis

    1.下载源码,解压缩后编译源码 wget http://download.redis.io/release/redis-2.8.3.tar.gz tar -xzf redis-.tar.gz cd r ...

  3. ssh登录慢解决办法

    这两天ssh登录局域网的一台服务器非常慢,严重影响工作效率,怎么办?查了一下网上的解决办法,总结一下: 使用命令ssh -v xxx@x.x.x.x 可以看到debug信息,找到问题出在哪: debu ...

  4. 带分数|2013年蓝桥杯B组题解析第九题-fishers

    带分数 100 可以表示为带分数的形式:100 = 3 + 69258 / 714 还可以表示为:100 = 82 + 3546 / 197 注意特征:带分数中,数字1~9分别出现且只出现一次(不包含 ...

  5. span 英文数字保持一行,中文自动换行

    html 中 span 换行规则如下: span不换行默认只针对英文有效 如果想对中文设置有效需要添加样式 style="white-space:nowrap;" 默认的情况是这样 ...

  6. 洛谷P1605 迷宫【dfs】

    题目背景 迷宫 [问题描述] 给定一个N*M方格的迷宫,迷宫里有T处障碍,障碍处不可通过.给定起点坐标和 终点坐标,问: 每个方格最多经过1次,有多少种从起点坐标到终点坐标的方案.在迷宫 中移动有上下 ...

  7. 挖矿程序的工作原理(BTC为例)

    Mining时代进化:CPU挖矿 -> GPU挖矿 -> FPGA挖矿 -> ASIC挖矿CPU挖矿时代:SENGENERATEGPU挖矿时代:GETWORK Miner:挖矿的程序 ...

  8. algebraically closed field 代数闭域

     algebraically closed field https://en.wikipedia.org/wiki/Algebraically_closed_field As an example, ...

  9. [模式匹配] AC 自动机 模式匹配

    广义的模式匹配: https://en.wikipedia.org/wiki/Pattern_matching 字符串模式匹配: https://en.wikipedia.org/wiki/Strin ...

  10. 主备归档不一致导致的RMAN-08137无法清理归档解决方案

    值班夜里接到归档目录满的告警,执行删除脚本发现报错 RMAN-08137: WARNING: archived log not deleted, needed for standby or upstr ...