GSEC · Question #339
Which of the following attacks can be mitigated by avoiding making system calls from within a web application?
The correct answer is B. OS command injection C. SQL Injection. Restricting system calls from web applications directly eliminates OS command injection and reduces the ability of SQL injection to escalate into OS-level command execution.
Question
Which of the following attacks can be mitigated by avoiding making system calls from within a web application?
Options
- ADenial of Service
- BOS command injection
- CSQL Injection
- DBuffer Overflows
How the community answered
(47 responses)- A9% (4)
- B79% (37)
- D13% (6)
Why each option
Restricting system calls from web applications directly eliminates OS command injection and reduces the ability of SQL injection to escalate into OS-level command execution.
Denial of Service attacks exploit resource exhaustion, amplification, or network-layer flooding, none of which depend on system calls made from within the web application code.
OS command injection occurs when user-supplied input is passed to OS shell functions such as exec() or system(); eliminating system calls from the web application removes the mechanism that makes this attack possible.
Advanced SQL injection attacks can escalate to OS command execution through database features like SQL Server's xp_cmdshell or MySQL's LOAD_FILE; preventing the application from making system calls limits this escalation path and reduces the effective impact of SQL injection.
Buffer overflow attacks exploit improper memory boundary handling in compiled code, requiring mitigations like bounds checking and memory-safe languages, not restrictions on system call usage.
Concept tested: Mitigating command injection by restricting OS system calls
Source: https://owasp.org/www-community/attacks/Command_Injection
Topics
Community Discussion
No community discussion yet for this question.