Bitzu

CPSA ยท Mapping, fingerprinting and host auditing

Interpreting port scanner output

Reading open, closed and filtered states, scan types and what odd results imply.

Key points

  • Nmap reports open (a service answers), closed (reachable, nothing listening, RST), filtered (no answer or ICMP unreachable, a filter is in the way), unfiltered (ACK scan: reachable, state unknown) and open|filtered (no response, cannot tell).
  • The state depends on the scan type: a SYN scan of a closed port gets RST, a UDP scan gets ICMP port unreachable.

Source: https://nmap.org/book/man-port-scanning-techniques.html

Practice questions

Single choice

A TCP SYN scan sends a SYN to a port and receives a RST in reply. How does nmap report the port?

  1. open
  2. closed
  3. filtered
  4. open|filtered
Show answer

Answer: B. closed

A RST means the host is reachable but nothing listens, so the port is closed. SYN/ACK would mean open, and silence would mean filtered.

Select all that apply

Which statements about the TCP ACK scan (-sA) are correct?

  1. A RST reply makes the port unfiltered
  2. It is used to map firewall rulesets
  3. No reply or an ICMP unreachable makes the port filtered
  4. A SYN/ACK reply marks the port open
  5. It identifies the service version on each port
Show answer

Answer: A. A RST reply makes the port unfiltered, B. It is used to map firewall rulesets, C. No reply or an ICMP unreachable makes the port filtered

ACK scan maps firewall rules: a RST means unfiltered, silence or ICMP errors mean filtered. It never reports open, so it cannot list services.

True or false

A port reported as filtered means that nothing is listening on it.

Show answer

Answer: False

False. Filtered means a firewall or filter prevented nmap from learning the state. A service may well be listening behind it. Closed is the state that means reachable with no listener.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module