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
A TCP SYN scan sends a SYN to a port and receives a RST in reply. How does nmap report the port?
- open
- closed
- filtered
- 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.
Which statements about the TCP ACK scan (-sA) are correct?
- A RST reply makes the port unfiltered
- It is used to map firewall rulesets
- No reply or an ICMP unreachable makes the port filtered
- A SYN/ACK reply marks the port open
- 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.
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.
