Sec-88
  • 🧑Whoami
  • 🕸️Web-AppSec
    • Features Abuse
      • 2FA
      • Ban Feature
      • CAPTCHA
      • Commenting
      • Contact us
      • File-Upload
      • Inviting Feature
      • Messaging Features
      • Money-Related Features
      • Newsletter
      • Profile - Settings
      • Registration
      • Reset Password
      • Review
      • Rich Editor/Text
      • Social Sharing
      • Billing-Shipping Address Management
      • Integrations - Webhooks
      • API Key Management
    • Reconnaissance
      • Attacking Organizations with big scopes
    • Subdomain Enumeration
    • Fingerprinting
    • Dorking
    • XSS-HTML Injection
    • Improper Authentication
      • JWT Security
    • OAUTH Misconfigurations
      • OAuth 2.0 Basics
      • OAUTH Misconfigurations
    • Auth0 Misconfigurations
    • Broken Access Control
      • Insecure Direct Object References (IDOR)
      • 403 Bypass
    • Broken Link Injection
    • Command Injection
    • CORS
    • CRLF
    • CSRF
    • Host Header Attacks
    • HTTP request smuggling
    • JSON Request Testing
    • LFI
      • LFI to RCE
    • No Rate Limit
    • Parameters Manual Testing
    • Open Redirect
    • Registration & Takeover Bugs
    • Remote Code Execution (RCE)
    • Session Fixation
    • SQL Injection
      • SQL To RCE
    • SSRF
    • SSTI
    • Subdomain Takeover
    • Web Caching Vulnerabilities
    • WebSockets
    • XXE
      • XXE to RCE
    • Cookie Based Attacks
    • CMS
      • AEM [Adobe CMS]
    • XSSI (Cross Site Script Inclusion)
    • NoSQL injection
    • Local VS Remote Session Fixation
    • Protection
      • Security Mechanisms for Websites
      • Cookie Flags
      • SameSite Cookie Restrictions
      • Same-origin policy (SOP)
      • CSP
    • Hacking IIS Applications
    • Dependency Confusion
    • Attacking Secondary Context
    • Hacking Web Sockets
    • IDN Homograph Attack
    • DNS Rebinding Attack
    • LLM Hacking Checklist
    • Bypass URL Filtration
    • Cross-Site Path Traversal (CSPT)
    • PostMessage Security
    • Prototype Pollution
      • Client-Side Prototype Pollution
      • Server-Side prototype pollution
    • Tools-Extensions-Bookmarks
    • WAF Bypassing Techniques
    • SSL/TLS Certificate Lifecycle
    • Serialization in .NET
    • Client-Side Attacks
      • JavaScript Analysis
    • Bug Bounty Platforms/Programs
  • ✉️API-Sec
    • GraphQL API Security Testing
      • The Basics
      • GraphQL Communication
      • Setting Up a Vulnerable GraphQL Server
      • GraphQL Hacking Tools
      • GraphQL Attack Surface
      • RECONNAISSANCE
      • GraphQL DOS
      • Information Disclosure
      • AUTHENTICATION AND AUTHORIZATION BYPASSES
      • Injection Vulnerabilities in GraphQL
      • REQUEST FORGERY AND HIJACKING
      • VULNERABILITIES, REPORTS AND EXPLOITS
      • GraphQL Hacking Checklist
    • API Recon
    • API Token Attacks
    • Broken Object Level Authorization (BOLA)
    • Broken Authentication
    • Evasive Maneuvers
    • Improper Assets Management
    • Mass Assignment Attacks
    • SSRF
    • Injection Vulnerabilities
    • Excessive Data Exposure
    • OWASP API TOP 10 MindMap
    • Scanning APIs with OWASP ZAP
  • 📱Android-AppSec
    • Setup Android App Pentesting environment on Arch
    • Setup Android App Pentesting environment on Mac M4
    • Setup Android Pentesting Environment on Debian Linux
    • Android App Fundamentals
      • Android Architecture
      • Android Security Model
      • Android App Components
        • Intents
        • Pending Intents
    • Android App Components Security Cheatsheet
    • Android App Pentesting Checklist
    • How To Get APK file for application
    • ADB Commands
    • APK structure
    • Android Permissions
    • Exported Activity Hacking
    • BroadcastReceiver Hacking
    • Content Provider Hacking
    • Signing the APK
    • Reverse Engineering APK
    • Deep Links Hacking
    • Drozer Cheat Sheet
    • SMALI
      • SMALI Cheat Sheet
      • Smali Code Patching Guide
    • Intent Redirection Vulnerability
    • Janus Vulnerability (CVE-2017-13156)
    • Task Hijacking
    • Hacking Labs
      • Injured Android
      • Hacking the VulnWebView Lab
      • Hacking InsecureBankv2 App
    • Frida Cheat Sheet
  • 📶Network-Sec
    • Networking Fundamentals
    • Open Ports Security Testing
    • Vulnerability Scanning
    • Client Side Attacks
    • Port Redirection and Tunneling
    • Password Attacks
    • Privilege Escalation [PrevEsc]
      • Linux Privilege Escalation
    • Buffer Overflow (BOF)
      • VulnServer
      • Sync Breez Enterprize
      • Crashed CTF
      • BOF for Linux
    • AV Evasion
    • Post Exploitation
      • File Transfer
      • Maintaining Access
      • Pivoting
      • Clean Up
    • Active Directory
      • Basic AD Pentesting
  • 💻Desktop AppSec
    • Thin Client vs. Thick Client
  • ☁️Cloud Sec
    • Salesforce Hacking
      • Basics
      • Salesforce SAAS Apps Hacking
    • Firebase
    • S3 Buckets Misconfigurations
  • 👨‍💻Programming
    • HTML
    • JavaScript (JS)
      • window.location object
    • Python
      • Python Tips
      • Set
        • SetMethods
    • JAVA
      • Java Essentials
      • Java Essentials Code Notes
      • Java OOP1
      • JAVA OOP Principles
        • Inheritance
        • Method Overriding
        • Abstract Class
        • Interface
        • polymorphism
        • Encapsulation
        • Composition
      • Java OOP Challenges
      • Exception Handling
    • Go
      • Go Syntax Tutorial in one file
      • Methods and Interfaces
      • Go Slices
      • Go Maps
      • Go Functions
      • Concurrency
      • Read Files
      • Write Files
      • Package
        • How to make personal Package
        • regexp Packages
        • Json
        • bufio
        • Time
      • Signals-Exit
      • Unit Testing
  • 🖥️Operating Systems
    • Linux
      • Linux Commands
      • Tools
      • Linux File System
      • Bash Scripting guide
      • tmux
      • Git
      • Install Go tools from private repositories using GitHub PAT
    • VPS
    • Burp Suite
  • ✍️Write-Ups
    • Hunting Methodology
    • API BAC leads to PII Data Disclosure
    • Misconfigured OATUH leads to Pre-Account Takeover
    • Automating Bug Bounty with GitHub Actions
    • From Recon to Reward: My Bug Bounty Methodology when Hunting on Public Bug Bounty Programs
    • Exploring Subdomains: From Enumeration to Takeover Victory
    • 0-Click Account Takeover via Insecure Password Reset Feature
    • How a Simple Click Can Lead to Account Takeover: An OAuth Insecure Implementation Vulnerability
    • The Power Of IDOR even if it is unpredictable IDs
    • Unlocking the Weak Spot: Exploiting Insecure Password Reset Tokens
    • AI Under Siege: Discovering and Exploiting Vulnerabilities
    • Inside the Classroom: How We Hacked Our Way Past Authorization on a Leading EdTech Platform
    • How We Secured Our Client’s Platform Against Interaction-Free Account Thefts
    • Unchecked Privileges: The Hidden Risk of Role Escalation in Collaborative Platforms
    • Decoding Server Behavior: The Key to Mass Account Takeover
    • Exploiting JSON-Based CSRF: The Hidden Threat in Profile Management
    • How We Turned a Medium XSS into a High Bounty by Bypassing HttpOnly Cookie
Powered by GitBook
On this page
  • 1 Click Or 0-Click Account Takeover Due To Account Linking Misconfiguration In OAUTH
  • Self Registration in Loggin-Only Targets
  • Account Linking Misconfiguration in OAuth-Only Targets
  • Exploiting Email Normalization and Custom Database Configurations in Auth0 for Account Takeover

Was this helpful?

Edit on GitHub
  1. Web-AppSec

Auth0 Misconfigurations

PreviousOAUTH MisconfigurationsNextBroken Access Control

Last updated 1 month ago

Was this helpful?

1 Click Or 0-Click Account Takeover Due To Account Linking Misconfiguration In OAUTH

0-Click

  • The victim will create a account using the option “Log In with Google”

  • The attacker creates an account using the same email and a new password

  • Logged in Without confirmation

1-Click

  • Victim will receive a email to confirm the account

  • The attacker waits for the victim to click on the confirmation link and he will be able to log in using the password he set for the victim’s account

Self Registration in Loggin-Only Targets

  • Intercept Login Requests:

    • Enter random login credentials (any email and password) on the login page and intercept the request with Burp Suite.

    • Inspect the request structure and headers to confirm that it resembles an Auth0 request.

  • Modify the Request:

    • Send the intercepted login request to Burp Repeater.

    • Change the endpoint from /co/authenticate (or similar) to /dbconnections/signup.

    • Replace the username parameter with email, and set the realm parameter to connection.

    • Add parameters such as client_id, email, password, and connection if they’re not already present.

  • Send the Request:

    • In Burp Repeater, send the modified request.

    • Check for a 200 OK response and a response body indicating account creation, such as {"_id":"<id>","email":"<your-email>","email_verified":false}.

  • Test Access with New Credentials:

    • Use the credentials you specified in the signup request to attempt login on the application.

    • If successful, this confirms the misconfiguration, as you've bypassed the disabled signup restriction.

Account Linking Misconfiguration in OAuth-Only Targets

  1. Identify the Social Login Mechanism:

    • Access the login page of the target application and check for any social login options, like "Sign up with Google."

    • Note the primary email address used during the social login (e.g., using testacc2399@gmail.com).

  2. Create an Account Using Social Login:

    • Use the available social login option (like Google) to create an initial user account on the application.

  3. Intercept the Request to Identify the dbconnection:

    • Attempt to create a new account with the same email via the email/password method. If you encounter a failed response, intercept this request in Burp to analyze the dbconnection parameter.

    • Identify the correct dbconnection name for the application.

  4. Craft a Signup Request with dbconnection:

    • Using Burp Repeater, send a POST request to the Auth0 /dbconnections/signup endpoint.

    • Modify the request as follows:

      POST /dbconnections/signup HTTP/2
      Host: auth.<target_domain>.com
      Content-Length: 224
      Content-Type: application/json
      Origin: https://auth.<target_domain>.com
      Referer: https://auth.<target_domain>.com/
      
      {
        "client_id": "XXXXXXXXXXXXXXXXXXXX",
        "email": "testacc2399@gmail.com",
        "password": "testA@123",
        "connection": "app-prod-users",
        "credential_type": "http://auth0.com/oauth/grant-type/password-realm"
      }
  5. Verify Account Creation and Linkage:

    • Submit the request with the correct dbconnection and client ID.

    • Check for a successful response indicating the account creation for the same email.

  6. Test Access with Modified Authorization URL:

    • Try logging in with the newly created email/password by modifying the authorization URL to use dbconnection:

      https://auth.<target_domain>.com/authorize?client_id=<client_id>&response_type=token&connection=app-prod-users&prompt=login&scope=openid%20profile%20phone&redirect_uri=<redirect_uri>
    • Confirm if logging in with email/password redirects you to the original social login account, indicating an unintended account linkage.

Exploiting Email Normalization and Custom Database Configurations in Auth0 for Account Takeover

  1. Identify the Email Registration Endpoint:

    • Locate the target application's signup endpoint that uses Auth0, specifically for Email and Password authentication. This is where the potential vulnerability exists.

  2. Create a Primary Account:

    • Register an account with an email like victim@domain.com using a password such as Password123.

    • Confirm that you can log in with these credentials and access your account details.

  3. Attempt Registration with a Unicode Variant:

    • Construct an email address with a visually similar Unicode character. For example, change i to a Unicode dotless or dotted variant:

      • Example: Change victim@domain.com to vıctim@domain.com (with a dotted or dotless "i").

    • Try to register a new account with this email variant and a different password like Password456.

  4. Observe the Response:

    • If Auth0’s Get User Script does not normalize Unicode characters, it may allow the creation of this account without triggering a duplicate email error.

    • If the account creation is successful, Auth0 likely has a misconfiguration with email normalization.

  5. Test for Account Credentials Overwrite:

    • Log in with the Unicode variant email (vıctim@domain.com) using the password you set (Password456).

    • If this account gives you access to the original account details, Auth0’s Create User Script might be normalizing email addresses, leading to the overwriting of the original credentials.

  6. Confirm Account Takeover:

    • Check if both email variants (victim@domain.com and vıctim@domain.com) can log in, especially if each set of credentials provides access to the same user data.

    • This behavior suggests that Auth0’s inconsistent email normalization is causing an account takeover scenario.

🕸️
Account Takeover using "Log In with Google"Auth0 Community
How I Exploited an Auth0 Misconfiguration to Bypass Login RestrictionsMedium
Exploiting Auth0 Misconfigurations: A Case Study on Account Linking VulnerabilitiesMedium
Exploiting Auth0 Misconfiguration: A Case Study on Account Linking Vulnerabilities
AuthC Under Siege: Innovative Approaches to Penetrate Authentication Across All Layers | NotionDeepStrike on Notion
Logo
Logo
Logo
Logo
Logo