|
|
|
|
|
by jussij
969 days ago
|
|
Can someone with OAuth expertise explain this issue in a few more details, as I've read the blog a few times, but still don't understand the actual vulnerability. From my very limited OAuth knowledge isn't this how it works: 1. The Harvest application asks Microsoft to verify a user.
2. The user is verified by Microsoft.
3. If the user verification is successful Microsoft redirects back to the callback URL, passing back the access token inside the body of the response message. In this case hasn't the writer of the blog just created a hand-crafted URL so that the return is back to example.com rather than the actual return URL? |
|
That url allows you to link someone to a login.microsoftonline.com link, have a login prompt show up that says "login to harvestapp", and then have the attacker be able to gain permissions related to your real harvestapp account.
Normally, this would not be possible. The attacker with example.com could register a new app that does redirect to example.com, but that would not give them an access token with permissions related to harvestapp, so it would not be useful.
The oauth app, on microsoft's end, has a whitelist of valid redirects, so an attempt to do something like "login.microsoftonline.com/authorize?client_id=$harvestAppID&redirect_uri=attacker.com" will error out on microsoft's side, since that is not a valid redirect uri to receive an access token.
The attack is only possible because there's a valid "outlook-integration.harvestapp.com" URL, which receives the access token, but then also redirects to the attacker's site and gives them the access token too.