CompTIA PenTest+ (PT0-002) — Question 333

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?

Answer options

Correct answer: D

Explanation

The correct command is D because it sets up a listener on port 5555, allowing the attacker to connect back to the compromised system. Options A and C do not establish a listening service on the compromised machine, while option B attempts to connect to localhost instead of listening for incoming connections.