一、漏洞渗透测试
靶机(Windows)安装easy file sharing server;直接用nmap扫描靶机,发现运行了该服务
然后查找和EasyFileSharing有关的漏洞,运用下面的指令
searchsploit easy file sharing
结果显示很多相关漏洞。此次复现我们要利用的漏洞是圈起来的这个39009.py这个脚本运行后会在目标主机上打开一个计算器,脚本的路径为
/usr/share/exploitdb/exploits/windows/remote/39009.py
我们运行这个攻击脚本,输入命令
python /usr/share/exploitdb/exploits/windows/remote/39009.py 192.234.168.130 8000
此处的IP是靶机(windows)的IP,80为目标主机在80端口上运行Easy File Sharing服务(如果在其他端口运行该服务,攻击时要修改成运行了Easy File Sharing服务的端口)
然后用python运行时发现不行,原因应该是python3和python2语法不一样,然后改成python2运行
最后靶机上运行了计算器
二、Metasploit应用
我们先生成被控制端,命名为shell.exe
然后启动metasploit,用如下命令
msfconsole
将生成的shell.exe移动到windows。这个步骤要利用利用模块,不然最后输入指令run或exploit会提示没有该指令,命令如下
use exploit/multi/handler
在windows下面运行shell.exe
然后查看windows的桌面,发现有1.txt文本,用download命令下载到kali