hunt-saml

Detects and exploits SAML/SSO vulnerabilities including XML Signature Wrapping, signature stripping, and parser differentials.

6|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-saml-wyl-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-saml
Source: https://github.com/Wyl-cmd/kxns-cli/tree/main/src/kxns_cli/skills/hunt-saml
Command: npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-saml-wyl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security testers need systematic guidance to find and validate SAML/SSO implementation flaws—such as XML Signature Wrapping, signature stripping, and comment injection—that lead to account takeover, but these attacks require deep knowledge of XML parser behavior and canonicalization mismatches. ## Core Features & Use Cases - Attack Pattern Library: Covers XSW1–XSW8 variants, comment injection in NameID, signature stripping, key confusion, XXE in assertions, and replay attacks with concrete payload examples. - Endpoint Discovery & Triage: Provides automated SAML endpoint discovery (ADFS, Shibboleth, Keycloak, SimpleSAMLphp), IdP metadata extraction, and severity triage guidance for each finding. - Use Case: During a bug bounty engagement, you intercept a SAMLResponse at /saml/acs, strip the Signature element, change the NameID to [email protected], re-encode, and confirm the SP accepts it—demonstrating a Critical account takeover. ## Quick Start Ask the agent to hunt for SAML and SSO vulnerabilities on the target by discovering SAML endpoints and testing captured assertions for signature wrapping, stripping, and NameID manipulation.

Frequently Asked Questions about hunt-saml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test SAML for XML Signature Wrapping attacks?

Intercept the SAMLResponse, inject a second assertion with an attacker-controlled NameID before the legitimately signed assertion, and re-encode it in base64. If the service provider processes the first assertion while the signature validates the second, you achieve account takeover.

What tools are used for SAML security testing?

SAMLRaider, a Burp Suite extension, automates XSW testing on intercepted SAMLResponses. Manual workflows use base64 decoding, xmllint for formatting, and direct XML editing before re-encoding and submitting to the assertion consumer service.

How does SAML signature stripping lead to account takeover?

Decode the SAMLResponse, delete the entire Signature element, change the NameID to an admin email, and re-encode. If the service provider does not enforce signature presence, it accepts the forged assertion and issues an admin session.

What is comment injection in SAML NameID?

An attacker uses a NameID like [email protected]<!-- -->.evil.com where canonicalization strips the comment before signing, but the application's parser reads only the text before the comment. The signed value and the effective identity differ, enabling admin impersonation.

How do I find SAML endpoints on a target?

Probe common paths such as /saml/acs, /sso/saml, /adfs/ls/IdpInitiatedSignOn.aspx, /saml2/idp/metadata.php, and /auth/realms/master/protocol/saml. Responses with HTTP 200 or 302 indicate exposed ADFS, Shibboleth, Keycloak, or SimpleSAMLphp deployments.

When is a SAML finding not a Critical vulnerability?

If XML manipulation only alters non-security attributes like display name or locale without changing NameID, AuthnContext, or role-bearing AttributeStatements, it does not cross an authorization boundary. Such findings are Informational rather than Critical.