hardmultiple choiceObjective-mapped

A penetration tester has gained a foothold on a Linux server through a vulnerable web application. The server has an outbound firewall that blocks all traffic except DNS queries (UDP 53). The tester needs to establish a reverse shell to maintain access. Which technique is most likely to succeed?

Question 1hardmultiple choice
Full question →

A penetration tester has gained a foothold on a Linux server through a vulnerable web application. The server has an outbound firewall that blocks all traffic except DNS queries (UDP 53). The tester needs to establish a reverse shell to maintain access. Which technique is most likely to succeed?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Use a bind shell on a high TCP port and connect from the tester's machine

The bind shell would listen on a port, but the outbound firewall on the server does not restrict inbound connections; however, the tester would need to connect to the server. But the firewall allows outbound DNS only, so the server cannot initiate a connection back. This approach is not suitable.

B

Best answer

Encode the payload in Base64 and use DNS tunneling to execute commands

DNS tunneling can encode arbitrary data within DNS queries, which are allowed through the firewall, and can be used to establish a two-way communication channel, enabling a reverse shell.

C

Distractor review

Attempt a reverse shell over HTTP using TCP port 80

The firewall blocks all outbound traffic except DNS (UDP 53), so a connection on TCP port 80 would be blocked.

D

Distractor review

Use SSH reverse port forwarding to the tester's server on port 443

SSH requires a TCP connection, which would be blocked by the firewall. DNS tunneling does not rely on a direct TCP connection to the tester's server.

Common exam trap

Common exam trap: ACLs stop at the first match

ACLs are processed top to bottom. The first matching entry wins, and an implicit deny usually exists at the end.

Technical deep dive

How to think about this question

ACL questions test precision: source, destination, protocol, port and direction. A generally correct ACL can still fail if it is applied on the wrong interface or in the wrong direction.

KKey Concepts to Remember

  • Standard ACLs match source addresses.
  • Extended ACLs can match source, destination, protocol and ports.
  • The first matching ACL entry is used.
  • There is usually an implicit deny at the end.

TExam Day Tips

  • Check inbound versus outbound direction.
  • Read the ACL from top to bottom.
  • Look for a broader permit or deny above the intended line.

Related practice questions

Related PT0-002 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this PT0-002 question test?

Standard ACLs match source addresses.

What is the correct answer to this question?

The correct answer is: Encode the payload in Base64 and use DNS tunneling to execute commands — DNS tunneling allows encapsulation of arbitrary data within DNS queries and responses, which can bypass firewalls that permit outbound DNS traffic. This technique can be used to establish a command-and-control channel or execute a reverse shell. Other methods like bind shells or using common ports will be blocked by the firewall. SSH reverse port forwarding requires an outbound connection to an SSH server, which would be blocked.

What should I do if I get this PT0-002 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.