Live data from Hacker News

Public Suffix List Problems

github.com

11–16 of 16 posts

Re: Public Suffix List Problems

#11
post #8

Earlier quoted context omitted.

No thanks. There are already too many DNS lookups and TCP connections a user-agent has to make in 2019: - OCSP if not stapled. - IPv4/IPv6 racing/Happy Eyeballs. - Encrypted SNI (DNS lookup). - Certificate Transparency: some Chrome builds are now querying logs to confirm embedded SCTs (if I understood correctly). and now: - Related Domains by DNS (draft-brotman-rdbd-02), or whatever replaces the PSL. RDBD would have…

DNS requests don't need to be serial, blocking load, its easy to issue a burst of them at once. Virtually every user agent is already doing this I don't see the downside of that. Not sure why you feel there is arbitrarily "too many", do you have a concrete objection?

Extra queries are a gamble that you don't encounter latency on any of the important ones, right? For example, on mobile data when you're hitting packet loss.

I'm not so fussed about extra queries when they do not delay the user. But if we send out a RDBD query that a resolver doesn't respond to in a speedy manner, what does the user-agent do if it needs to decide how to scope a cookie? You can't exactly soft-fail something like that ...

Re: Public Suffix List Problems

#12
I have a button to clear the current domain's cookies so I use the PSL to determine the eTLD so I don't blow away unrelated cookies but also not limited to whatever sub-domain I'm currently on.

Not sure how to do this without the PSL after reading the post.

Re: Public Suffix List Problems

#13
post #4
post #3

Earlier quoted context omitted.

Can you elaborate what the implications are? Is the attack something like a malicious site operator cnameing subdomain.evil.com to yourbank.com and which can then be accessed from evil.com? Same origin policy would still block that right?

Not sure if that's what GP is referring to, but one thing it would do is increase your attack surface... If I setup bank.mycompany.com and discourse.mycompany.com as CNAMEs, bank.mycompany.com now sets a cookie at mycompany.com, and discourse.mycompany.com is hacked.. the latter could be used to read the cookies from the first. Which wouldn't have happened without the CNAMEs, or if my company.com was on the PSL. Lots…

That has no relation to the use of CNAMEs—this problem exists even if CNAME records aren’t used.

If “z” is a public suffix, x.y.z can set and read cookies from x.y.z and y.z, but not z. Whether this is possible has nothing to do with whether x.y.z is a CNAME.

Re: Public Suffix List Problems

#14
post #3

Ouch. I don't think many people consider implications of cnameing blog.example.com to blogspot.com and store.example.com to shopify.com and chat.example.com to discord.com, etc.

Can you elaborate what the implications are? Is the attack something like a malicious site operator cnameing subdomain.evil.com to yourbank.com and which can then be accessed from evil.com? Same origin policy would still block that right?

The only implications of which I’m aware are in relation to web servers that serve the same content regardless of the Host header. It is then possible for someone to log into and interact normally with the website, but the cookies will be associated with the domain controlled by the attacker. The attacker can then change where the domain points later and retrieve the cookies.

This sort of attack is rather obscure, though. It’s a lot more effective to create a phishing site with just a log in form—or, if you want to get fancy, even proxy everything directly from the real website. You can then steal passwords immediately, rather than stealing session cookies after-the-fact. This works even against servers that pay attention to the Host header.

Edit: After re-reading the relevant portion of the article, I believe the author is referring to something similar to this invalid scenario:

1. Alice operates a web store at alice.example.

2. To make purchases, alice.example makes HTTP requests to api.alice.example from within the browser.

3. api.alice.example doesn’t pay attention to Host headers.

4. Mallory operates a malicious website at mallory.example.

5. Mallory cannot make requests to api.alice.example from mallory.example—that would break the same-origin policy. She works around this by configuring api.mallory.example as a CNAME to api.alice.example.

6. Bob has an account at alice.example, and is currently logged in.

7. Mallory tricks Bob into visiting mallory.example.

8. The content loaded by mallory.example makes a request to api.mallory.example indicating that Bob is making a purchase.

This doesn’t work—Bob is safe, and Mallory doesn’t score any loot. When the browser makes the request to api.mallory.example, it will pass cookies from api.mallory.example and mallory.example, not api.alice.example and alice.example. The browser pretends it has no idea that api.mallory.example and api.alice.example point to the same server.

In order for this to work, Bob would need to log in again, but this time at mallory.example—and this brings us back to my original point; it’s easier and more effective to set up a standard phishing page without any CNAME shenanigans.

While I agree with most of the author’s points, this one baffles me. I don’t see any realistic security implication of what the author has described in this scenario. There are theoretical implications, but in every case it seems there are far easier and more effective attacks. Furthermore, it’s nearly impossible to solve the problem described here; the proposed solutions the author mentions for replacing the Public Suffix List don’t resolve the CNAME threat I’ve described.

Edit 2: I’ve opened an issue asking for clarification: https://github.com/sleevi/psl-problems/issues/4

Re: Public Suffix List Problems

#15

What would make a lot more sense is a DNS mechanism for domains to indicate their subdomains are trusted/untrusted with parent domain cookies, possibly with a white/blacklist mechanism. It would be a lot more manageable than some centralized list that tries to capture every user controllable content domain on the internet.

This has been a common suggestion since before the Publix Suffix List existed, as you can see from the linked issues in the text (and the references to the IETF DBOUND WG).

Like most things, on first glance, it seems like it does make sense. Except it has a lot of issues, which you can see have been discussed for 15 years without resolution, even though yes, it would scale better.

Re: Public Suffix List Problems

#16
post #14
post #3

Earlier quoted context omitted.

Can you elaborate what the implications are? Is the attack something like a malicious site operator cnameing subdomain.evil.com to yourbank.com and which can then be accessed from evil.com? Same origin policy would still block that right?

The only implications of which I’m aware are in relation to web servers that serve the same content regardless of the Host header. It is then possible for someone to log into and interact normally with the website, but the cookies will be associated with the domain controlled by the attacker. The attacker can then change where the domain points later and retrieve the cookies. This sort of attack is rather obscure, th…

The author responded: https://github.com/sleevi/psl-problems/issues/4#issuecomment...
Post reply on HN