Subdomain Takeover using HerokoDNS [http://labs.mozilla.com/ ]
Categories
(Websites :: Other, defect)
Tracking
(Not tracked)
People
(Reporter: mail, Unassigned)
References
()
Details
(Keywords: reporter-external, sec-moderate, wsec-takeover, Whiteboard: [reporter-external] [web-bounty-form] [verif?])
Hi, my automated tool discovered that subdomain and took it over today in the morning.
The error lies within the forgotten CNAME, whoch currently points to:
labs.mozilla.com. 60 IN CNAME labs.mozilla.org.
labs.mozilla.org. 3600 IN CNAME terrestrial-silverfish-e4aodj749otblca25l9owt3h.herokudns.com.
The second one was overtaken by me some minutes ago. I pushed a simple poc:
Security impact:
Especially a subdomain like labs indicates a site where one may found some beta downloads - an attacker could easily create a fake download firefox website and get people to download that version (including his malware). Additionally subdomain takeovers may be leveraged to steal cookies which are scoped to the top level domain, abused for blackhat seo, ...
Best regards, Damian
| Reporter | ||
Comment 1•7 years ago
|
||
That subdomain is listed on different other mozilla domains:
https://hg.public.mdc1.mozilla.com/
https://hg.mozilla.org/
| Reporter | ||
Comment 2•7 years ago
|
||
Ah, btw, the poc contains a html comment as proof.
So please use: view-source:http://labs.mozilla.com/
Additionally I added a simple log (request url, time) to get an idea if this domain is used somewhere else. And it turns out - yes. There are regular requests to it, so an attacker could infect users with malware etc.
Comment 3•7 years ago
|
||
mail: thanks for your report, I've raised this internally for assistance. We'll get back soon.
Comment 4•7 years ago
|
||
Dan: is this domain still used? If so, we need to re-establish ownership of the domain in Heroku or just simply nuke the DNS entry for it.
| Reporter | ||
Comment 5•7 years ago
|
||
Hey, since I claimed that subdomain the first option wont work. The valid solution is to remove cnames from that kind of subdomains - thats the only way to prevent a future subdomain takeover. Of course we can coordinate some kind of "i remove, you add the app on heroku".
Comment 6•7 years ago
|
||
(In reply to mail from comment #5)
Hey, since I claimed that subdomain the first option wont work. The valid solution is to remove cnames from that kind of subdomains - thats the only way to prevent a future subdomain takeover. Of course we can coordinate some kind of "i remove, you add the app on heroku".
mail: I see three options usually (1) we nuke the DNS and it goes away or (2) we decide we want to keep it on heroku and work with you on making that hand off (which I hope you're cool with because it's easiest) or (3) we decide to keep it with Heroku and work with them at the account level to have it returned to our control. It's really to Dan (I think) who has some authority over this domain to provide his wishes. Once we hear back, we'll know what path to take.
| Reporter | ||
Comment 7•7 years ago
|
||
Yes, of course, just tell me how to handle that. I dont want that domain in my account forever since it costs (has traffic, ...)
I just added mozille.com to my tool and it automatically found it in the morning. I usually only do bug bounties via hackerone or bugcrowd, but since mozilla also has a RD program, I just added it ;)
Comment 8•7 years ago
|
||
(In reply to mail from comment #7)
Yes, of course, just tell me how to handle that. I dont want that domain in my account forever since it costs (has traffic, ...)
I just added mozille.com to my tool and it automatically found it in the morning. I usually only do bug bounties via hackerone or bugcrowd, but since mozilla also has a RD program, I just added it ;)
mail: no worries, we're glad to have your contributions here! Once we hear back from Dan we can set a course. Glad you're here!
Comment 9•7 years ago
|
||
Damian: apologies for calling you mail, just realized your signature from comment 0.
| Reporter | ||
Comment 10•7 years ago
|
||
Haha, no problem. Thanks for the reminder, changed it to my name :P
Comment 11•7 years ago
|
||
Dan and I just discussed this on Slack and we would like to get the Heroku claim (#2 from comment 6). This arose because we had only .org/.com (but not the other claimed in Heroku).
Damian: would you mind releasing the claim in Heroku for that vhost you claimed and NI Dan so we knows he can reclaim it?
| Reporter | ||
Comment 12•7 years ago
|
||
Hi, I released it a second ago! You should be able to claim it.
Comment 13•7 years ago
|
||
claimed and confirmed working. Thank you.
Updated•7 years ago
|
Updated•7 years ago
|
| Reporter | ||
Comment 14•7 years ago
|
||
Hi, what are the next steps?
Comment 15•7 years ago
|
||
(In reply to Damian Schwyrz from comment #14)
Hi, what are the next steps?
Damian: We meet weekly for bounty decisions, you'll likely hear back from us on Monday EOD US-time.
| Reporter | ||
Comment 16•7 years ago
|
||
Awesome, thank you, have a great week + weekend.
Comment 17•7 years ago
|
||
Reporter, how would you like to be credited on the hall of fame? If you have some place you'd like us to link to, we can do that as well.
Thanks!
| Reporter | ||
Comment 18•7 years ago
|
||
Hey, please use my full name "Damian Schwyrz" and link it to my current website: https://www.damianschwyrz.de (that will get a complete redesign in 19 days with a more it sec specific touch! :))
Updated•7 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Description
•