saml
O que ela faz
Esta skill explica ataques ao login único SAML, incluindo o wrapping de assinatura XML. Ela é para testadores de segurança que revisam configurações de login corporativo.
Quando usar
- ✓Quando um site usa login único SAML para logins corporativos e você quer testá-lo.
- ✓Quando uma resposta SAML ou um arquivo de metadados está disponível para revisão.
- ✓Quando uma revisão de segurança pergunta se as assinaturas das afirmações de login são verificadas corretamente.
Link da skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/saml/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você pode verificar se o login SAML da nossa empresa aceita uma mensagem de login alterada?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente decodifica a mensagem SAML e depois testa como o servidor trata assinaturas e afirmações duplicadas, para ver se ele confia na parte errada da mensagem.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
O que é wrapping de assinatura XML?
É um truque em que uma parte validamente assinada continua válida enquanto uma parte forjada é lida pelo app.
Qual ferramenta ela menciona?
Ela menciona o SAML Raider, uma ferramenta que implementa as variantes comuns de wrapping.
Cobre remoção de assinatura?
Sim, cobre a remoção de assinatura e a falsificação de afirmações entre seus tipos de ataque.
Detalhes
Descrição original do autor
SAML 2.0 attacks — XSW (XML Signature Wrapping) variants 1-8, comment injection, signature stripping, assertion forgery, IdP metadata abuse.
Popularidade
- Estrelas no GitHub
- 6,5 mil
- Posição no ranking
- #14078
- Licença
- Apache-2.0
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
detector-overview
6,5 milAjuda seu agente a ler o código marcado por um scanner e decidir quais pontos sinalizados são falhas reais de segurança e quais são falsos alarmes.
exploiter-overview
6,5 milAjuda seu agente a combinar várias fraquezas de segurança confirmadas em uma única cadeia de teste e verificar até onde essa cadeia poderia chegar.
llm-redteam-overview
6,5 milAjuda seu agente a encontrar o guia certo de red team de IA para um teste, cobrindo 15 grupos de táticas, da injeção de prompt ao abuso de modelos.
aatmf-t01-prompt-injection
6,5 milExplica a injeção de prompt, em que instruções ocultas tentam sobrepor-se a um sistema de IA, para que testadores de segurança consigam verificá-la.
Skills parecidas
reverse-engineer-anything
422 milAjuda seu agente a analisar apps e pacotes já publicados para explicar recursos, comparar versões ou orientar uma reconstrução, usando a ferramenta REA.
1password
394 milAjuda seu agente a configurar a CLI do 1Password, fazer login e ler ou injetar segredos sem imprimir seus valores no chat.
healthcheck
394 milAjuda seu agente a auditar o computador ou servidor que roda o OpenClaw em busca de riscos como SSH, firewall, atualizações e backups, com correções seguras.