Covert Scanning Techniques with Nmap
Stealth Scanning
Stealth scanning techniques are used to avoid detection by firewalls, intrusion detection systems (IDS), or other security measures. These techniques can help bypass security controls and gather information about the target network without raising suspicion.
TCP SYN Scan
The TCP SYN scan, also known as a "half-open" scan, is a popular stealth scanning technique. It sends a SYN packet to each target port and waits for a SYN-ACK response, without completing the full TCP handshake.
## Example: Performing a TCP SYN Scan
nmap -sS -p- 192.168.1.100
Idle/Zombie Scan
The idle/zombie scan is an advanced stealth scanning technique that uses a third-party system (the "zombie") to perform the scan. This makes the source of the scan appear to be the zombie system, effectively hiding the real source of the scan.
## Example: Performing an Idle/Zombie Scan
nmap -sI zombie_host 192.168.1.100
sequenceDiagram
participant Nmap
participant Zombie
participant Target
Nmap->>Zombie: SYN
Zombie->>Target: SYN
Target->>Zombie: SYN-ACK
Zombie->>Nmap: SYN-ACK
Nmap->>Zombie: ACK
Evasion Techniques
Nmap also provides various evasion techniques to bypass security controls and make the scan less detectable.
Fragmented Packets
Nmap can split packets into smaller fragments to bypass firewalls or IDS that may be configured to detect and block large packets.
## Example: Performing a Fragmented Packet Scan
nmap -f -p- 192.168.1.100
Decoy Scans
Nmap can launch the scan from multiple source IP addresses, including decoy IP addresses, to make it harder to identify the actual source of the scan.
## Example: Performing a Decoy Scan
nmap -D RND:5 -p- 192.168.1.100