
Advanced scanner for CVE-2020-0796 - SMBv3 RCE
针对 CVE-2020-0796 - SMBv3 RCE 的高级扫描器,使用 ollypwn 的检测技术(SMBGhost)。
它可以使用 masscan 扫描整个互联网,也可以扫描单个 IP。
它可以利用 Shodan(需要 API 密钥)获取更多目标信息,并将结果写入 JSON 文件。
否则,它会在控制台输出存在漏洞的 IP。
安装 python3 和 pip:
sudo apt install python3 python3-pip
安装 masscan:
sudo apt-get install git gcc make libpcap-dev
git clone https://github.com/robertdavidgraham/masscan
cd masscan
make
cp bin/masscan /usr/bin/.
安装过程已在 Debian bullseye/sid x86_64(2020 年 3 月)上测试通过。
git clone https://github.com/x1n5h3n/SMBGhost.git
cd SMBGhost
安装必要的 Python 包:
pip3 install -r requirements.txt
将你的 Shodan API 密钥设置到变量 SHODAN_API_KEY 中。
显示帮助:
python3 scanner.py -h
扫描整个互联网并将结果写入 JSON 文件(通过查询 Shodan 获取更多信息):
python3 scanner.py -t 0.0.0.0/0 -o results.json
扫描单个 IP,不指定结果文件名(默认为 smbghost.json):
python3 scanner.py -t 8.8.8.8
使用文件作为输入:
python3 scanner.py -f targets.txt
扫描整个互联网:
python3 scanner.py -t 0.0.0.0/0
扫描单个 IP:
python3 scanner.py -t 8.8.8.8
使用文件作为输入:
python3 scanner.py -f targets.txt
本项目采用 GPLv3 许可证 - 详见 LICENSE 文件。