≡ Menu


You can test your IDS or IPS devices to monitor your scan traffic. Use this feature to avoid detection with nmap. You may not want to get caught performing a network scan. For example, using following technique you can test your own IDS / IPS / network security from remote location or home.

nmap Decoy option - Cloak a scan with decoys

nmap has -D option. It is called decoy scan. With -D option it appear to the remote host that the host(s) you specify as decoys are scanning the target network too. Thus their IDS might report 5-10 port scans from unique IP addresses, but they won't know which IP was scanning them and which were innocent decoys. While this can be defeated through router path tracing, response-dropping, and other active mechanisms, it is generally an effective technique for hiding your IP address.

You can separate each decoy host with commas, and you can optionally use ME as one of the decoys to represent the position for your real IP address. If you put ME in the 6th position or later, some common port scan detectors (such as Solar Designer's excellent scanlogd) are unlikely to show your IP address at all. If you don't use ME, nmap will put you in a random position. Note that the hosts you use as decoys should be up or you might accidentally SYN flood your targets. Also it will be pretty easy to determine which host is scanning if only one is actually up on the network. You might want to use IP addresses instead of names (so the decoy networks don't see you in their nameserver logs).

WARNING! These penetration testing (security testing) examples may be considered as Unauthorized Access or Illegal Behavior. Use examples on your own RISK and/or to secure your own network host / IPS /IDS.

Use the following syntax:
# nmap -n -Ddecoy-ip1,decoy-ip2,your-own-ip,decoy-ip3,decoy-ip4 remote-host-ip
# nmap -n -D192.168.1.5,,,

Host (or network IDS / IPS) will see 4 port scan and remote host / IDS has no way telling which one was real. Decoys are used both in the initial ping scan (using ICMP, SYN, ACK, or whatever) and during the actual port scanning phase. Decoys are also used during remote OS detection (-O). Decoys do not work with version detection or TCP connect scan. It is worth noting that using too many decoys may slow your scan and potentially even make it less accurate. Also, some ISPs will filter out your spoofed packets, but many do not restrict spoofed IP packets at all.

nmap ideal scan technique to hide your IP

Following example, uses an an idle scan technique. It uses port 1234 on IP as as a zombie to scan host -
# nmap -P0 -sI

This technique only hides your source address but remote IPS / IDS always record and logs scan. Please refer to nmap man page for more information:
man nmap

How Install and setup a honeypot

Honeypot is a computer system set up as a trap for computer attackers. If intruders are always scanning the Internet for potential victims and they are can you find the intruders and their exploits by putting up fake networks that only a deliberate scan could find? That's the theory behind honeypots. Peter Mikhalenko discusses the implementation, theory, and legality of using a honeypot to protect your network.

From the article:
A honeypot is solution. This is a system designed in such a way that an unsophisticated hacker will want to crack it immediately--like fake diamonds in a glass case in a jewelry shop. First, a quick story. A famous and rich man bought a super safe made of ferro-alloy. He boasted to everyone about his safe and claimed that nobody could crack it. After about a week of this, burglars came in the night and spent two hours cracking the safe with strong acid and explosives. When they opened the safe, they found nothing; the valuables were elsewhere and the burglars were caught.

A honeypot emulates a server with serious security holes. The intent is to attract network intruders so that they will spend their time on a useless job. Honeypots are closely-monitored network decoys that serve several purposes: they can distract adversaries from more valuable machines on a network, provide early warning about new attacks and exploitation trends, and allow in-depth examination of adversaries during and after exploitation.