OpenSSH 远程代码执行漏洞(CVE-2024-6387)批量扫描脚本

admin 2024年7月2日14:44:08评论26 views字数 1676阅读5分35秒阅读模式

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)批量扫描脚本

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年7月2日14:44:08
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   OpenSSH 远程代码执行漏洞(CVE-2024-6387)批量扫描脚本https://cn-sec.com/archives/2909229.html

发表评论

匿名网友 填写信息