GPEN · Question #281
You execute the following netcat command: c:\target\nc -1 -p 53 -d -e cmd.exe What action do you want to perform by issuing the above command?
The correct answer is B. Listen the incoming traffic on port 53 and execute the remote shell. The netcat command uses listen mode on port 53 with shell execution enabled, forming a bind shell that grants remote command access to the target.
Question
You execute the following netcat command:
c:\target\nc -1 -p 53 -d -e cmd.exe What action do you want to perform by issuing the above command?
Options
- ACapture data on port 53 and performing banner grabbing.
- BListen the incoming traffic on port 53 and execute the remote shell.
- CListen the incoming data and performing port scanning.
- DCapture data on port 53 and delete the remote shell.
How the community answered
(29 responses)- A10% (3)
- B79% (23)
- C3% (1)
- D7% (2)
Why each option
The netcat command uses listen mode on port 53 with shell execution enabled, forming a bind shell that grants remote command access to the target.
Banner grabbing requires an outbound connection to a target service to read its response header, not an inbound listening configuration with shell execution.
The `-l` flag places netcat in listen mode, `-p 53` binds it to port 53, and `-e cmd.exe` executes the Windows command shell upon receiving a connection. The `-d` flag detaches the process from the console so it runs silently in the background. Together these flags form a bind shell, allowing an attacker to remotely execute commands over port 53.
Port scanning involves sending probes to multiple remote ports to enumerate their state, which is functionally opposite to binding a local listener.
The `-d` flag means detach from the console, not delete anything; no deletion functionality exists in this command.
Concept tested: Netcat bind shell command flags and backdoor creation
Source: https://nmap.org/ncat/guide/ncat-usage.html
Topics
Community Discussion
No community discussion yet for this question.