OAuth/OIDC Attacks
OAuth 2.0 and OpenID Connect security testing
Key Concepts
Security Mindset
Think like an attacker - what can go wrong, what can be abused?
Defense in Depth
Multiple layers of security controls, no single point of failure.
Least Privilege
Grant minimum permissions needed for functionality.
Trust Boundaries
Identify where data crosses trust levels and validate at each boundary.
Learning Material
What You'll Learn
OAuth 2.0 and OpenID Connect security testing
Think like an attacker - what can go wrong, what can be abused?
Multiple layers of security controls, no single point of failure.
Grant minimum permissions needed for functionality.
Identify where data crosses trust levels and validate at each boundary.
Authentication & Authorization Research
Purpose: Deep understanding of auth vulnerabilities for bug bounty hunting
Priority: CRITICAL (identified as primary gap in H1 infrastructure)
Last Updated: December 28, 2025
Why This Matters
From your GAP_ANALYSIS_2025.md: - IDOR/BAC: $5K-$50K payouts, +29% YoY growth - Auth Bypass: $10K-$100K payouts, rising trend - Current tooling: ❌ CRITICAL GAP
This section builds the knowledge needed to leverage:
- h1-auth-agent
- auth_specialist.py
- idor-hunt.sh
Contents
Core Concepts
- Authentication Fundamentals
- Authorization Models
- Session Management
Attack Techniques
- Password Reset Attacks
- JWT Vulnerabilities
- OAuth/OIDC Attacks
- MFA Bypass
- IDOR/BAC Testing
- Session Attacks
Tools & Testing
- Testing Methodology
- Tool Reference
Case Studies
- Case Studies Index
Quick Reference
Authentication Attack Priority
| Attack Type | Payout Range | Difficulty | Your Agent |
|---|---|---|---|
| Account Takeover (Full) | $10K-$100K | Hard | h1-auth-agent |
| Password Reset Poisoning | $5K-$20K | Medium | h1-auth-agent |
| OAuth Token Theft | $5K-$15K | Medium | h1-auth-agent |
| JWT Algorithm Confusion | $3K-$10K | Medium | auth_specialist.py |
| 2FA Bypass | $5K-$25K | Hard | h1-auth-agent |
| Session Fixation | $1K-$5K | Easy | h1-auth-agent |
Authorization Attack Priority
| Attack Type | Payout Range | Difficulty | Your Agent |
|---|---|---|---|
| Horizontal IDOR | $5K-$50K | Medium | h1-auth-agent |
| Vertical Privilege Escalation | $10K-$50K | Hard | h1-auth-agent |
| Missing Function-Level Access | $3K-$15K | Medium | h1-auth-agent |
| Mass Assignment | $1K-$5K | Easy | h1-api-agent |
Key Principles
Authentication Security (OWASP)
- Password Requirements
- With MFA: Minimum 8 characters
- Without MFA: Minimum 15 characters
- Maximum: At least 64 characters
-
Allow all characters including unicode/whitespace
-
MFA Effectiveness
-
"Prevents 99.9% of account compromises" - Microsoft
-
Session Management
- Regenerate session ID after authentication
- Minimum 64 bits of entropy
- HttpOnly, Secure, SameSite cookie flags
Authorization Security (OWASP)
- Core Principles
- Deny by default
- Validate on every request
- Server-side validation only
-
Least privilege
-
Preferred Models
- ABAC (Attribute-Based) over RBAC (Role-Based)
- ReBAC (Relationship-Based) for complex hierarchies
Testing Checklist
AUTHENTICATION TESTING
□ Test for username enumeration
□ Check password policy enforcement
□ Test account lockout mechanism
□ Verify session token randomness
□ Check for default credentials
□ Test password reset flow
□ Test JWT implementation
□ Test OAuth redirect_uri
□ Test 2FA bypass methods
AUTHORIZATION TESTING
□ Test all IDs for IDOR
□ Test horizontal privilege escalation
□ Test vertical privilege escalation
□ Check admin endpoints with user tokens
□ Test HTTP method variation
□ Check for mass assignment
□ Verify consistent authorization
Navigation
- Previous: 00_foundation
- Next: 02_api_security
- Main: Knowledge Base README
Practical Examples
Practice examples coming soon. Check the Certs section for related labs.
Test Questions
What are common authentication vulnerabilities?
How does session fixation work?
What should happen to session ID after login?
Test Your Knowledge
Review these flashcards to reinforce your understanding
What are common authentication vulnerabilities?
Tap to reveal
How does session fixation work?
Tap to reveal
What should happen to session ID after login?
Tap to reveal