Firewall Evasion
Firewall Evasion
Evasion via controlling the soource mac/ip/port
Tool: nmap
Nmap can spoof:
1) Decoy(s)
2) Proxy
3) Spoof MAC address
4) Spoofed Source IP Address
5) Fixed Source port number
DECOY
Example:
TIP: You can explicitly specify the random IPs in your scan
PROXY
Example:
TIP: You can chain proxies using a comma separated list
SPOOFED MAC ADDRESS
MAC Spoofing works only if your system is on the same network segment as the target host
SPOOFED IP ADDRESS
TIP: IP Spoofing can be useful if your system is on the same subnetwork as the target host. Also you can use this technique when you control a system that has a particular IP address
FIXED SOURCE PORT NUMBER
Example:
TIP: Use port number like 53,80,8080,etc
EVASION VIA FORCING FRAGMENTATION, MAXIMUM TRANSMISSION UNIT (MTU) AND DATA LENGTH
Fragmentation
Tool: nmap
Examples:
-f = 8 bytes
-ff = 16 bytes
Maximum Transmission Unit MTU
TIP: Number must always be multiple of 8
Packets with specific length
nmap option: --data-length VALUE
TIP: Multiple of 8
EVASION VIA MODIFYING HEADER FIELDS
Set Time To Live (TTL)
option: --ttl NUM
Set IP options
option: --ip-options HEX_STRING
1 byte in hex: \xHH
Other options:
1) R = to record route
2) T = to record timestamp
3) U = record route and record timestamp
4) L = Loose routing (Source)
5) S = Strict routing (Source)
Wrong checksum
option: --badsum
EVASION USING NON-STANDARD PORTS
Backdoor example:
TIP: run as root to use ports below 1024 with netcat
PORT TUNNELING/PORT MAPPING/PORT FORWARDING
Example:
Last updated