规则不是非常严谨,没有经过实战检验,检测方式仅供参考
什么是IPC
IPC,又称ipc$
,是windows系统中默认开启的一个共享空连接,用来让远程用户连接测试连接时的账号密码是否正确
在终端中输入net use \\目标IP\ipc$ 密码 /user:用户
即可尝试连接目标
ipc$
的利用条件:
- 管理员开启了默认共享
- 知道受害者的IP和登录密码
- 开启了139、445端口
常用命令:
工作组:net use \\目标IP\ipc$ 密码 /user:用户
域内 : net use \\目标IP\ipc$ 密码 /user:domain\用户
复现抓包
由于windows是不区分大小写的,所以这里使用大小写的IPC分别进行连接,并捕获到2个数据包
下面我用绿色表示存在共同特征的请求包,蓝底表示存在共同特征的响应包,这些内容,是肉眼可见的,跟ipc有关的数据,那么,就考虑拿它作为特征
发现,还是有一些特征的,当然,出了上面标注的部分外,还有别的一些特征,但是由于样本有限,如果想打击的更加精准,就需要拿到设备上去实际测试了。
小写ipc特征
flow:to_server; content:"|fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ff fe 00 00|"; content:"|00 5c 00 69 00 70 00 63 00 24 00|"; within:100; flowbits:set,ipc-content; metadata:service check-ports;
大写IPC特征
flow:to_server; content:"|fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ff fe 00 00|"; content:"|00 5c 00 49 00 50 00 43 00 24 00|"; within:100; flowbits:set,ipc-content; metadata:service check-ports;
响应特征
由于大小写的IPC响应特征可以取共同特征,这里使用1条规则来做
得出规则:
flow:to_client; flowbits:isset,ipc-content; content:"|00 00 00 50 fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 01 00 00 00 00 00 00 00|"; content:"|00 00 00 00 ff fe 00 00 01 00 00 00|"; distance:3; metadata:service check-ports;
综合规则:
alert tcp any any -> any any (msg:"ipc攻击方式1-尝试攻击"; flow:to_server; content:"|fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ff fe 00 00|"; content:"|00 5c 00 69 00 70 00 63 00 24 00|"; within:100; flowbits:set,ipc-content; metadata:service check-ports; sid:1; rev:1;)
alert tcp any any -> any any (msg:"ipc攻击方式2-尝试攻击"; flow:to_server; content:"|fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ff fe 00 00|"; content:"|00 5c 00 49 00 50 00 43 00 24 00|"; within:100; flowbits:set,ipc-content; metadata:service check-ports; sid:2; rev:1;)
alert tcp any any -> any any (msg:"ipc攻击成功"; flow:to_client; flowbits:isset,ipc-content; content:"|00 00 00 50 fe 53 4d 42 40 00 01 00 00 00 00 00 03 00 01 00 01 00 00 00 00 00 00 00|"; content:"|00 00 00 00 ff fe 00 00 01 00 00 00|"; distance:3; metadata:service check-ports; sid:3; rev:1;)
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/134303.html