Ehernal Blue 通过 Tcp 端口 445 和 139 来利用 SMBv1 和 NBT 中的远程代码执行漏洞,恶意代码会扫描开放 445 文件共享端口的 Windows 机器,无需用户任何操作,只需要开机上网,攻击者就能在电脑和服务器中植入勒索软件。
下载地址:https://github.com/holmesian/ms17_010_scan
在内网中,Ms17010 这个漏洞很常见,因此我们可以通过 Ms17010 横向批量探测内网主机是否有此漏洞:
扫单个 IP
ms17010scan-h-n-amd64-1.exe -h 192.168.2.1
扫 IP 段
ms17010scan-h-n-amd64-1.exe -n 192.168.2.0/24
msf5 auxiliary(scanner/smb/smb_ms17_010) > show options
Module options (auxiliary/scanner/smb/smb_ms17_010):
Name Current Setting Required Description
---- --------------- -------- -----------
CHECK_ARCH true no Check for architecture on vulnerable hosts
CHECK_DOPU true no Check for DOUBLEPULSAR on vulnerable hosts
CHECK_PIPE false no Check for named pipe on vulnerable hosts
NAMED_PIPES /usr/share/metasploit-framework/data/wordlists/named_pipes.txt yes List of named pipes to check
RHOSTS 192.168.2.0/24 yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 445 yes The SMB service port (TCP)
SMBDomain . no The Windows domain to use for authentication
SMBPass no The password for the specified username
SMBUser no The username to authenticate as
THREADS 10 yes The number of concurrent threads (max one per host)
msf5 auxiliary(scanner/smb/smb_ms17_010) > exploit
httpscan 是一个扫描指定 CIDR 网段的 Web 主机的小工具。和端口扫描器不一样,httpscan 是以爬虫的方式进行 Web 主机发现,因此相对来说不容易被防火墙拦截。
httpscan 会返回 IP、http 状态码、Web 容器版本、以及网站标题。
下载地址:https://github.com/zer0h/httpscan
python httpscan.py 192.168.2.0/24 -t 10
原理是使用 ICMP 的 Ping 命令去探测一个网段,目标是否存活:
for /l %i in (1,1,255) do @ping 192.168.2.%i ‐w 1 ‐n 1 | find /i "ttl"
Ladon 一款用于大型网络渗透的多线程插件化综合扫描神器,含端口扫描、服务识别、网络资产、密码爆破、高危漏洞检测以及一键 GetShell,支持批量 A 段 / B 段 / C 段以及跨网段扫描,支持 URL、主机、域名列表扫描。
下载地址:https://github.com/k8gege/Ladon
一、多协议探测内网主机存活(IP、机器名、MAC 地址、制造商)
Ladon.exe 192.168.2.0/24 OnlinePC
二、多协议识别操作系统(IP、机器名、操作系统版本、开放服务)
Ladon.exe 192.168.2.0/24 OsScan
三、扫描内网 SMB 漏洞 MS17010
Ladon.exe 192.168.2.0/24 MS17010
参考文章:
http://www.saulgoodman.cn/tags/Metasploit/
正文完