GIAC Certified Incident Handler (GCIH) — Question 76
Which of the following netcat commands will connect to tcp port 2222 on a remote system (10.0.0.1)?
Answer options
- A. C:\>nc.exe 10.0.0.1 2222
- B. C:\>nc.exe 10.0.0.1 -l -p 2222
- C. C:\>nc.exe 10.0.0.1 -L 2222
- D. C:\>nc.exe 10.0.0.1 -p 2222
Correct answer: B
Explanation
The correct answer is B, as the command includes the '-l' option which specifies that netcat should listen for incoming connections on the specified port. Options A, C, and D do not have the correct syntax for establishing a listening connection, making them unsuitable for the desired action.