-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check sender ID in the Dart Debug Extension #2289
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
If I understand correctly MessageSender.id can be spoofed when a contentscript is injected it would need to use origin or url |
Oh interesting, can you point me to documentation about that? I was referencing https://chromium.googlesource.com/chromium/src/+/master/docs/security/compromised-renderers.md#messaging (linked in the issue you filed):
|
I think its the "an extension id which can differ from the origin when the message is sent from a content script" as from what can tell threes no way to know the difference between a content script and a compromised renderer think its connected to this bug https://bugs.chromium.org/p/chromium/issues/detail?id=982361 "Compromised web renderer should be unable to spoof MessageSender.id if it never run a content script from the given extension" maybe the documentation could do better its not clear I just doing it myself and look to work this way. |
Hmm interesting - it looks like that bug has been fixed and the documentation updated: https://bugs.chromium.org/p/chromium/issues/detail?id=982361#c57 In any case, I'm fine with also checking the origin. |
Well the title does say "if it never run a content script from the given extension" which I think this extension currently registers a content scripts on all URLs so that defense won't work. Anyway if you check the origin it won't matter. |
Some notes:
|
Thanks! That the Once we migrate over to MV3, we will be using |
Using something like I think an alternative fix would be to modify content_scripts to not be detecting all_urls maybe simpler. |
Thanks! Checking the Regarding injecting content scripts into every tab (all_urls), this is necessary to detect whether the tab contains a Dart app or not. |
Seems like listening on a custom host other then googlers.com would no longer be allowed. Not necessarily a bad thing since anything not on localhost is exploitable via a MITM attack. I guess if someone's on corp they get a free uxss by doing an attack on a http:// googlers.com URL, nice feature. |
Fixes #2287