312-50V11 · Question #48
An attacker scans a host with the below command. Which three flags are set? #nmap -sX host.domain.com
The correct answer is C. This is Xmas scan. URG, PUSH and FIN are set. The nmap -sX Xmas scan sets three TCP flags - URG, PSH, and FIN - to probe how a target responds to malformed packets.
Question
An attacker scans a host with the below command. Which three flags are set? #nmap -sX host.domain.com
Options
- AThis is ACK scan. ACK flag is set
- BThis is Xmas scan. SYN and ACK flags are set
- CThis is Xmas scan. URG, PUSH and FIN are set
- DThis is SYN scan. SYN flag is set
How the community answered
(49 responses)- A6% (3)
- B2% (1)
- C88% (43)
- D4% (2)
Why each option
The nmap -sX Xmas scan sets three TCP flags - URG, PSH, and FIN - to probe how a target responds to malformed packets.
An ACK scan is performed with nmap -sA, which sets only the ACK flag; -sX is not an ACK scan.
The Xmas scan correctly identified but the flags are wrong - it sets URG, PUSH, and FIN, not SYN and ACK, which would instead form part of a normal TCP handshake.
The nmap -sX flag performs a TCP Xmas scan, named because the URG, PUSH (PSH), and FIN flags are all set simultaneously, making the packet appear 'lit up' like a Christmas tree. Per RFC 793, a closed port should respond with RST, while an open port drops the packet with no response, allowing port state inference without completing a full TCP handshake.
A SYN scan is performed with nmap -sS, which sets only the SYN flag to initiate a half-open connection; -sX is a completely different scan type.
Concept tested: Nmap Xmas scan TCP flag manipulation
Source: https://nmap.org/book/scan-methods-null-fin-xmas-scan.html
Topics
Community Discussion
No community discussion yet for this question.