Command Injection
Also called OS command injection.
Injecting attacker commands into a shell call the app builds.
What it is
A vulnerability where untrusted input is incorporated into an operating-system command that the application executes. Shell metacharacters in the input let the attacker run additional commands of their choosing.
Why it matters
Command injection yields direct code execution on the host and is among the most damaging web flaws. In IR, the resulting child processes spawned by a web service are a strong indicator of exploitation.
In practice
A diagnostic page passes a hostname into a ping command, and an attacker appends a semicolon and a second command that is also executed.
What to look for
- Shell characters such as ;, | and $() in parameters.
- Web server processes spawning shells.
- Input passed to system or exec calls.
Common mistake
Escaping input by hand. Use APIs that pass arguments without a shell.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- Risk Scoring
Score a vulnerability with CVSS v3.1, or an incident across five dimensions, and see the reasoning behind each number.
- Map and Score
Map real procedures to ATT&CK techniques, then pick the CVSS v3.1 metrics for real vulnerabilities.
In the field
Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.
-
Burp Suite Commercial
An intercepting proxy for testing web apps by hand and with its scanner.
-
ZAP Open source
An open source web app scanner and proxy, often run in CI pipelines.
-
Cloudflare WAF Commercial
Blocks common web attacks at the edge while the code gets fixed.
Read next
- SQL Injection: Injecting SQL through input to manipulate a database query.
- Remote Code Execution: Running attacker code on a target over a network.
- Insecure Deserialization: Rebuilding objects from untrusted data, enabling code execution.