msfvenom
Generate custom Metasploit payloads and shellcode for reverse shells, meterpreter, and more. Specify payload, format, platform, and encoding to create standalone executables or scripts.
Instructions
Metasploit payload generator — creates shellcode and executables from payloads. Use for generating standalone payloads (reverse shells, meterpreter, etc.) in various formats. For AV-evasion with encoding, encryption, and template injection, use evasive_payload instead. Output: generated payload in the requested format, or list of available payloads/encoders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | Output format: raw, exe, dll, python, c, csharp, powershell, hex, js, vba, etc. | |
| arch | No | Target architecture: x86, x64, armle, mipsle, ppc | |
| opts | No | Additional msfvenom options | |
| lhost | No | Listen host IP — where the payload connects back to | |
| lport | No | Listen port — which port the payload connects to | |
| encoder | No | Encoder to use (e.g. 'x86/shikata_ga_nai'). Omit for no encoding. | |
| outfile | No | Output file path to save generated payload | |
| payload | Yes | Payload name (e.g. 'linux/x64/shell_reverse_tcp', 'windows/meterpreter/reverse_tcp') | |
| badchars | No | Bad characters to avoid (e.g. '\x00\x0a\x0d' for null, newline, carriage return) | |
| platform | No | Target platform: windows, linux, android, osx, solaris | |
| template | No | Path to executable to use as template (payload injected into it) | |
| iterations | No | Number of encoding iterations (default: 1). More iterations = larger payload. |