Question 184 of 509
Attacks and ExploitshardMultiple ChoiceObjective-mapped

Quick Answer

The correct technique is to use a DNS tunneling tool like dnscat2, which bypasses outbound firewall restrictions by encoding data within DNS queries and responses on UDP 53. Since the reverse shell payload requires TCP 443 and that port is blocked, DNS tunneling creates a covert channel that disguises command-and-control traffic as legitimate DNS lookups, effectively achieving data exfiltration through the only allowed protocol. On the CompTIA PenTest+ PT0-002 exam, this scenario tests your understanding of protocol-specific evasion—a common trap is assuming you must modify the reverse shell to use UDP 53 directly, but DNS tunneling encapsulates the TCP stream rather than changing the payload’s protocol. Remember the mnemonic “DNS Doesn’t Discriminate” to recall that DNS tunneling exploits the fact that DNS is almost always permitted outbound, making it a prime vector for exfiltration when other ports are locked down.

PT0-002 Attacks and Exploits Practice Question

This PT0-002 practice question tests your understanding of attacks and exploits. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A penetration tester has exploited a web application and found that the server has an outbound firewall that restricts all outbound traffic except for DNS queries (UDP 53). The tester has a reverse shell payload that connects back on TCP 443. Which technique can the tester use to exfiltrate data or establish a channel?

Question 1hardmultiple choice
Read the full DNS explanation →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use dnscat2 or other DNS tunneling tool

Option C is correct because DNS tunneling tools like dnscat2 encode data within DNS queries and responses, allowing the tester to bypass outbound firewall restrictions that only permit UDP 53 traffic. Since the reverse shell payload uses TCP 443, which is blocked, DNS tunneling provides an alternative covert channel that encapsulates the communication within legitimate DNS lookups, effectively exfiltrating data or establishing a command-and-control channel over the allowed protocol.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use netcat to send data over TCP 53

    Why it's wrong here

    The outbound firewall blocks TCP 53 as well if it is restrictive; the exception is only for UDP 53. Netcat over TCP would be blocked.

  • Use an SSH tunnel over UDP 53

    Why it's wrong here

    SSH tunnels operate over TCP, not UDP. Even if you could encapsulate SSH in UDP, it is not standard and would require special setup.

  • Use dnscat2 or other DNS tunneling tool

    Why this is correct

    DNS tunneling encodes data in DNS queries, which are permitted by the firewall. This allows the tester to establish a channel and exfiltrate data.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use a bind shell listening on TCP 443 internally

    Why it's wrong here

    A bind shell requires the tester to connect to the server from the outside, but the outbound firewall does not affect inbound connections. However, the server's public IP may still be reachable, but the tester would need to know the server's IP and the bind shell port to connect. This does not bypass the outbound restriction for the reverse shell, and the bind shell may be blocked by an inbound firewall as well.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may assume any protocol can be tunneled over UDP 53 simply by changing the port, but DNS tunneling requires specialized tools that encapsulate data within DNS message formats, not just raw TCP or SSH over UDP.

Detailed technical explanation

How to think about this question

DNS tunneling works by encoding payload data into DNS query names (e.g., subdomains) and receiving responses via TXT or other record types, allowing bidirectional communication over UDP 53. Tools like dnscat2 use a custom protocol that fragments and reassembles data within DNS messages, often with base32 or hex encoding to comply with DNS label length limits (63 bytes per label, 255 bytes total). In real-world scenarios, this technique is effective even when deep packet inspection is absent, but it can be detected by analyzing unusual DNS query patterns, such as high frequency or non-standard TLDs.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A security team runs a vulnerability scan on a web application and discovers an unpatched SQL injection flaw. The team prioritises remediation by CVSS score — critical flaws are patched within 24 hours, high within 7 days. Questions like this test whether you understand vulnerability management processes, scanning tools, and remediation prioritisation.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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.

Practice this exam

Start a free PT0-002 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PT0-002 question test?

Attacks and Exploits — This question tests Attacks and Exploits — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use dnscat2 or other DNS tunneling tool — Option C is correct because DNS tunneling tools like dnscat2 encode data within DNS queries and responses, allowing the tester to bypass outbound firewall restrictions that only permit UDP 53 traffic. Since the reverse shell payload uses TCP 443, which is blocked, DNS tunneling provides an alternative covert channel that encapsulates the communication within legitimate DNS lookups, effectively exfiltrating data or establishing a command-and-control channel over the allowed protocol.

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

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PT0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PT0-002 exam.