Google VRP : oAuth token stealing.

Hey guys!ย hope you all doing well :), In June/July i decided to hunt on Google Products, As Google have almost everything in scope so i gone though list of Google products/fully integrated acquisitions. ( ), Waze is one of Google’s Fully integrated acquisitions (There’s difference b/w integrated and non-integrated). So i decided to give it a try ๐Ÿ™‚

I was looking at Waze iOS app and there was an option to login with Twitter, Show i started capturing requests, The URL was like this;

(not exactly this, feeling lazy to checkout again :P)

The flow works in same manner like `Authorization Code flow` as Twitter don’t have `Implicit flow` (as far as i know)

1 – GET Request toย

2 – 302 Response toย


Luckily yes it was vulnerable to open redirect we won the battle already ๐Ÿ˜€ but wait we’re working with twitter `oauth_veriifier` which is not very usable from attacker perspective. Also twitter requires us to authorize app everytime :/ย looking at ‘id’ , seems some more social connect possible, so i checked out android app as well and found facebook, linkedin are also there. Started testing on android, the flow for Facebook was completely different here. I started fuzzing around the old url, tried to replace Twitter to Facebook.

GET Request –ย

Response – 500 Error ๐Ÿ™

But wait i seen many apps working in this pattern /social/*connection_name*/connect , Lets give it a try.

GET –ย

Response -302 :DDDDD,

Changed ?redirect= ย and response_type=token,signed_request

Final PoC :,signed_request&return_scopes=true&scope=email,user_friends,user_events

Response –

Although this was a fully integrated acq. i got less bounty ๐Ÿ˜› as they still consider it as acquition FOR bounty purposes ๐Ÿ™

But its okay! atleast i learned one thing, If they don’t give you endpoint, try to guess it 3:)

I hope you like it. ๐Ÿ™‚

Cheatsheet : Open Authentication – oAuth

Hey guys! I hope you all doing well, So today we’re going to discuss about oAuth and its bad implantation ๐Ÿ™‚

– What is oAuth ?

– IOAuth 2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service, such as Facebook, GitHub, and DigitalOcean. It works by delegating user authentication to the service that hosts the user account, and authorizing third-party applications to access the user account. OAuth 2 provides authorization flows for web and desktop applications, and mobile devices.

Visit (a must read) and learn oauth working before starting testing in it ๐Ÿ™‚ 

What’re the common bugs left in oAuth implantation ?

– Redirect URL bypass
– ClickJacking 

1 – XSS 

It is possible to get both reflective and stored XSS using oAuth in developers portal of your target ๐Ÿ™‚
lets discuss how it is possible, Sometimes the value for “redirect url” is filtered for http(s) links only and hence you fail to add javascript:alert(10) in redirect url but this can be bypassed if it is not properly validating .

Payload : javascript://

Description :
As mention in previous post;
javascript:                        – Javascript’s pseduo protocol/schema
//                                       – Begins a single line comment in js – comment itself
%0a                                  – Intiate a new line which ends the single line comment
alert(1)                             – a valid javascript’s predefined function

Now this can trick the url validation and accepts this value in redirect url, now you can use
&redirect_uri=javascript:// write&state=kkkk

And bhoom XSS’ed after client app grant access, but wait what more malicious you can do here is stealing the access token given by Authorization Server. ๐Ÿ™‚

There is another way for XSS is using, data uri
You can give a try to : data:text/html;base64,PHNjcmlwdD5hbGVydCgiWFNTIik8L3NjcmlwdD4= in redirect url value ๐Ÿ™‚ it may work too. (His blog is awesome ๐Ÿ˜‰ )

2 – Redirect URL bypass

Now this one is really vast,  what if you can bypass the redirect url set by developer ? that would be awesome cause you can again steal access token ๐Ÿ˜‰ is set by developer then you can bypass it if the oauth implantation is not configured well from bypasses,
some of the good bypasses are following

Source :


Must read : (Awesome)

Another must read : (Mind blown)

3 – CSRF 

Client app approval page where you grant access to a client app sometimes vulnerable to CSRF which can be used by attacker to force victim to approve attackers app with some dangereous scope access.

3 – ClickJacking 

Client app approval page where you grant access to a client app sometimes vulnerable to ClickJacking which can be used by attacker to trick victim to approve attackers app with some dangereous scope access. Recently my 2 bugs got validated same like this ๐Ÿ˜‰ 

This are just some common issues there are many issues left in oauth implantation find out them ๐Ÿ˜€ and make money ๐Ÿ˜‰