A security analyst is auditing a legacy enterprise reporting application. While reviewing the source code responsible for exporting document files, the analyst notes that user-supplied input parameters are directly concatenated into a system command string passed to an operating system command shell executor (`exec()`). The development team proposes mitigating this risk by deploying a Web Application Firewall (WAF) rule designed to inspect requests and block common SQL keywords such as `SELECT`, `INSERT`, and `UNION`. Which of the following evaluations best explains why the proposed mitigation is ineffective?
- The proposed control filters database query manipulation techniques rather than operating system shell commands, failing to remediate the un-sanitized command string execution in application code.Cevap
- BThe application code is vulnerable to Cross-Site Scripting (XSS), meaning malicious script payloads will execute within the victim browser session rather than on the server host.
- CDeploying network boundary firewalls and modifying host routing tables will fully mitigate software command injection flaws without requiring code-level changes.
- DThe security defect is caused by broken access control, so enforcing multi-factor authentication will automatically prevent command execution payloads.
Cevap
The proposed control targets database query manipulation rather than operating system shell commands, failing to remediate the un-sanitized command string execution in application code.
The correct answer accurately points out that filtering database query terms addresses SQL Injection, whereas the vulnerability present is OS Command Injection. Because the server executes arbitrary system commands via un-sanitized string concatenation, SQL keyword filters provide no protection against shell metacharacters or operating system utilities.
Adım Adım Çözüm
Anahtar Kavram
OS Command Injection and Context-Appropriate Mitigation Controls