Hope you all are Good, This is my first write-up about how i gain access to a company's(dev.to) fastly account.
One Day I got email that dev.to is going to open source on Github.
Previously I've found a critical account takeover bug in dev.to via stored XSS and get rewarded(Write-up later), Since I have account in dev.to that's why I receive this mail.
Now Let's get started.
Email From dev.to
Now I was damn sure that there is something that the developer's missed while making dev.to project open source in Github, first i visited their Github project at https://github.com/thepracticaldev and start searching manually for secret key's, private key's and Api key's, When searching for Api key I encountered with cache_buster.rb which is leaking the fastly Api key like this.
Dont't waste your time this is not an exact fastly api key let's move on.
Now it's time for fastly api key, how to use this api key. Then I have search for fastly api in google and encountered with fastly docs at https://docs.fastly.com/api/auth which shows how to get sensitive details. The documentation consists of different api endpoints /tokens, /customer/id/tokens and many more.
I simply created a working POC to List all tokens belonging to the authenticated user like this below and send the detailed report to them.
"id":"5Yo3XXnrQpjc20u0ybrf2g","user_id":"4y5K5trZocEAQYkesWlk7M","services":[],"name":"my_token","scope":"global","created_at":"2016-06-22T03:19:48+00:00","last_used_at":"2016-06-22T03:19:48+00:00","expires_at":"2016-07-28T19:24:50+00:00","ip":"127.17.202.173","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"}]
This will list all the token belongs to the authenticated users. There are many endpoints like this.
1.List all tokens belonging to a specific customer
GET/customer/id/tokens 2.Get a single token based on the access_token used in the request.
GET/tokens/self
And Many more endpoints are listed athttps://docs.fastly.com/api/auth , I reported this issue to them they responded quickly and fix this within 6 days.
Hey, Guys Hope you all are doing well. I started my journey in bug bounties around 1.5 years ago, and I am thankful to all the members of security community who share their knowledge to the community. I have learned a lot of things from them and I am still learning new things daily from fellow hackers, hacking is a continuous process and ultimately reflects a state of mind. I have received a lot of messages from people's asking me how to start, where to start in bug bounties. So I have decided to write a blog which contain as much information which helps for beginners. Quote- "Hacking is a lifelong Journey of Learning " Table of Content Introduction Reading Practicing Connect with community Ask Questions Motivation Certifications Conclusion Introduction What is bug bounty? To get a basic understanding of the role, the name itself is quite self-explanatory. A bug bounty hunter looks for bugs in applications and platforms, which they later
Comments
Post a Comment