|
|
Subscribe / Log in / New account

Crossing security domains

Crossing security domains

Posted Jun 11, 2025 15:39 UTC (Wed) by farnz (subscriber, #17727)
In reply to: How to do local services safely by fraetor
Parent article: Covert web-to-app tracking via localhost on Android

The underlying problem here is that you're silently crossing security domains. You think you're accessing https://news-site.example.com/, but you're actually accessing both https://news-site.example.com/ and something on localhost (in the case of Yandex, a HTTPS listener, in the case of Meta, a STUN listener).

I'd therefore guess that you could restrict this sort of exploit without completely prohibiting access to local services in a similar way to the way that you can't use file:/// URLs in a document served over HTTPS. You'd have rules that say things like "if you fetched the top-level document over loopback, then you can also connect to services over loopback. Otherwise, traffic over loopback interfaces is blocked"; then, if I set up the DNS label my-service.example.com to point to a loopback address, and I have my app listen to loopback, you can go to https://my-service.example.com/ and have access to loopback services, but if you instead navigated to https://new-customer.example.com/ (connecting over the network to my webserver), you'd have no access to loopback services, even if you accessed them via the name my-service.example.com.

This would let a legitimate app serve up a web page locally that you could use to access loopback services, but would prohibit me from doing so from a remote site; I'd have to set up a local proxy, and have the browser UI show that you're accessing something like https://my-service.example.com:12345/proxy/new-customer.example.com/site/etc

You're still not fully protected, but it at least stops malicious actors doing this stealthily.


to post comments

Crossing security domains

Posted Jun 12, 2025 0:42 UTC (Thu) by wahern (subscriber, #37304) [Link] (2 responses)

Crossing security domains

Posted Jun 12, 2025 8:50 UTC (Thu) by farnz (subscriber, #17727) [Link] (1 responses)

That proposal does, unfortunately, run into the "prompt for insecurity" problem, which means that it doesn't fully block the described exploit - not least because sites using the exploit could socially engineer their way to local network access.

It's a distinct improvement, however.

Crossing security domains

Posted Jun 12, 2025 10:12 UTC (Thu) by Funcan (subscriber, #44209) [Link]

Any prompt stops mass attacks of this because at least some of the people promoted will be technically skilled enough to be suspicious and follow up


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds