GIAC Certified Incident Handler (GCIH) — Question 80
Which netcat command will listen on port 2222 for connections from a remote system (10.0.0.1)?
Answer options
- A. C:\>nc.exe > p 2222
- B. C:\>nc.exe 10.0.0.1 2222
- C. C:\>nc.exe -z -p 10.0.0.1 2222
- D. C:\>nc.exe -1-p 2222
Correct answer: D
Explanation
The correct command is D because it properly configures netcat to listen on port 2222. Option A is incorrect as it does not use the right syntax for listening. Option B attempts to connect to the remote system instead of listening, and option C uses the wrong flags for the intended operation.