How to Bypass a Cloud-Hosted WAF When Testing Public APIs
A penetration tester is testing a company's public APIs. In researching the API URLs, the penetration tester discovers that the URLs resolve to a cloud-hosted WAF service that is blocking the penetration tester's attack attempts. Which of the following should the tester do to best ensure the attacks will be more successful?
Community Votes
64% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests whether you understand that a WAF inspects payload content regardless of source IP, so only bypassing the WAF entirely by attacking the origin server ensures success.
In CompTIA PenTest+ PT0-002, when a cloud-hosted WAF blocks API attacks, the best approach is to locate and target the origin servers directly, as community consensus favors option D over merely rotating source IPs.
Choosing C (multiple source IP addresses) is the most common mistake because it may evade simple IP-based rate limiting, but it does not bypass the WAF's content inspection, which will still block exploit payloads.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D is correct because the core problem is the WAF itself inspecting and blocking malicious traffic. By locating the company's origin servers that host the API and sending traffic directly to them, the tester completely bypasses the WAF layer. This technique, known as direct-to-origin (D2O), is a recognized method for defeating cloud-based WAF/CDN protections. As comment [3] notes, sophisticated attackers attempt to reveal the origin IP and attack directly, making the mitigation layer useless.Why the Other Options Are Wrong
A (increasing attack volume) is ineffective because WAFs are not simply overwhelmed by volume; they inspect and filter each request, and increasing volume may trigger rate limiting or alerting. B (changing case) may evade basic signature matching but modern WAFs normalize payloads and use context-aware rules. C (multiple source IPs) can bypass IP-based rate limiting, but as comments [1] and [2] point out, it does not bypass the WAF's deep packet inspection; the WAF will still block the exploit attempts regardless of source IP.Community Comment Notes
Community votes show strong support for D (64) over C (36). Comment [1] explicitly explains that multiple IPs may bypass IP-based blocking but not the WAF's inspection logic. Comment [2] reinforces that sophisticated WAFs detect distributed attack techniques. Comment [5] argues that D assumes infrastructure visibility not mentioned in the question, but this is the intended exam answer: a skilled penetration tester can discover origin servers via DNS history, certificate transparency, or leaked configs. The consensus is clear: bypassing the WAF by targeting origin servers is the most reliable way to ensure attack success.Official Reference
Exam Strategy
When you see a WAF-bypass scenario, always ask whether the option bypasses the WAF's detection layer, not just IP-level controls. The best answer usually involves targeting origin infrastructure or exploiting a WAF parsing flaw, not merely rotating IPs or case variations.