210 comments

[ 4.3 ms ] story [ 181 ms ] thread
Recently I ran into a problem with my Bluetooth headphones. They support multipoint bluetooth audio, so they can be connected to my PC and phone at the same time. Opening the Aliexpress webpage causes a silent audio stream keeping the PC>headphone link active blocking my phone audio. An investigation reveals obfuscated code running device fingerprinting with a side effect being a silent audio stream that firefox, chrome and windows does not recognise but which kept the bluetooth connection active.
Is this an AI summary of the article?
No, I took the first sentence of my article and then edited the rest of the intro + conclusion to keep it short for HN.
You should make that obvious in some way like using “TLDR”. I assume many people, like me, would read attempt to parse your comment as a comment on the article, after all it’s in the comment section, and read that way it’s very confusing lol.
Sorry, this is my first post to HN and in the submission it looked like the description text i added would be part of the post header.
I was just about to highlight this particular HN quirk. I suppose a lot of people here only ever comment (or submit URLs without any text of their own) and aren't familiar with it.
HN's fault entirely. The post form is a misrep.
Don’t apologize. This was a very fascinating read, and a good technical write up, especially for you first even HN post. It’s not your fault others didn’t look at the username :)
Thanks for the feedback :D
HN's fault entirely. The post form's actioning "text" as a comment is remiss.
Ah, sorry I wasn’t aware of that either
Sorry, I didn’t realise you were the author
They shouldn’t have to make it “obvious”. They are the actual author of the article. It’s not their fault you didn’t double check the usernames. It’s not uncommon for authors to comment on their own articles.
No you are talking to the actual author of the article. It’s not weird for the author to comment on their own article
Concerning situation, I think. And I suspect (perhaps wrongly) that there are even more reasons for concern with technology that can track, capture, leak etc. information that's more sensitive or valuable, depending on how one wishes to look at it. Mobile phones, computers, routers etc. -- all have the potential to siphon out valuable information to a bad actor, especially when it comes to espionage, military, commercial etc. This has already happened at a significant scael, so it's not a remote scenario.

At the very least, governments and institutions should develop a framework to investigate all acquired technology. The community / civil society could also create something similar, a script that would analyse at a deep level everything that can be analysed with a piece of software even by a complete novice.

i'd argue that perhaps the ability to play audio should be permission gated, much like the ability to use webcam/microphone.

However, I'd bet that many people will gladly allow aliexpress to play audio as there are probably videos on the site that people want to play and listen to.

With that said, its possible that this can be only a use once permission. Even if I want to shop at aliexpress if I know they are doing this, I'll be more willing to be bothered every time I want to play a video with audio to approve it if this bothers me.

The ability to play audio can usually be permission gated with tab muting, however the methods aliexpress use bypass that mechanism completely.
This is the part you should be highlighting aggressively. That’s very uncomfortable
I would actually love if I could have iOS prompt me to allow certain apps to use the speakers. I hate using an app and suddenly have a video autoplay loudly.
This. This needs to be a thing.
To be fair, it shouldn't need to be a thing.

(One should really not tolerate such dodgy software).

I wish Android had this as well. There are apps where it's difficult-to-impossible to turn all sound off, and I wish I could just tell my phone that this app is just never allowed to use the speakers.
On Samsung Android phones there is a Samsung app that isn't installed by default that allows to individually manage volume/mute per app called SoundAssistant (and few more neat customizations for audio/audio controls).

I don't think many people know about it, it's made by Good Lock Labs which is basically a group of Samsung devs making advanced customization apps: https://galaxystore.samsung.com/detail/com.samsung.android.s...

You access the features from the OS volume control once installed, there's a "..." button.

Always wondered if that also works on non-Samsung phones, but it's quite useful to forever mute an app.

Inside iOS accessibility settings you can turn off “auto-play video previews.” This blocks perhaps 20% of video autoplay; it’s still better than nothing.

Philosophically I hate silent video autoplays just as much as I hate autoplays with audio. One distracts your visual attention, the other distracts your aural attention, and I don’t quite understand why society has normalized silent video autoplay.

Firefox allows to Block "Audio and Video" (or "Only Audio") from auto playing per domain, including on Mobile.
I noticed in the last few weeks that if I’d recently opened the AliExpress iOS app (ie. it was backgrounded) my car audio would freak out thinking I was giving it an audio command. Killing the AliExpress app immediately fixed the problem. After seeing it happen more than once I assumed it was something dodgey and uninstalled the app.
And that's OK with Apple's App review?
I'm wondering if the reviewers neglected to review the app while driving a car and listening to audio.
They let all sorts of stuff that they shouldn't in.

For instance, Meta and Google publish 'free' iOS libraries that firehose surveillance data back to them. The libraries are popular, so apps that use them must be allowed into the store despite taking them as dependencies.

If you can get access to .ipa files (I think you'd need to jailbreak -- apparently this stuff is encrypted by Apple) or packet sniffer, then you can get an idea of how bad it is for the apps you use.

This tool claims to do the sort of analysis I'm talking about (among other things), but I've never tried:

https://securitywall.co/tools/ipa-analyzer

They have been doing this for months.

No sound playing but the audio would change like the microphone was being activated. I checked permissions to make sure there was no mic access and figured that they were fingerprinting.

Just curious, why silent sound would allow fingerprinting? What are they sampling if it can't be heard?
The script generates a known waveform, it is passed through the browser's audio implementation and then the script analyses the result after. Based on your devices settings and hardware the output will be different, e.g. a PC with analog output might have 44KHz audio output bandwidth, but a bluetooth headset might have a lower, different audio bandwidth. That is a datapoint that can be used in device fingerprinting alongside screen and viewport dimensions, device pixel ratio, browser plugins, etc.
On the one hand, I wouldn't expect too many variations here (the vast majority of devices probably use 48 kHz and 24-bit output, a few use 44.1 kHz and/or 16-bit, etc.) but just like DPR and all the other properties with a very small set of popular values in practice, you only need a bit or two from each measurement to eventually have a high quality fingerprint.
What surprises me is that this (additional) fingerprinting is actually needed, in the sense of "don't they have enough from everything else"? Also, if I understood this blog post correctly [0], there is only 2 predominant values from this fingerprinting (?).

[0]: https://ritter.vg/blog-webaudio_alibaba.html

OP please submit the filter to an upstream uBlock filter list.
Will do! edit - How do i do this? through github issues? https://github.com/uBlockOrigin/uAssets/issues
Yes, that's the correct repo. Create an issue and mention the page and filters you created.
They said they aren't interested
chimed in... thank you for the great documentation!
I am glad people like the write up and it is fostering a conversation! It is such a happenstance that i looked into this.
You can also submit to the EasyPrivacy list or one of the AdGuard lists.
JS enabled by default seems every day less secure.
So many website break completely with JS disabled and you end up having to enable it half the time anyway.
It was pretty good until about six months ago. Since then loads of sites have added a js requirement to try to stop the AI bots.
About half of the time, when a website doesn't work with js disabled, I realize that I didn't want to see the page that badly anyway, and I close the tab.
IMO web browser have been enabling all sorts of obnoxious behavior since before JS. One of my all time favorites were the sites that opened pop-ups in a loop faster than you could close them while an audio clip of a guy yelling "Hey everyone! I'm looking at gay porn!" You had to hit reset. Fuck the Web.
The web around the late 90s and early 2000s had some really sketchy stuff. I think the difference is that it used to be the sleazy underbelly. Now it's accepted as mainstream.

My local 'newspaper' website is chock full of scam adverts. The print version is dignified. The website people, somehow, turn a blind eye.

And I got an advert on Youtube this week using sexually explicit language to sell pills.

Opening a popup needs JS though.
Not with the new popover API.
This doesn't look like it gives websites something they couldn't do before with CSS and JS.
I'm pretty sure it does but maybe I'm wrong, I had never tried to create popovers/popups using CSS. What's neat[†] about the popovers API is that it doesn't need any JS, you just write a couple of HTML attributes and voila, a popover/popup. They will run with JS disabled as well.

https://developer.mozilla.org/en-US/docs/Web/API/Popover_API...

[†] Neat for me building things like tooltips and dropdowns into my web apps without using JS; not neat for annoying people with popups.

The core trick to making a popover, tooltip, or, really, any kind of overlay element that's anchored to something on the page is putting an element with `position: absolute` inside one with `position: relative`. You can make it display on hover with CSS alone too, if you really want to.
I've seen this on many many other sites as well, most notably Twitter, and lots of common modern captcha pages too. Very annoying!
Browser fingerprinting can get creative at times, to say the least. eBay's WebSocket port scanner [1] and Reddit's abuse of DRM and JavaScript JIT exploits [2] from years ago are two examples of the kind of in-depth introspection you can perform completely in the background using nothing more than simple non-permission-gated APIs.

[1] https://blog.nem.ec/2020/05/24/ebay-port-scanning/

[2] https://iter.ca/post/reddit-whiteops/

Besides the privacy implications, they are also wasting our fucking batteries on this crap...
Another reason why Lockdown mode on iOS is your friend.
Another commenter mentioned here, they also do it on the iOS app and I don't see how Lockdown mode would change anything, it doesn't prevent to play audio.
Lockdown mode is great, but it breaks phone calls on your Apple Watch (found that out the hard way)
90% of this stuff should be illegal
Ah, so that's what Wolt (Doordash but in Europe) is doing.

I noticed that Voice Over (iOS screen reader) crackles and randomly changes volume when using the app, but I attributed it to standard iOS weirdness, and possibly misuse of some iOS API. Now I'm thinking that this may very well be fingerprinting.

Cloudflare challenges also use Web Audio, by the way.
Does it hold an audio stream open constantly or just briefly during the challenge? On AE it never stops
Just briefly during the challenge.
This is the reason I use adguard everywhere
I use ublock origin and by default it wasn't blocking, i had to make a custom filter to block the scripts in order for it to prevent the audio takeover. Maybe adguard does a better job? Someone else suggested just wholesale disabling of JS but it is the nuclear option.
With my previous hearing aid I noticed that visiting a wide variety of web sites would cause a change in the amplification of environmental noise. I always assumed it was doing something with Bluetooth, and probably not for a good reason. This is with an iPhone 13 and one Kirkland/phonak hearing aid.

I haven’t noticed this recently, but I also now have two newer Phonak hearing aids and a few iOS updates have happened. Maybe the silent Bluetooth shenanigans are less disruptive to my new aids or the programming is different. Surely shenanigans continue.

I wear Phonak CI processors. It's not just you. I've also experienced the volume drop on a few sites and apps. The Amazon iOS app does this. Each time I leave the app, ambient audio returns to normal.
It'd be interesting to see what a lawyer specializing in disability law would think of that.

At least in the US, I could see that being something that the ADA prohibits.

It seems far more likely that your cheap hearing aids are sensitive to certain RF frequencies and the background javascript is causing different patterns of load on the phone's CPU.

I would suspect that this only happens when you're charging and it is likely the charger or cable not being properly shielded.

The cheap hearing aid cost $750 for one and is substantially the same as the same thing sold from standalone audiologists for much more. These are not cheap over the counter devices.

Charging only happens while in the cradle, not while worn.

Hearing aids are not chargeable while you wear them? I'm not aware of any product like that.

For what it's worth, I have never experienced RF interference with a digital hearing aid. Sufficiently powerful RF/magnetic fields have sometimes caused the devices to reset, but I've had like a dozen models over some thirty years, none have ever turned into a radio receiver accidentally. Not even around high-powered AM radio transmitters.

There's basically nothing for an inductive signal to couple to in a modern hearing aid. RF interference was a minor issue with analog-primary amplification chains because such coupling was more common.

Perhaps Lucille's Ball's dental implant still haunts the collective unconsciousness.

> cheap hearing aids

I don't think you know what you are talking about

Audio is being generated and the BT device is prioritizing it by changing its internal mixer settings. Same as audio prompts over music in a car. This could be mitigated by detecting silence in the audio stream but this is anti-consumer behavior that needlessly drains batteries with excess transceiver activity.
It's the Bluetooth; when Bluetooth connects most hearing aids reduce the environmental volume slightly so you can hear the streaming content. Some app has started to play audio (perhaps silently). I notice it on some websites.

How much HAs reduce environmental sounds when streaming is configurable by the way, but only by the audiologist if you don't have your own programmer. I don't like the effect and prefer to just turn down the volume manually.

Is this tunable per hearing program? When in an even moderately noisy environment I find myself switching to AirPods if I’m streaming. I would love for the HA to give separate controls for BT audio vs ambient like AirPods do.
(comment deleted)
I noticed my MBP had a periodic stutter sometimes: every 3 seconds or so the mouse would lock up for a few milliseconds.

I tracked it down to American Express's login page (auto loads if you leave the site idle) relying on Akamai's anti bot measures polling some web Bluetooth feature, causing Chrome to trigger a BT scan: https://castle.io/research/fingerprint-harvesting-in-the-bot...

Turning off Bluetooth solves it, but that's not a great solution when using a Bluetooth mouse... and it sounds like it might be causing your issue too.

I have the same on Android with my phonaks - not websites though, but both taking a photo and paying using Samsung pay appear to open an audio stream briefly, just long enough to jump into Bluetooth mode. It takes ~6 seconds to go back afterwards.

Quite frustrating as I'm often needing to hear the cashier at that point!

Need to rethink the system that allows for (and encourages) this kind of plausible deniability. From "Oh we need this permission for [non essential feature] and you need to accept it if you want the app at all" -> to giving the user ultimate control over what happens on their personal device. Virtualize what the app can see and use fake data/identifiers/devices if necessary to get it to do what its supposed to. If the App isn't going to act in good faith why should the user? Fine grained permissions don't really work in practice because the app can keep annoying the user until they give in and hit Allow.
Also perhaps AI agents are now capable enough to run these apps the way the user would and recognize these dark patterns. Flag those and feed it back to a warning at the point of sale that users can upvote there to signal their disapproval and a threshold score that risks removal of the app from the store. Because bad behaviour continues to make business sense if the rules allow it. Moreover, it penalizes and puts pressure on the good actors as a "missed business opportunity".
Maybe just have Claude rebuild the app in a non-scummy way. Analyze the site for the relevant data APIs, while avoiding the tracking stuff. Maybe someone maintains an MCP for these popular websites so people can use agents on them.
I had this (?) happen. I have a soundbar hooked up through spdif in my pc. It automatically switches sources, so I can play music through airplay and then have it play sounds from pc when I open youtube etc. So it switches from airplay music to pc even when nothing is playing on pc. This was happening on some websites and it is extremely annoying.
I thought the App Store review guidelines explicitly prohibit hidden features and using public APIs outside their intended purpose. Is audio-based fingerprinting just not something review can realistically catch?
It's the website.

The title of the article literally mentions "WebAudio", and the first paragraph states that the author is using a PC. The second paragraph mentions Chrome and Firefox.

Apple and the App Store have zero involvement here.

[delayed]
> This is a huge stretch

This is nonsense. Safari also supports Web Audio. Safari does not, however, support Microsoft Windows, which is why the article author didn't mention it.

Moreover, all web browsers on iOS have to use Apple WebKit, so Web Audio support is not actually the fault of the non-Apple browser vendors.

Right, the article is about the website. I was responding to the comments up there about the iOS app doing the same thing in the background, but I didn't catch the little bit with the reply.
A part of me is always smiling a little inside when people find creative ways to abuse browsers. It's always one more demonstration that the current web is fundamentally broken by design. The distinction between web browsers and random programs that allow remore arbitrary code execution is becoming more and more academic with every new feature that gets exposed to JavaScript.

Of course, I am also a horrible hypocrite and will actually use websites that use features like WebUSB or WebRTC.

It was a mistake to normalize blindly executing whatever code the server sends your browser. One day we'll look back on this era and wish we had pulled the plug sooner.
So Apple will remove them from the App Store. Thats their whole argument for their closed system - they’ll protect users from malicious apps. Right?
And maybe all the big airlines will learn geography 101.
If this wasn't such a serious issue I'd be inclined to make a joke about being surprised that AliExpress was capable of such a thing, but I guess the complete shitshow of a website is intentional.

I wouldn't be surprised if what I'm feeling is all a psychological thing where consumers associate jank with low prices so that's why sites like AliExpress and Temu look like a complete technical mess when in reality they're doing pretty advanced stuff like this.

It's not just BT audio. In windows PC, if aliexpress is opened in one tab in chrome, and switching to a tab with youtube opened, audio don't play in this tab if you start playing youtube.