此 Python 脚本通过分析网络数据包中的填充数据,帮助检测目标主机上的 Etherleak (CVE-2003-0001) 漏洞。该脚本使用 Scapy 发送各种类型的请求(ICMP、ARP 或 TCP),并检查响应中是否包含可能泄漏敏感内存内容的填充数据。
Etherleak 是一种网络驱动程序使用残留内存错误地填充以太网帧的漏洞。攻击者可以通过发送特定请求(ICMP、ARP 或 TCP)并分析响应数据包,来检查它们是否泄漏了系统内存中的敏感数据。
pip install scapy
该脚本支持三种探测目标主机的协议:ARP、ICMP 或 TCP。 如果使用 TCP,你可以指定端口,默认端口为 445(通常用于 SMB)。
命令行用法
sudo python etherleak_checker.py <target_ip> <arp|icmp|tcp> <count> [tcp_port]
<target_ip>: The IP address of the target host.
<arp|icmp|tcp>: The type of request to send (ARP, ICMP, or TCP).
<count>: The number of packets to send and analyze.
[tcp_port]: (Optional) The TCP port to target if using tcp (default: 445).
sudo python etherleak_checker.py 192.168.1.1 icmp 10
这将向目标 IP 192.168.1.1 发送 10 个 ICMP 回显请求(ping),并分析响应中的填充数据。
sudo python etherleak_checker.py 192.168.1.1 arp 10
这将向目标 IP 192.168.1.1 发送 10 个 ARP 请求,并分析 ARP 响应中的填充数据。
sudo python etherleak_checker.py 192.168.1.1 tcp 10
这将向目标 IP 192.168.1.1 的 445 端口(SMB)发送 10 个 TCP SYN 数据包,并分析 TCP 响应中的填充数据。
sudo python etherleak_checker.py 192.168.1.1 tcp 10 80
这将向目标 IP 192.168.1.1 的 80 端口发送 10 个 TCP SYN 数据包,并分析响应中的填充数据。
[ Targeting 192.168.1.1 using ICMP for 10 requests... ]
Padding captured: 00 00 00 01 02 03 ...
Padding captured: 00 00 00 01 02 03 ...
...
Variation in padding data detected across packets, indicating a potential Etherleak vulnerability.
Padding analysis complete.
此脚本仅用于教育目的,以及在受控环境中测试你自己的系统。未经许可对系统使用此脚本既违法也不道德。在对任何系统运行测试之前,请务必确保你已获得适当的授权。