saml
Qué hace
Esta habilidad explica los ataques contra el inicio de sesión único SAML, incluida la envoltura de firmas XML. Está pensada para probadores de seguridad que revisan configuraciones de inicio de sesión empresarial.
Cuándo usarla
- ✓Cuando un sitio usa inicio de sesión único SAML para los accesos de empresa y quieres probarlo.
- ✓Cuando hay disponible una respuesta SAML o un archivo de metadatos para revisar.
- ✓Cuando una revisión de seguridad pregunta si las firmas de las aserciones de inicio de sesión se comprueban correctamente.
Link de la skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/saml/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 el inicio de sesión SAML de nuestra empresa acepta un mensaje de inicio de sesión modificado?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente decodifica el mensaje SAML y luego prueba cómo gestiona el servidor las firmas y las aserciones duplicadas, para ver si confía en la parte equivocada del mensaje.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
SAML Attack Playbook
SAML is XML-based SSO used heavily in enterprise. Signatures protect assertions but XML's structural flexibility creates many opportunities to confuse signature validators.
1. Capture the flow
# Identify SAML in recon — look for:
# - /SAML/login, /sso/saml, /saml2/login
# - Form param "SAMLRequest" or "SAMLResponse" (base64 + deflate)
# - SP metadata: /SAML/metadata, /sp/metadata.xml
# - IdP metadata: /idp/metadata.xml
# Decode a SAML message in Burp via the SAML Raider plugin
# Or manually
echo "$SAMLResponse_base64" | base64 -d | xmllint --format -
2. XML Signature Wrapping (XSW) attacks
The classic SAML bug class. 8 canonical variants. SAML Raider implements all of them.
XSW1: Wrap signed Assertion inside Response, add evil assertion
<Response>
<ds:Signature>...</ds:Signature> <!-- signs the inner Assertion -->
<Assertion id="evil">
<Subject>attacker</Subject>
<AttributeStatement>...</AttributeStatement>
</Assertion>
<!-- original signed assertion moved into a deeper child or as sibling of evil -->
<Assertion id="orig">
<Subject>victim</Subject>
...
</Assertion>
</Response>
Parser-checks-signature on orig (still valid). App-reads-claims from
evil (first assertion). Bypass complete.
XSW2-8
Vary which element is signed, what gets added where, what gets renamed. Run all 8 via SAML Raider's automated XSW tester.
3. Comment injection
SAML libraries that strip XML comments BEFORE signature validation but the application reads the un-stripped version (or vice versa):
<Subject>victim@target.com<!-- foo -->.evil.com</Subject>
Some parsers see victim@target.com; others see victim@target.com.evil.com.
Famous: Cisco DUO + others in 2018 (CVE-2018-0489).
4. Signature stripping
Just delete the <ds:Signature> element. Some servers fail to enforce
signature presence.
5. Self-signed assertion (when allowed by misconfig)
Some SPs accept assertions from any IdP listed in their trust store. If the trust store is overly broad, attacker stands up own IdP, generates own cert, IdP signs assertion claiming victim identity.
6. Bypass via SAMLResponse to SAMLRequest confusion
Both are base64'd + deflated XML. Some endpoints handle either. Sending an unsigned SAMLResponse when the endpoint expects a SAMLRequest may bypass auth.
7. Attribute injection via metadata
If SP fetches IdP metadata at runtime from a URL (not pinned), attacker who can poison/spoof that URL injects malicious metadata claiming attacker's IdP signs as victim's IdP.
8. Replay
Many SAML implementations don't track assertion IDs. Capture a victim's
SAML response, replay it later. Mitigation: assertions have NotOnOrAfter
- unique
ID; SPs should track recently-used IDs in a cache.
9. KeyInfo / certificate confusion
<ds:KeyInfo> can carry the cert inline. Attacker:
- Sends own cert in KeyInfo
- Signs assertion w/ corresponding private key
- Server validates against the cert in KeyInfo (instead of its trust store)
10. Tools
- SAML Raider (Burp plugin) — XSW1-8 automation, signature operations, message editing. Essential.
samltool.com— XML pretty-print + base64 decodesamlxss— quick XSS payload tester in SAML attributes- Python
saml2— manual crafting via lxml
11. PoC pattern
- Capture victim's SAMLResponse in Burp
- Decode, identify Subject + AttributeStatement
- Launch SAML Raider → "XSW Test" → cycle through all 8 variants, observe response
- Any variant that returns logged-in-as-target = bug
- If XSW fails, try comment injection: inject
<!-- foo -->in claim values - If still fails, try signature stripping (delete
<ds:Signature>) - Document the modified SAMLResponse + the resulting authenticated session as PoC
12. Severity calibration
| Bug | Typical |
|---|---|
| XSW variant accepted → arbitrary user impersonation | Critical 9.8 (most enterprise SSO bounty) |
| Comment injection accepted | Critical 9.8 |
| Signature stripping accepted | Critical 9.8 |
| KeyInfo cert trust | Critical 9.8 |
| Replay window > 5 min | High 7-8 |
| Self-IdP misconfig | Critical 9.8 |
13. Defender remediation
- Use a battle-tested library (PySAML2, opensaml-cpp, OneLogin's SAML libs)
- Pin trusted IdPs by cert fingerprint, not URL
- Cache assertion IDs and reject replays
- Validate signature BEFORE comment-stripping (or after, but consistently)
- Reject responses w/o `ds:Signature
Preguntas frecuentes
¿Qué es la envoltura de firmas XML?
Es un truco en el que una parte firmada correctamente sigue siendo válida mientras la aplicación lee en su lugar una parte falsificada.
¿Qué herramienta menciona?
Menciona SAML Raider, una herramienta que implementa las variantes habituales de envoltura.
¿Cubre la eliminación de firmas?
Sí. Cubre la eliminación de firmas y la falsificación de aserciones entre sus tipos de ataque.
Detalles
Descripción original del autor
SAML 2.0 attacks — XSW (XML Signature Wrapping) variants 1-8, comment injection, signature stripping, assertion forgery, IdP metadata abuse.
Popularidad
- Estrellas en GitHub
- 6,5 mil
- Posición en el ranking
- #14078
- 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.