OS command injection
An untrusted parameter becomes shell command syntax rather than remaining a data argument.
Candidate CWE: CWE-78
Test hypothesis#
Trace an observed local worker into its subprocess sink. In the disposable replica, use a marker-only printf operation appropriate to that shell, comparing the literal and interpreted paths in process logs.
Evidence required#
The marker comes from shell-command interpretation at the identified sink, with a reproducible input path and attacker preconditions. If only options to the intended executable change, use the separate argument-injection card and CWE-88.
Rule out false positives#
Text reflection, a failed command, and a tool whose documented purpose permits that exact trusted operation are not proof of a boundary violation.
Playbook and command references#
- Trace input into queries, commands, and templates — Prove interpretation at a specific sink using small paired experiments instead of payload spraying.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
- T1190 · Exploit Public-Facing Application — Only if: A demonstrated exploit of an Internet-facing service provides initial access to its host, system, or environment; explain the foothold and trust boundary. Not established by: Not a blanket label for every web/API weakness. A reflected parameter, scanner alert, or ordinary cross-account object read alone does not establish initial network/system access.
- T1059.004 · Command and Scripting Interpreter: Unix Shell — Only if: The demonstrated exploit invokes a Unix shell to execute commands; capture the shell invocation or equivalent process evidence in a controlled reproduction. Not established by: Calling an executable directly without a shell, template evaluation, and generic RCE are not automatically Unix Shell. Choose an interpreter only when supported by evidence.