Source profileQuality 92/100

brucesongs/kali-claw/skills/identity-provider-attack/SKILL.md

identity-provider-attack

Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

Source repository stars
67
Declared platforms
2
Static risk flags
0
Last source update
2026-08-19
Source checked
2026-08-28

Decision brief

What it does: where it fits

Identity Provider (IdP) attack patterns covering OAuth 2. 0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

Best for

  • OAuth/OIDC flow attacks: Authorization code theft, state parameter reuse, PKCE downgrade, redirecturi bypass.
  • JWT attacks: Algorithm confusion (RS256→HS256), kid injection, weak HMAC secret brute force.
  • SAML exploitation: XML signature wrapping, assertion injection, certificate confusion.

Not for

  • Testing in unauthorized environments
  • Ignoring rate limiting (will get blocked)

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeDeclaredSource recordInstall path and trigger
CursorDeclaredSource recordInstall path and trigger
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/brucesongs/kali-claw --skill "skills/identity-provider-attack"
Safe inspection promptEditorial

Inspect the Agent Skill "identity-provider-attack" from https://github.com/brucesongs/kali-claw/blob/a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e/skills/identity-provider-attack/SKILL.md at commit a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Summary

    Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

    Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.Tools: garak, PyRIT, promptfoo, custom harnessesMITRE: TA0006-Credential Access, T1556-Modify Authentication Process
  2. 02

    Description

    Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

    Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.This skill covers the offensive side of cloud-identity security, including reconnaissance, vulnerability discovery, exploitation, persistence, and reporting. Aligned with OWASP Top 10, MITRE ATT&CK, and industry-specifi…
  3. 03

    Use Cases

    1. OAuth/OIDC flow attacks: Authorization code theft, state parameter reuse, PKCE downgrade, redirecturi bypass. 2. JWT attacks: Algorithm confusion (RS256→HS256), kid injection, weak HMAC secret brute force. 3. SAML exploitation: XML signature wrapping, assertion injection, cer…

    OAuth/OIDC flow attacks: Authorization code theft, state parameter reuse, PKCE downgrade, redirecturi bypass.JWT attacks: Algorithm confusion (RS256→HS256), kid injection, weak HMAC secret brute force.SAML exploitation: XML signature wrapping, assertion injection, certificate confusion.
  4. 04

    Core Tools

    Review the “Core Tools” section in the pinned source before continuing.

    Review and apply the “Core Tools” source section.
  5. 05

    Methodology

    1. Reconnaissance: Identify IdP (Okta, Azure AD, Auth0, Keycloak, Google Workspace) via login page fingerprinting. Enumerate users via login timing, password reset flow, or tenant info API. 2. Token Analysis: Decode JWT (header, payload, signature). Identify signing algorithm. T…

    Reconnaissance: Identify IdP (Okta, Azure AD, Auth0, Keycloak, Google Workspace) via login page fingerprinting. Enumerate users via login timing, password reset flow, or tenant info API.Token Analysis: Decode JWT (header, payload, signature). Identify signing algorithm. Test for algorithm confusion (RS256 → HS256). Check refresh token lifetime.Vulnerability Discovery: Test redirecturi validation, state parameter validation, PKCE requirement, token signing algorithm, consent flow.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars67SourceRepository attention, not individual Skill quality
Compatibility2 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
brucesongs/kali-claw
Skill path
skills/identity-provider-attack/SKILL.md
Commit
a3205f5484ca8fec9fd809f3c16fe41fbc6ac87e
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

Skill: identity-provider-attack

Summary

Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

Tools: garak, PyRIT, promptfoo, custom harnesses

Domain: identity

MITRE: TA0006-Credential Access, T1556-Modify Authentication Process

Description

Identity Provider (IdP) attack patterns covering OAuth 2.0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

This skill covers the offensive side of cloud-identity security, including reconnaissance, vulnerability discovery, exploitation, persistence, and reporting. Aligned with OWASP Top 10, MITRE ATT&CK, and industry-specific compliance frameworks.


Use Cases

  1. OAuth/OIDC flow attacks: Authorization code theft, state parameter reuse, PKCE downgrade, redirect_uri bypass.
  2. JWT attacks: Algorithm confusion (RS256→HS256), kid injection, weak HMAC secret brute force.
  3. SAML exploitation: XML signature wrapping, assertion injection, certificate confusion.
  4. Token theft and replay: Session cookie theft, refresh token abuse, primary refresh token (PRT) attacks.
  5. MFA bypass: Push bombing, SIM swap, OAuth consent phishing, time-based OTP brute force.
  6. Service principal abuse: Over-privileged SP, certificate-based auth abuse, workload identity federation.

Core Tools

| jwt_tool | JWT analysis and exploitation | python3 jwt_tool.py <JWT> | | tokenhero | OAuth token analysis | tokenhero --token <access_token> | | AADInternals | Azure AD/Entra ID reconnaissance | Get-AADIntTenantDomains | | MFASweep | MFA bypass testing | Invoke-MFASweep -Target [email protected] | | ROADtools | Azure AD device auth | roadrecon auth | | o365creeper | Microsoft 365 enumeration | python3 o365creeper.py | | OktaPostman | Okta API testing | Postman collection | | SAMLExtractor | SAML assertion analysis | python3 SAMLExtractor.py | | Burp Suite | OAuth/SAML flow interception | Proxy + manual testing | | mitm6 | IPv6 DNS poisoning for WPAD/NTLM relay | mitm6 -d contoso.local |


Methodology

Attack Chain

[1] Reconnaissance          [2] Token Analysis       [3] Vulnerability Discovery
  - IdP identification        - JWT decode              - Algorithm confusion
  - Tenant enumeration        - Refresh token swap      - State reuse
  - User enumeration          - Token replay              |
  - App registration audit      |                        v
        |                       v            [4] Exploitation
        v             [3.5] Authorization   - Account takeover
[2.5] Conditional Access   - Privilege escalation  - Lateral movement
  - Trusted IP spoof            |                      - Persistence
  - Location bypass             v                       |
                          [5] Persistence             v
                          - New app registration  [6] Reporting
                          - Long-lived refresh    - Token exposure
                          - Hidden OAuth consent  - Tenant compromise

Phase Details:

  1. Reconnaissance: Identify IdP (Okta, Azure AD, Auth0, Keycloak, Google Workspace) via login page fingerprinting. Enumerate users via login timing, password reset flow, or tenant info API.
  2. Token Analysis: Decode JWT (header, payload, signature). Identify signing algorithm. Test for algorithm confusion (RS256 → HS256). Check refresh token lifetime.
  3. Vulnerability Discovery: Test redirect_uri validation, state parameter validation, PKCE requirement, token signing algorithm, consent flow.
  4. Exploitation: Token replay, account takeover via refresh token, lateral movement via service principal abuse.
  5. Persistence: Register new OAuth app (persists across password resets), long-lived refresh tokens, hidden consent grants.
  6. Reporting: Map to MITRE ATT&CK, OWASP API Top 10, regulatory frameworks.

Defense Perspective

Defense LayerMeasuresKey Points
Multi-factor AuthenticationPhishing-resistant MFA (FIDO2, smartcard); enforce for all admin accountsPush-based MFA is vulnerable to push bombing; FIDO2 is the gold standard
Conditional AccessDevice compliance, trusted location, risk-based authenticationDon't trust IP alone (NAT, residential proxies); combine with device posture
Token LifetimeShort-lived access tokens (60 min); refresh token rotationLong-lived tokens are persistent access; rotate regularly
Application Registration ControlAllowlist users who can register apps; require admin approvalSelf-service app registration allows malicious OAuth apps
Consent FrameworkRequire admin consent for high-privilege scopes; user consent for low-privilege onlyConsent phishing is major attack vector; educate users
JWT ValidationStrict algorithm allowlist; reject alg: none; verify kid headerAlgorithm confusion is critical vuln; libraries differ in handling
SAML SecurityRequire signed assertions; verify certificate chain; replay detectionXML signature wrapping is common attack
MonitoringAnomalous logins (geo, IP, device); token use patterns; OAuth consent grantsDetect token replay, consent phishing, MFA fatigue

Practical Steps

See payloads.md for detailed payloads and test-cases.md for the complete test checklist.

1. Reconnaissance

Identify target infrastructure; fingerprint products; enumerate attack surface.

2. Vulnerability Discovery

Run automated scanners (garak, PyRIT); manual testing per OWASP Top 10.

3. Exploitation

Chain vulnerabilities for maximum impact; document PoC.

4. Persistence

Establish persistence via configuration changes, scheduled tasks, or backdoors.

5. Reporting

Map findings to MITRE ATT&CK, OWASP, regulatory frameworks; include concrete remediation.


Detection Methods

Identity Provider Audit Logs

  • AWS CloudTrail: All STS / IAM events; alert on AssumeRole chains, GetCallerIdentity from new regions.
  • Azure Activity Log: Sign-in logs with anomalous geo / IP / device fingerprint; risk events in Identity Protection.
  • GCP Audit Logs: Cloud Identity logs; alert on SetIamPolicy changes, service account key creation.
  • Okta System Log: App access, user state changes, MFA device enrollment; alert on anomalous patterns.

Behavioral Anomalies

  • Impossible travel: Login from US + China within 1h (geographic impossibility).
  • MFA fatigue: Multiple MFA challenges in short window (push bombing).
  • Token reuse: Same JWT from many source IPs in short window.
  • Service account abuse: Service account performing user-level actions.
  • Permission explosion: User suddenly granted privileged role across many resources.

Conditional Access Policy Bypass

  • Legacy auth: Basic authentication bypasses MFA; protocol-specific logging.
  • Device compliance bypass: User agent strings indicating non-managed device.
  • Location bypass: Use of residential proxies to mimic legitimate location.
  • App-specific bypass: Use of legacy protocols (IMAP, SMTP) not subject to modern policies.

SIEM Detection Rules

  • Splunk SPL: index=aws sourcetype=aws:cloudtrail eventName=AssumeRole | stats dc(sourceIPAddress) by userIdentity.arn | where dc > 5
  • Sigma rule: sigma/rules/cloud/aws_sts_role_chain.yml
  • Microsoft Entra ID Protection: Native risk detection (impossible travel, anonymous IP, unfamiliar sign-in).
  • AWS GuardDuty: Detects anomalous API calls; UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.

Defense Evasion Techniques

Identity Evasion

  • STS role chaining: Use assume role across multiple accounts; launder credentials.
  • Service account tokens over user credentials: Don't trigger user-behavior analytics.
  • Long-lived credentials over STS: Avoid assume-role audit trail.
  • Federation abuse: Use SAML/OIDC federation; appears as legitimate SSO.
  • Web identity federation: Use GitHub Actions OIDC, Google Cloud Build; inherit trust.

MFA Bypass

  • Push bombing: Trigger MFA fatigue during off-hours; user approves to silence phone.
  • SIM swap: Social engineer mobile carrier; intercept SMS OTP.
  • MFA fatigue + helpdesk social: Trigger fatigue, then call helpdesk claiming lost phone.
  • OAuth consent phishing: Trick user into granting OAuth app; persistent access without MFA.
  • Session token theft: Steal post-MFA session cookie via XSS/MITM; bypasses MFA entirely.

Conditional Access Bypass

  • Legacy protocol abuse: IMAP/SMTP/POP3 often exempt from modern policies.
  • Trusted IP spoofing: X-Forwarded-For manipulation if gateway trusts header.
  • Device compliance bypass: Register personal device as compliant; then access resources.
  • App proxy abuse: Use legitimate reverse proxy app to bypass IP restrictions.

Token Theft Stealth

  • Steal refresh tokens over access tokens: Refresh tokens are longer-lived; less suspicious.
  • Off-hours token use: Use stolen token during user's typical active window; blend with normal activity.
  • Distribute token usage across regions: Mimic user's travel pattern; avoid impossible-travel alert.
  • Pivot through legitimate SaaS: Use stolen token to access third-party SaaS that's pre-approved.

Common Pitfalls

  • Testing in unauthorized environments
  • Ignoring rate limiting (will get blocked)
  • Single-shot testing (real attacks are sustained)
  • Neglecting supply chain
  • Forgetting monitoring/alerting

Reporting and Documentation

Reports should include CVSS scores, MITRE ATT&CK mapping, concrete PoC, business impact, and specific remediation.

Legal and Ethical Considerations

Ensure proper authorization before testing. Document scope in engagement letter. Some attack techniques may violate local laws (e.g., radio transmission without license).

Hacker Laws

LawApplication
Trust but VerifyVerify all outputs; verify all sources
First PrinciplesUnderstand underlying protocols before attacking
Defense in DepthMultiple layers required for robust defense
Assume BreachDesign assuming attacker already inside
Minimize Attack SurfaceReduce unnecessary features/exposure

Learning Resources

Skill supplementary files: payloads.md, test-cases.md

External Resources:

Frequently asked questions

What to verify before installation and use

What does the identity-provider-attack source document cover?

Identity Provider (IdP) attack patterns covering OAuth 2. 0/OIDC, SAML, JWT, token theft/replay, MFA fatigue, service principal abuse (Azure AD/Entra ID), Okta, Auth0, Keycloak, and modern identity-based attacks.

How do I install identity-provider-attack?

The source record exposes this install command: npx skills add https://github.com/brucesongs/kali-claw --skill "skills/identity-provider-attack". Inspect the command and pinned source before running it.

Which Agent platforms does the source record declare?

The pinned source record declares support for: claude code, cursor.

Alternatives

Compare before choosing