abusing-dpapi-for-cred…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using…
Configures secure OAuth 2.0 authorization flows, including Authorization
$ npx -y skills add mukul975/Anthropic-Cybersecurity-Skills --skill configuring-oauth2-authorization-flow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/configuring-oauth2-authorization-flowContext preview
The summary Claude sees to decide when to auto-load this skill.
Configures secure OAuth 2.0 authorization flows, including Authorization
name: configuring-oauth2-authorization-flow
description: Configures secure OAuth 2.0 authorization flows, including Authorization
Code with PKCE, Client Credentials, and Device Authorization Grant, covering flow
selection, PKCE implementation, token lifecycle management, and scope design per
OAuth 2.1. Use when implementing or hardening OAuth 2.0 authentication/authorization
for web, mobile, SPA, or machine-to-machine clients.
domain: cybersecurity
subdomain: identity-access-management
tags:
- iam
- identity
- access-control
- authentication
- authorization
- oauth2
- oidc
- pkce
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.AA-01
- PR.AA-02
- PR.AA-05
- PR.AA-06
mitre_attack:
- T1528
- T1550.001
- T1539
- T1606.001
- T1212
mitre_f3:
version: '1.1'
tactics:
- initial-access
- positioning
techniques:
- id: T1550.001
name: 'Use Alternate Authentication Material: Application Access Token'
tactic: initial-access
source: attack
- id: F1004
name: Access with Stolen Session Cookie
tactic: initial-access
source: f3
- id: F1006
name: Account Takeover
tactic: initial-access
source: f3
- id: T1539
name: Steal Web Session Cookie
tactic: positioning
source: attackConfigure secure OAuth 2.0 authorization flows including Authorization Code with PKCE, Client Credentials, and Device Authorization Grant. This skill covers flow selection, PKCE implementation, token lifecycle management, scope design, and alignment with OAuth 2.1 security requirements.
1. **Authorization Code + PKCE**: Recommended for all client types (web, mobile, SPA). PKCE is mandatory in OAuth 2.1. 2. **Client Credentials**: Machine-to-machine authentication without user context. 3. **Device Authorization Grant (RFC 8628)**: For input-constrained devices (smart TVs, CLI tools). 4. **Refresh Token**: Long-lived token to obtain new access tokens without re-authentication.
PKCE (RFC 7636) prevents authorization code interception attacks: 1. Client generates random `code_verifier` (43-128 characters, unreserved URI chars) 2. Client computes `code_challenge = BASE64URL(SHA256(code_verifier))` 3. Authorization request includes `code_challenge` and `code_challenge_method=S256` 4. Token request includes original `code_verifier` 5. Server validates `SHA256(code_verifier)` matches stored `code_challenge`
1. Generate cryptographically random code_verifier (min 43 chars) 2. Compute code_challenge using S256 method 3. Redirect user to authorization endpoint with parameters:
4. User authenticates and consents 5. Authorization server redirects with authorization code 6. Exchange code + code_verifier for tokens at token endpoint 7. Validate state parameter matches original value
1. Register service client with client_id and client_secret 2. Request token: POST /oauth/token with grant_type=client_credentials 3. Include scope for required permissions 4. Store client_secret securely (vault, env vars, not code) 5. Implement certificate-based client authentication for higher assurance
| Control | NIST 800-53 | Description | |---------|-------------|-------------| | Access Control | AC-3 | Token-based access enforcement | | Authentication | IA-5 | Client credential management | | Session Management | SC-23 | Token lifecycle management | | Audit | AU-3 | Log all token issuance and revocation | | Cryptographic Protection | SC-13 | PKCE and token signing |
817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0
Repo: mukul975/Anthropic-Cybersecurity-Skills
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using…
Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or…
Prepare a defense-contractor environment for CMMC Level 2 certification: scope CUI and FCI, implement the 110 NIST SP 800-171 Rev 2 security requirements…
Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification…
Detect dangerous ACL misconfigurations in Active Directory using ldap3
Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection,…