Hunting Os Command Injection

Hunt OS command injection where untrusted input reaches a process-spawning API through a shell that interprets metacharacters. Covers a command string passed to a system or shell-exec call, a spawn that requests a shell, and indirect shells reached through wildcards, subshells, environment values, or an attacker-influenced PATH or IFS. The distinguishing fact is the shell: a direct exec with a fixed program and an argument vector does not interpret metacharacters and is not this bug, while any shell-composed string is. Allowlisting the program name does not help when arguments are interpolated into a shell. Use when input flows into a call that runs a command or spawns a process. The untrusted input is the source, the shell-interpreted command is the sink, and arbitrary command execution is the bug.

UnboundCompute 3384cd6 9.0 KB Updated

File contents

UnboundCompute/security-agent-skills/tree/main/skills/hunting-os-command-injection commit 3384cd67e6

Frequently asked questions

npx skillmds@latest add unboundcompute/hunting-os-command-injection