nerdexam
GIAC

GCIH · Question #275

Which of the following commands can be used for port scanning?

The correct answer is B. nc -z. The correct answer is B. The nc -z flag enables 'zero-I/O mode' in Netcat (nc), which causes it to connect to a target port without sending any data-making it ideal for port scanning to determine if a port is open or closed. The other options serve different purposes: -t…

Reconnaissance, Scanning, and Enumeration

Question

Which of the following commands can be used for port scanning?

Options

  • Anc -t
  • Bnc -z
  • Cnc -w
  • Dnc -g

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    89% (24)
  • D
    4% (1)

Explanation

The correct answer is B. The nc -z flag enables 'zero-I/O mode' in Netcat (nc), which causes it to connect to a target port without sending any data-making it ideal for port scanning to determine if a port is open or closed. The other options serve different purposes: -t enables Telnet protocol negotiation, -w sets a connection timeout value, and -g specifies source-routing hop points. When used with a range of ports (e.g., nc -z 192.168.1.1 1-1024), the -z flag efficiently scans multiple ports quickly.

Topics

#netcat#port scanning#nc -z flag#network enumeration

Community Discussion

No community discussion yet for this question.

Full GCIH Practice