Closed Bug 1523524 Opened 7 years ago Closed 7 years ago

Subdomain Takeover using HerokoDNS [http://labs.mozilla.com/]

Categories

(Websites :: Other, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

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:

http://labs.mozilla.com/

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

Flags: sec-bounty?

That subdomain is listed on different other mozilla domains:
https://hg.public.mdc1.mozilla.com/
https://hg.mozilla.org/

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.

mail: thanks for your report, I've raised this internally for assistance. We'll get back soon.

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.

Flags: needinfo?(dbrown)

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".

(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.

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 ;)

(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!

Damian: apologies for calling you mail, just realized your signature from comment 0.

Haha, no problem. Thanks for the reminder, changed it to my name :P

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?

Flags: needinfo?(dbrown) → needinfo?(mail)

Hi, I released it a second ago! You should be able to claim it.

Flags: needinfo?(mail)

claimed and confirmed working. Thank you.

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Group: websites-security

Hi, what are the next steps?

(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.

Awesome, thank you, have a great week + weekend.

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!

Flags: sec-bounty?
Flags: sec-bounty-hof+
Flags: sec-bounty+

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! :))

Keywords: sec-moderate
You need to log in before you can comment on or make changes to this bug.