渗透攻击红队
一个专注于红队攻击的公众号
大家好,这里是 渗透攻击红队 的第 16 篇文章,本公众号会记录一些我学习红队攻击的复现笔记(由浅到深), 不出意外每天一更
当我们拿到了一台网络边界的时候,我们发现内网里还有很多台设备,比如邮件服务器,数据库服务器等等,我们可以通过网络边界做跳板对内网进行深层次的漏洞扫描。
内网扫描
Ms17010_scan
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-Web扫描
httpscan是一个扫描指定CIDR网段的Web主机的小工具。和端口扫描器不一样,httpscan是以爬虫的方式进行Web主机发现,因此相对来说不容易被防火墙拦截。
httpscan会返回IP 、http状态码 、Web容器版本 、以及网站标题。
下载地址:https://github.com/zer0h/httpscan
python httpscan.py 192.168.2.0/24 -t 10
CMD内网主机存活扫描
原理是使用ICMP的Ping命令去探测一个网段,目标是否存活:
for /l %i in (1,1,255) do @ping 192.168.2.%i ‐w 1 ‐n 1 | find /i "ttl"
Ladon大型内网渗透扫描器
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/
本文始发于微信公众号(渗透攻击红队):内网漏洞探测扫描 - 信息搜集篇 - 渗透红队笔记
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论