Live data from Hacker News

Covert web-to-app tracking via localhost on Android

localmess.github.io

191–200 of 356 posts

Re: Covert web-to-app tracking via localhost on Android

#191

Probably hard to do for many but the solution seems be not to have their apps installed. It’s crazy to me that people tolerate FB et al on their devices where you have absolutely no control over what they’re doing.

Reddit has fairly intense device fingerprinting. And they sell data for AI training.

Re: Covert web-to-app tracking via localhost on Android

#192

Earlier quoted context omitted.

> There are some semi-legitimate uses, like Discord using it to check if the app is installed by scanning some high-number ports (6463-6472) I would not consider this a legitimate use. Websites have no business knowing what apps you have installed.

I agree, yet at least you can kind of see where they're coming from. I guess a better example would be the automatic hardware detection Lenovo Support offers [0] by pinging a local app (with some clear confirmation dialogs first). Asus seems to do the same thing. uBlock Origin has a fair few explicit exceptions made [1] for cases like those (and other reasons) in their filter list to avoid breakages (notably Intel do…

> the official Judiciary of Germany [2] (???)

That's the e-ID function of our personal ID cards (notably, NOT the passports). The user flow is:

1. a client (e.g. the Deutsche Rentenversicherung, Deutschland-ID, Bayern-ID, municipal authorities and a few private sector services as well) wishes to get cryptographically authenticated data about a person (name and address).

2. the web service redirects to Keycloak or another IDP solution

3. the IDP solution calls the localhost port with some details on what exactly is requested, what public key of the service is used, and a matching certificate signed by the Ministry of Interior.

4. The locally installed application ("AusweisApp") now opens and displays these details to the user. When the user wishes to proceed, the user clicks on a "proceed" button, and is then prompted to either insert the ID card into a NFC reader attached to the computer or a smartphone in the same network as the computer that also has the AusweisApp attached.

5. The ID card's chip verifies the certificate as well and asks for a PIN from the user

6. the user enters the PIN

7. the ID card chip now returns the data stored on it

8. the AusweisApp submits an encrypted payload back to the calling IDP

9. the IDP decrypts this data using its private key and redirects back to the actual application.

There is a bunch of cryptography additionally layered in the process that establishes a secure tunnel, but it's too complex to explain here.

In the end, it's a highly secure solution that makes sure that only with the right configuration and conditions being met the ID card actually responds with sensitive information - unlike, say, the Croatian ID card that will go as far as to deliver the picture on the card in digital form to anyone tapping your ID card on their phone. And that's also why it's impossible to implement in any other way - maaaaybe WebUSB but you'd need to ship an entire PC/SC stack and I'm not sure if WebUSB allows cleaving an USB device that already has a driver attached.

In addition, the ID card and the passport also contains an ICAO compliant method of obtaining the data in the MRZ, but I haven't read through the specs of that enough to actually implement this.

Re: Covert web-to-app tracking via localhost on Android

#193

Is there a similar thing on iOS? I always wonder when a random app asks to “find devices on my network”

It’s probably easier to buy that data directly from Apple.

Google’s core business is built on tracking data, so they would be reluctant to sell, necessitating covert collection.

Re: Covert web-to-app tracking via localhost on Android

#194
Of course the ID was easy to abuse, and I assume Google knew this, and also knew they'd need to have rules against abuse... and that they'd need to back up the rules with penalties, like Play Store permaban, legal action for damages, and maybe even referral for criminal investigation (CFAA violation?).

Unfortunately, even if they did have such rules, in this case, Meta is a too-big-to-deplatform tech company.

(Also, even if it wasn't Meta, sketchy behavior of tech might have the secret endorsement of IC and/or LE. So, making the sketchiness stop could be difficult, and also difficult to talk about.)

Re: Covert web-to-app tracking via localhost on Android

#195
post #131

A comment I wrote in another HN thread [0] covering this issue: Web apps talking to LAN resources is an attack vector which is surprisingly still left wide open by browsers these days. uBlock Origin has a filter list that prevents this called "Block Outsider Intrusion into LAN" under the "Privacy" filters [1], but it isn't enabled on a fresh install, it has to be opted into explicitly. It also has some built-in exemp…

Your DNS server not resolving to localhost may also serve as an additional line of defense.

What does this have to do with the issue here? A website can just connect to 127.0.0.1 , no DNS needed.

I think what you are thinking of are dns rebinding attacks.

Re: Covert web-to-app tracking via localhost on Android

#197

*: Meta Pixel script was last seen sending via HTTP in Oct 2024, but Facebook and Instagram apps still listen on this port today. They also listen on port 12388 for HTTP, but we have not found any script sending to 12388. **: Meta Pixel script sends to these ports, but Meta apps do not listen on them (yet?). We speculate that this behavior could be due to slow/gradual app rollout. So, could some other app send data t…

Two ways to f#ck with these trackers - either send them nothing back, or flood them with lots of fake data.

Somebody also needs to come up with a way to peer to peer share advertiser tracking cookies.

Re: Covert web-to-app tracking via localhost on Android

#198
post #194

Of course the ID was easy to abuse, and I assume Google knew this, and also knew they'd need to have rules against abuse... and that they'd need to back up the rules with penalties, like Play Store permaban, legal action for damages, and maybe even referral for criminal investigation (CFAA violation?). Unfortunately, even if they did have such rules, in this case, Meta is a too-big-to-deplatform tech company. (Also,…

Google and Apple are owning their whole operating systems. They can do tracking directly in 50 different ways. Other corporations routinely renegotiate deals on sharing the user surveillance data with them, for big big money. So it all has already been paid for, and authorised. The only problem is that some stupid serfs are still making a fuss over it.

Re: Covert web-to-app tracking via localhost on Android

#200
Is there any reason for "normal" applications (not when people use a phone as a web server on purpose etc.) to listen to incoming connections? To me seems like something which should be blocked behind those well hidden developer options or similar and nothing an app can easily do.
Post reply on HN