nerdexam
GIAC

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.

Exploitation & Post-Exploitation Techniques

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)
  • A
    10% (3)
  • B
    79% (23)
  • C
    3% (1)
  • D
    7% (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.

ACapture data on port 53 and performing banner grabbing.

Banner grabbing requires an outbound connection to a target service to read its response header, not an inbound listening configuration with shell execution.

BListen the incoming traffic on port 53 and execute the remote shell.Correct

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.

CListen the incoming data and performing port scanning.

Port scanning involves sending probes to multiple remote ports to enumerate their state, which is functionally opposite to binding a local listener.

DCapture data on port 53 and delete the remote shell.

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

#netcat#bind shell#port 53#command execution

Community Discussion

No community discussion yet for this question.

Full GPEN Practice