How to do local services safely
How to do local services safely
Posted Jun 11, 2025 18:14 UTC (Wed) by mathstuf (subscriber, #69389)In reply to: How to do local services safely by xav
Parent article: Covert web-to-app tracking via localhost on Android
Posted Jun 11, 2025 21:18 UTC (Wed)
by fraetor (subscriber, #161147)
[Link] (7 responses)
In the case of this specific proposal, perhaps you don't mind facebook.com in your browser talking to the Facebook app, but would for other origins.
Various cross-site request forgery prevention mechanism exist to prevent a random site from affecting another site, but in this case the localhost server wants to be affected, which means you would have to prevent the entire request.
A static permission on the app sounds like a sensible step, as it would allow app store review to catch malicious code while still allowing origins to opt-in.
Posted Jun 12, 2025 5:29 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link]
Posted Jun 15, 2025 16:26 UTC (Sun)
by KJ7RRV (subscriber, #153595)
[Link] (5 responses)
> Do you want to allow facebook.com/legit-site-with-ads.com/sketchy-site.com to connect to the Facebook app on your phone? Tap "Deny" unless there is a clear reason that you understand why this is needed, because this can enable trackers to break privacy protections and see your activity across the Internet.
> [Protect my privacy: *Deny*]
Posted Jun 15, 2025 16:47 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link] (4 responses)
Posted Jun 15, 2025 17:40 UTC (Sun)
by notriddle (subscriber, #130608)
[Link] (2 responses)
Posted Jun 15, 2025 18:44 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Jun 15, 2025 19:11 UTC (Sun)
by johill (subscriber, #25196)
[Link]
Posted Jun 16, 2025 8:46 UTC (Mon)
by farnz (subscriber, #17727)
[Link]
If I were implementing this, I'd implement two things:
With this in place, API 1 lets the browser prompt you before you connect. API 2 lets the browser drop the connection and warn the user that the applications identified by API 1 and API 2 are potentially malicious before transferring data, thus deterring "clever" ideas around transferring a socket between applications.
How to do local services safely
How to do local services safely
How to do local services safely
> [I understand the risk; *Allow*]
How to do local services safely
How to do local services safely
How to do local services safely
How to do local services safely
The system as a whole knows (if nothing else, the kernel knows the process that's got the socket open), and thus Android could provide an API that maps from local socket to Android application that has the socket open.
How to do local services safely