Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

We're learning nmap in my ethical hacking class. We got showed how we can use nmap to perform a zombie scan:

nmap -PN -sI zombieIP targetIP

and decoy scan:

nmap -p 135 -D decoyIP targetIP

I understand what they do, but the lecturer didn't go into details on how it works. I'm curious to understand, how exactly can nmap tell zombieIP (or decoyIP) to perform a scan on targetIP?

share|improve this question
1  
NMAP Official Book is a great read. Breaks everything down and explains mechanics behind NMAP as well as port scanning in general. –  Rubber Duck Nov 12 '13 at 20:39
    
@RubberDuck Good suggestion! Much of the book is available online. Please note that the name of the program is Nmap, not NMAP. –  bonsaiviking Nov 12 '13 at 21:33
add comment

2 Answers

The basic idea of a Zombie or Idle scan is to send source-spoofed packets to the target, then observe some state change in the TCP/IP stack of the machine with the spoofed source address. The original method, discovered in 1998, used the IP ID field to observe the state.

Nmap's -sI Idle Scan is a good implementation that is able to query the Zombie/Idle host to determine its algorithm for incrementing the IP ID field; in some cases, it increments by 2 or by 256. It is up to the user to choose an appropriate Zombie host. By performing a scan with the -O (OS fingerprinting) and -v (verbose) flags, the user can find machines which have an incremental IP ID sequence, then target them with Nping or another packet crafting tool to identify those that are not experiencing a lot of traffic. The "Idle" part of the scan means that the Zombie must be mostly idle (not communicating with other hosts) in order for the scan to work. Finally, the scan is conducted using a command like you posted: nmap -Pn -sI zombieIP targetIP

The technique goes something like this:

  1. Nmap probes the Zombie to determine its IP ID sequence class and the current value it is using.
  2. Nmap then sends TCP SYN packets to various ports on the target, but spoofs the source address to be that of the Zombie.
  3. During the scan, Nmap continually probes the Zombie to find out how many packets it has sent. Expecting one packet per probe, if it finds that two packets have been sent, it can assume that the other one was a RST packet in response to the target's SYN/ACK, indicating an open port.

Recently (SVN revision 32472, October 27, 2013), Nmap added the ability to do Idle scans over IPv6. The technique is similar, but uses the IPv6 Fragmentation ID field instead. The technique was discovered by Mathias Morbitzer, and will be available in the next release of Nmap.


Decoy scans are a much-less-interesting technique. All packets originate from your scanning machine, but some have spoofed source addresses. Any replies to these spoofed sources will not arrive at your scanner, so they cannot be used to determine port states. This technique only serves to confuse port scan detection, and does not offer any information beyond a regular scan.

share|improve this answer
add comment

The scan techniques are explained very well in the nmap manual: Port Scanning Techniques

It is interesting to run Wireshark while you're running a port scan - you can see the exact packets being sent and received and learn how is really work.

share|improve this answer
    
Or just run nmap with the --packet-trace flag... No need for wireshark. –  Terry Chia Nov 13 '13 at 3:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.