Preparing payloads with Metasploit

During penetration tests, you may often need to demonstrate that you have unbridled control of a host, or you may need to actually interact with them using some form of remotely—either from the local network or the wider Internet—accessible command-line interface. If you find yourself in a situation that allows you to execute the arbitrary code on a host, and you'd like to control it remotely, one of the most common ways to take advantage of the situation is to upload a shell that allows you to remotely interact with the command shell or prompt. Metasploit has a tool dedicated to catering to these situations called msfpayload.

The Metasploit payload generator (msfpayload) allows you to generate an executable package ...

Get Penetration Testing with the Bash shell now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.