Question 340
A public-facing WAF blocks SQL injection patterns, but a trusted internal batch service can call the same database-backed API without passing through the WAF. Which control prevents SQL injection regardless of the caller network path?
Explanation
Correct Answer
Parameterized queries keep untrusted data values separate from executable SQL syntax, regardless of whether those values originate at a public browser or an internal batch service. Server-side validation and least-privilege database permissions add defense in depth, but input filtering alone does not replace parameter binding.
Incorrect Answers
More WAF telemetry can help detect attempted attacks on the public route, but the internal caller never traverses that inspection point.
A perimeter default-deny firewall limits external network reachability, but it may still permit authenticated internal batch traffic with dangerous input.
Disabling audit logs does not alter how SQL is parsed and may conceal malicious or mistaken batch operations.






CompTIA Security+ (SY0-701) Practice Tests