CVE-2024-6387
漏洞描述
OpenSSH是一套基于安全外壳(SSH)协议的安全网络实用程序,它提供强大的加密功能以确保隐私和安全的文件传输,使其成为远程服务器管理和安全数据通信的必备工具。CVE-2024-6387漏洞是由于OpenSSH服务器 (sshd) 中的信号处理程序竞争问题,未经身份验证的攻击者可以利用此漏洞在Linux系统上以root身份执行任意代码。目前该漏洞技术细节已在互联网上公开。
影响版本
8.5p1 <= OpenSSH < 9.8p1
脚本功能
- • Rapid Scanning: Quickly scan multiple IP addresses, domain names, and CIDR ranges for the CVE-2024-6387 vulnerability.
- • Banner Retrieval: Efficiently retrieves SSH banners without authentication.
- • Multi-threading: Uses threading for concurrent checks, significantly reducing scan times.
- • Detailed Output: Provides clear, emoji-coded output summarizing scan results.
- • Port Check: Identifies closed ports and provides a summary of non-responsive hosts.
用法
python CVE-2024-6387_Check.py <targets> [--port PORT]
Examples
Single IP
python CVE-2024-6387_Check.py 192.168.1.1
Multiple IPs and Domains
python CVE-2024-6387_Check.py 192.168.1.1 example.com 192.168.1.2
CIDR Range
python CVE-2024-6387_Check.py 192.168.1.0/24
With Custom Port
python CVE-2024-6387_Check.py 192.168.1.1 example.com --port 2222
Output
The script will provide a summary of the scanned targets:
- • Vulnerable: Servers running a vulnerable version of OpenSSH.
- • Not Vulnerable: Servers running a non-vulnerable version of OpenSSH.
- • Closed Ports: Count of servers with port 22 (or specified port) closed.
- • Total Scanned: Total number of targets scanned.
Servers not vulnerable:1
[+]Server at 157.90.125.31(running SSH-2.0-OpenSSH_8.2p1Ubuntu-4ubuntu0.11)
Servers likely vulnerable:2
[+]Server at 4.231.170.121(running SSH-2.0-OpenSSH_8.9p1Ubuntu-3ubuntu0.10)
[+]Server at 4.231.170.122(running SSH-2.0-OpenSSH_9.2p1Debian-2+deb12u2)
Serverswith port 22 closed:254
Total scanned targets: 257
脚本获取方式
链接:https://pan.quark.cn/s/27053bf754c3
提取码:5CTv
原文始发于微信公众号(CISSP):OpenSSH 远程代码执行漏洞(CVE-2024-6387)批量扫描脚本
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论