| name | exploiting-oauth-misconfiguration |
| description | Identifying and exploiting OAuth 2.0 and OpenID Connect misconfigurations including redirect URI manipulation, token leakage, and authorization code theft during security assessments. Use when working with exploiting oauth misconfiguration. |
| domain | cybersecurity |
| tags | ["penetration-testing","oauth","oidc","authentication","web-security","authorization"] |
| subdomain | web-application-security |
| version | 1.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01"] |
Exploiting Oauth Misconfiguration
Overview
Cybersecurity skill for exploiting oauth misconfiguration. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"exploiting oauth misconfiguration"
-
"Identifying and exploiting OAuth 2"
-
During authorized penetration tests when the application uses OAuth 2.0 or OpenID Connect for authentication
-
When assessing "Sign in with Google/Facebook/GitHub" social login implementations
-
For testing single sign-on (SSO) flows between applications
-
When evaluating API authorization using OAuth bearer tokens
-
During security assessments of applications acting as OAuth providers or consumers
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Authorization: Written penetration testing agreement covering OAuth/SSO flows
- Burp Suite Professional: For intercepting OAuth redirect flows
- Browser with DevTools: For monitoring redirect chains and token leakage
- Multiple test accounts: On both the OAuth provider and the target application
- curl: For manual OAuth flow testing
- Attacker-controlled server: For receiving redirected tokens/codes
Workflow
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) k, v IOC_PATTERNS.items()}