nerdexam
EC-Council

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.

Scanning Networks

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)
  • A
    6% (3)
  • B
    2% (1)
  • C
    88% (43)
  • D
    4% (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.

AThis is ACK scan. ACK flag is set

An ACK scan is performed with nmap -sA, which sets only the ACK flag; -sX is not an ACK scan.

BThis is Xmas scan. SYN and ACK flags are set

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.

CThis is Xmas scan. URG, PUSH and FIN are setCorrect

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.

DThis is SYN scan. SYN flag is set

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

#Xmas scan#Nmap flags#URG PUSH FIN#TCP scanning

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice