The correct answer is B. Rule to detect and block OS commands. A remote code execution attack allows an attacker to execute malicious code or operating system commands on a target system. Since the question asks what should be configured in a WAF, the best answer is a WAF rule that detects and blocks command-execution patterns, such as attempts to invoke shell commands, command separators, or dangerous OS-level functions.
Exact supporting extract: the All-in-One CySA+ guide states that remote code execution describes an attacker’s ability to execute malicious code on a target platform and may allow arbitrary command execution. It also lists application firewalls as a direct RCE mitigation because they monitor and filter traffic to an application and block suspicious or malicious traffic.
The Secbay CySA+ guide also explains that WAFs filter and monitor HTTP traffic between a web application and the internet, and that WAF rules are configured to block known attack patterns and common web application vulnerabilities.
Why the other options are incorrect:
A. Rate control in deny mode is more useful for throttling abuse, brute-force attempts, scraping, or denial-of-service-style traffic, not specifically RCE.
C. Parameterized queries are a strong mitigation for SQL injection, but they are implemented in application/database code, not configured in a WAF.
D. Stored procedure in the database is database-side logic and does not directly configure the WAF to detect or block RCE payloads.
B is best because RCE commonly involves malicious command execution, and the WAF should block those command patterns before they reach the application.
Submit