Open Bug 1887877 Opened 2 years ago Updated 2 years ago

103 Early Hints can be used to break adblocking

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

People

(Reporter: kershaw, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

See the PoC here.
I copied some text from it below:

The core idea behind this proof of concept is the use of 103 Early Hints response. By sending early hints prior to the actual response, the server 
can determine whether an adblocker is present based on the client's handling of these hints. If adblock is detected, the server can then serve an 
alternative page. This method is particularly effective because it doesn't depend on JavaScript, which can be disabled or manipulated by users.
Blocks: earlyhints

Hi Manuel,

We though this could use the opinion of someone on the privacy team 🙂
This only affects a small subset of users who disable javascript. Even then I expect there are ways of detecting an adblocker with iframes and meta refresh.
Let me know if anyone has any concerns about it - otherwise we can put it in the backlog.

Flags: needinfo?(manuel)

Chrome does not allow adblockers to interact with resources loaded using early hints

Adblockers not being able to interact with resources loaded using Early Hints is a shortcoming of Chrome. The same attack can be archived with HTTP-Link headers:

HTTP 200\n\r
Link: <...>\n\r
\n\r # Now wait and do the same stuff the PoC does

Early Hints makes it easier, because you can send Link headers isolated from all the other headers.
One way to aid adblockers is to provide the possibility to block requests to the DOM, but still make the network requests. I think it is likely that we already have such an API (by allowing adblockers to modify data provided in OnDataAvailable).

But this ends up being an arms race between adblock writers and anti-adblock detection script writers.

If this provides a too big attack surface and/or Early Hints remain largly unused, we could consider disabling Early Hints Preload again. But I don't think we are at a point yet. If anyone finds a website abusing this, that would be interesting to see as a comment here.

Lets put it into Necko backlog for now.

Flags: needinfo?(manuel)
Priority: P2 → P3
Whiteboard: [necko-triaged][necko-priority-new] → [necko-triaged]
You need to log in before you can comment on or make changes to this bug.