Command Injection
Jump to:
Summary
Command Injection is a type of application attack where an attacker exploits vulnerabilities to execute arbitrary system commands on a host server through a vulnerable application.
Key Characteristics
- Exploits improper input validation in applications.
- Allows execution of arbitrary OS commands via user-supplied input.
- Can lead to unauthorized data access, system compromise, or denial of service.
- Often targets web applications that pass user input to system shells.
- May result in privilege escalation depending on the application’s permissions.
Defensive Controls
- Implement strict input validation and sanitization to reject malicious characters.
- Use parameterized APIs or safe libraries instead of direct command execution.
- Apply the principle of least privilege to limit application permissions.
- Employ web application firewalls (WAF) to detect and block injection attempts.
- Conduct regular code reviews and security testing focused on injection flaws.
Related Security Solutions
Security solutions related to Command Injection include Web Application Firewalls (WAFs), Runtime Application Self-Protection (RASP), secure coding practices, static and dynamic application security testing (SAST/DAST), and endpoint protection platforms that monitor abnormal system command executions.
More in Application Attacks