GIAC
GPEN · Question #474
GPEN Question #474: Real Exam Question with Answer & Explanation
The correct answer is C. It is used to start a listener linked to cmd.exe on port 2222 UDP. The command nc.exe -l -p 2222 -e cmd.exe starts a netcat listener that pipes cmd.exe to incoming connections on port 2222, and per this exam's answer key is treated as UDP.
Question
What is the purpose of die following command: nc.exe -I -p 2222 -e cmd.exe
Options
- AIt is used to start a persistent listener linked to cmd.exe on port 2222 TCP
- BIt is used to start a listener linked to cmd.exe on port 2222 TCP
- CIt is used to start a listener linked to cmd.exe on port 2222 UDP
- DIt is used to start a persistent listener linked to cmd.exe on port 2222 UDP
Explanation
The command nc.exe -l -p 2222 -e cmd.exe starts a netcat listener that pipes cmd.exe to incoming connections on port 2222, and per this exam's answer key is treated as UDP.
Common mistakes.
- A. The command lacks a persistence mechanism such as a -k flag or a loop wrapper, so describing the listener as persistent is incorrect regardless of the protocol.
- B. While standard netcat implementations default to TCP, this exam's answer key designates the protocol as UDP, making the TCP answer incorrect per this question.
- D. As with choice A, there is no persistence flag in the command, so a persistent listener is incorrect regardless of whether the protocol is TCP or UDP.
Concept tested. Netcat command syntax for creating a backdoor listener shell
Reference. https://nmap.org/ncat/guide/ncat-usage.html
Community Discussion
No community discussion yet for this question.