attacking-saml

attacking-saml is a skill for Claude Code from trilwu/secskills. It costs 164 tokens per session (3,554 once invoked), scanned A, original, MIT.

A security-testing guide for SAML, the XML-based standard used by systems such as Okta and Microsoft Entra ID to provide single sign-on. It covers ways to alter or replay signed login assertions and test whether the service validates them correctly.

In plain words
What is it for?
Use it to assess SAML login requests, responses, assertion validation, identity attributes, certificates, and replay protections in authorized security tests.
Why use it?
It helps find gaps where an application trusts the wrong part of a signed message, potentially allowing one user identity or role to be changed into another.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to assess SAML login requests, responses, assertion validation, identity attributes, certificates, and replay protections in authorized security tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trilwu/secskills/attacking-saml
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trilwu/secskills --skill attacking-saml
Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attacking-saml

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/attacking-saml/github.svg)](https://agentmods.dev/skills/trilwu/secskills/attacking-saml)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-saml"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-saml/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attacking-saml

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-saml"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-saml.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 164 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 166
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Privilege Escalation · line 184
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Prompt Injection · line 267
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00164 $0.03554
Opus 5.5 $0.00066 $0.01422
Sonnet 5.5 $0.00033 $0.00711
Haiku 4.5 $0.00016 $0.00355

Measured 2mo ago against content hash 972d76b04abb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

attacking-saml scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

secskills-offense/skills/attacking-saml/SKILL.md · 292 lines

How it starts

The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attacking SAML

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.

When to Use

  • A request or redirect carries a SAMLRequest or SAMLResponse parameter
  • Base64 (plus DEFLATE for the redirect binding) decodes to XML containing <saml:Assertion>, <samlp:Response>, or <saml:Subject>
  • The target exposes a /saml/acs, /sso, /saml2/acs, or /Shibboleth.sso Assertion Consumer Service endpoint
  • An IdP-initiated login POSTs an assertion straight to the SP with no prior AuthnRequest
  • Federation runs through Okta, ADFS, PingFederate, Azure/Entra, Shibboleth, SimpleSAMLphp, or Keycloak
  • You control a low-privilege federated account and want to reach another identity or role

When NOT to Use

  • The SSO flow is OAuth 2.0 or OpenID Connect (code, id_token, access_token, /authorize, /.well-known/openid-configuration) — use attacking-oauth-oidc
  • The token is a JWT (eyJ... with dot separators) rather than signed XML — use attacking-jwt
  • General web testing with no SAML artifact in scope — use testing-web-applications
  • Golden SAML against a compromised AD FS server or cloud tenant where you already hold the token-signing key — that is a tenant-takeover play in attacking-entra-id
  • Evaluating the signature primitives themselves (SHA-1 vs SHA-256, RSA key size, canonicalization algorithm choice) — use reviewing-cryptography

Decode and Inspect

Everything 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 -

Read the full file on GitHub · 292 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 292 lines · 164 tokens per session scan A 972d76b04abb

Subscribe to this mod's changes

attacking-saml is a skill published in the GitHub repository trilwu/secskills (211 stars, last pushed 2mo ago), licensed MIT. It adds 164 tokens to every session and 3,554 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

attacking-saml compared with skills from other repositories

attacking-saml next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
attacking-samltrilwu/secskillsSkill2112mo agoMITA164Claude Code
claude-md-improveranthropics/claude-plugins-officialSkill49kyesterdayApache-2.0A82Claude Code
agent-platform-model-registrygoogle/skillsSkill25ktodayApache-2.0A60Claude Code, Codex
gke-reliabilitygoogle/skillsSkill25ktodayApache-2.0A85Claude Code, Codex
gke-workload-securitygoogle/skillsSkill25ktodayApache-2.0A171Claude Code, Codex
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill25ktodayApache-2.0A132Claude Code, Codex
glance-canonical-layoutsandroid/skillsSkill11k7d agoApache-2.0A56Claude Code