Mekkawy's Profile

Hacking, Developing.

View on GitHub

Account Takeover Through OAuth CSRF

How:

The application I was testing provides a login through google, Microsoft, slack, zoom, and others, but it provides also for the user to link his account with zoom, slack, or other applications, so what did I find?

alt text

So as you can see when a client application tries to make an OAuth request to the OAuth provider it sends a parameter called state, this parameter is responsible for indicating which user established this request, so after the user gives the consent to the client application the OAuth provider or server sends the user back to his client application with the same state value in the URL after this the client application check this value is the same to the value that this user created when initializing the OAuth request.

But what if the application didn’t check the state value, this means that the application can’t make sure that the response definitly came from the same the OAuth request flow, so let’s remember our application says that I can link my account with a zoom or Slack then I can log in using my Zoom or slack account so all I need to do is to make the user link his account to my Zoom account and by this, I can log in to the victim account using my Zoom account.

So let’s track the OAuth flow:

Range Hall Of Fame : https://www.range.co/security/hall-of-fame (as Mekky)

My Info

Intigriti : https://app.intigriti.com/researcher/profile/mekky

Yeswehack : https://yeswehack.com/hunters/mekky

Linkedin : https://www.linkedin.com/in/muhammed-mekkawy-1504821b2/

Twitter : https://twitter.com/Mekky49295157