0

I have a target process I'm injecting meterpreter shellcode (windows/meterpreter/reverse_tcp) into, I manage to get a shell but when I exit it, the process exits as well. Is there any easy way to make the process survive the meterpreter exit besides debugging the process and changing to shellcode manually?

I've added registers saving instructions (pushad, pushfd) at the beginning of the shellcode and registers restoring instructions followed by a trampoline at the end of the shellcode where the opcodes are instructing the process to jump back to some address, but the execution flow never reaches the end of the meterpreter shellcode and the process exits when I exit the meterpreter session.

schroeder
  • 123,438
  • 55
  • 284
  • 319
jony
  • 1
  • 1

2 Answers2

0

The way I got around this personally, was just creating another session, moving to that session, and then exiting that session. Keeping my main session alive.

-1

use the persistence module to upload & install payload to the registry hives of the OS. this will help reestablish connection with your target whenever you exit or the victim machine reboots/ shutdowns unexpectedly.

mount
  • 1