CompTIA PenTest+ (PT0-001) — Question 12
A penetration tester wants to launch a graphic console window from a remotely compromised host with IP 10.0.0.20 and display the terminal on the local computer with IP 192.168.1.10. Which of the following would accomplish this task?
Answer options
- A. From the remote computer, run the following commands: export XHOST 192.168.1.10:0.0 xhost+ Terminal
- B. From the local computer, run the following command: ssh -L4444:127.0.0.1:6000 -X[email protected]xterm
- C. From the remote computer, run the following command: ssh -R6000:127.0.0.1:4444 -p 6000[email protected]ג€xhost+; xtermג€
- D. From the local computer, run the following command: nc -l -p 6000 Then, from the remote computer, run the following command: xterm | nc 192.168.1.10 6000
Correct answer: A
Explanation
The correct answer is A because it correctly sets the DISPLAY environment variable to the local machine's IP and allows the remote host to connect. Options B and C do not properly configure the X11 forwarding, and option D uses netcat which is not suitable for displaying a graphical interface directly.