SSH 漏洞扫描器是一个 Python 脚本,使用 Nmap 扫描域名列表以查找存在漏洞的 SSH 版本。它会检查多个端口的 SSH 服务,并识别已知存在安全漏洞的版本。
nmap 库(python3-nmap)termcolor 库(termcolor)克隆仓库:
git clone https://github.com/thegenetic/CVE-2024-6387-exploit.git
cd CVE-2024-6387-exploit
安装依赖:
pip install -r requirements.txt
domains.txt),每行一个域名。python CVE-2024-6387.py domains.txt
-Pn:将所有主机视为在线(跳过主机发现)。-sV:探测开放端口以确定服务/版本信息。-p-:扫描全部 65535 个端口。--script ssh2-enum-algos,ssh-auth-methods,ssh-hostkey,ssh-run,sshv1:使用 SSH 专用脚本以获取更详细的信息。$ python CVE-2024-6387.py domains.txt
Scanning example.com (93.184.216.34)...
[example.com] SSH version detected on port 22: SSH-2.0-OpenSSH_8.8p1
[example.com] SSH version detected on port 2222: SSH-2.0-OpenSSH_8.6p1
...
Scan Results:
example.com (22): SSH-2.0-OpenSSH_8.8p1
example.com (2222): SSH-2.0-OpenSSH_8.6p1
example.com (none): No SSH version detected on open ports
...
$ cat domains.txt
example.com
...