News for hackers. Stuff that matters.
Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @05:10PM (#36485896)
Hi HN, this is my efforts in reverse engineering a BLE car battery monitor where it's app has over 100,000 downloads on the Google Play store alone.

It turns out it's sending GPS, cell phone tower cell IDs and Wifi beacon data to servers in Hong Kong and mainland China on a continued basis. Google and Apple app store pages say no personal data is collected or sent to 3rd parties.

Hopefully readers pick up a few tips on reversing apps for their connected devices.

Re:A popular Bluetooth car battery monitor that siphons up a... by OldManRyan on Monday June 26, 2023 @05:30PM (#36486137)
Would love to learn more about this type of reverse engineering. Do you have any resources or tips on getting started?
Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @05:40PM (#36486247)
The best way is to just start practicing. I would say pick some simple apps on your (Android) phone and dig straight in.

The great thing about Android applications is that often they generally decompile quite nice into human readable Java soo the barrier of entry can be quite low to start reversing.

Grab a copy of JADX[1] - it will decompress and decompile the APK files. If you don't have an Android handset, use an emulator and/or grab APKs from apkpure[2]

Dynamic analysis is a bit more challenging. In my blog post I use Frida[3] extensively.

If you get started on something and get stuck/looking for support, feel free to DM me on Twitter (handle in HN profile), more then happy to help.

[1] https://github.com/skylot/jadx

[2] https://m.apkpure.com/

[3] https://frida.re/docs/android/

Re:A popular Bluetooth car battery monitor that siphons up a... by OldManRyan on Monday June 26, 2023 @06:36PM (#36486794)
Thanks! I have an Android device so I'll start by looking at some apps I use daily.
Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @06:43PM (#36486857)
Great - good luck and most of all, have fun!
Re:A popular Bluetooth car battery monitor that siphons up a... by Daneel_ on Monday June 26, 2023 @08:44PM (#36487737)
"human readable Java" - that's a good one.

I kid, I kid.. Somewhat.

Re:A popular Bluetooth car battery monitor that siphons up a... by dotancohen on Tuesday June 27, 2023 @02:29AM (#36489550)
Can't possibly be worse than reading someone else's perl.
Re:A popular Bluetooth car battery monitor that siphons up a... by disposition2 on Monday June 26, 2023 @06:03PM (#36486509)
Really appreciate the write up. Just wanted to share, while unimportant…I still thought I would share, some grammatical errors near the top of the page

> reveals that that the Apple iPhone version is also location data to remote servers.

I’m guessing there should only be 1 “that” and there’s a missing “sending” between “also” and “location data”

Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @08:42PM (#36487725)
Thank you for the keen eye, fixed.
Re:A popular Bluetooth car battery monitor that siphons up a... by qwertox on Monday June 26, 2023 @07:35PM (#36487269)
Thank you for your effort. There also appears to be a BM6 variant which explicitly states that you get a personal account and will be able to track your car.

https://www.amazon.de/dp/B0BLG9Z462

You can click the images where the third one contains a comparison. Interesting that pretend that BM6 has this as a special feature since it just is a feature of the app.

The QR code [0] on the device points to this app: https://play.google.com/store/apps/details?id=com.dc.bm6

So I checked other URLs like https://link.quicklynks.com/bm3.html and https://link.quicklynks.com/bm4.html, and the latter redirects to https://www.leagend.com/ which operates this YT channel https://www.youtube.com/channel/UCqkvyOFP5cXQ02f3h1Ns42Q

[0] http://link.quicklynks.com/bm6.html

Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @07:38PM (#36487292)
Nice find. It appears the application is by the same developer [1]:

The play store page for this app states:

- No data shared with third parties

- This app may collect these data types

- Data isn’t encrypted

- You can request that data be deleted

I just checked the BM2 app (subject of the blog post series) and they have updated with the same detail [2], updated on the 25th of June 2023.

I'd like to think my blog post put some pressure on them to fix it at risk of their app being pulled. Doesn't excuse them though.

[1] https://play.google.com/store/apps/details?id=com.dc.bm6

[2] https://play.google.com/store/apps/details?id=com.dc.battery...

Re:A popular Bluetooth car battery monitor that siphons up a... by jacquesm on Tuesday June 27, 2023 @04:48AM (#36490460)
We'll probably never know but it would be very interesting to get an idea for their motivation to collect this data in the first place.

It's a fine line between data collection for commercial reasons and spying. Of course the mis-representation is an issue all by itself and Apple/Google should kill this app for that reason alone if they are going to be consistent.

Re:A popular Bluetooth car battery monitor that siphons up a... by worik on Tuesday June 27, 2023 @05:17AM (#36490650)
> It's a fine line between data collection for commercial reasons and spying

No there is not. Your permission is the line

Re:A popular Bluetooth car battery monitor that siphons up a... by jacquesm on Tuesday June 27, 2023 @05:22AM (#36490682)
I think you misunderstood my comment.
Re:A popular Bluetooth car battery monitor that siphons up a... by ddalex on Tuesday June 27, 2023 @12:18PM (#36494950)
Just to map locations of cell towers is really nice as it can be used to augment positioning of other mobile devices
Re:A popular Bluetooth car battery monitor that siphons up a... by justinclift on Tuesday June 27, 2023 @06:36AM (#36491110)
> You can request that data be deleted

Requesting is easy... but trusting the whole "Yeah, we definitely deleted that data you asked us about" is where things can be tricky. :/

Re:A popular Bluetooth car battery monitor that siphons up a... by russdill on Monday June 26, 2023 @09:06PM (#36487842)
The worst part about this is last I checked, Android requires location permission to connect to a BLE device. Presumably because BLE scanning can determine location.
Re:A popular Bluetooth car battery monitor that siphons up a... by x1sec on Monday June 26, 2023 @09:59PM (#36488119)
Google do offer Android app developers guidance in this regard:

https://developer.android.com/guide/topics/connectivity/blue...

Re:A popular Bluetooth car battery monitor that siphons up a... by thombles on Monday June 26, 2023 @10:12PM (#36488166)
As described in sibling's link, they finally corrected this in Android 12 with fine-grained permissions including a flag for whether you are intending to use the BLE for location purposes or not. iOS is now somewhat behind in granularity.
Re:A popular Bluetooth car battery monitor that siphons up a... by Retric on Monday June 26, 2023 @10:41PM (#36488302)
“intending” seems like an unfortunate phrasing there.

Is Android actually verifying this, or can this be used to misrepresent what’s going on?

Re:A popular Bluetooth car battery monitor that siphons up a... by thombles on Monday June 26, 2023 @11:00PM (#36488399)
The docs note that certain kinds of beacons (which presumably would only be useful for location-finding) will be filtered from results. Otherwise I suppose it's just a soft flag for Play Store review or similar. There's not much you can do - if a given app has access to BLE scan results, it's very difficult to prove that it's _not_ deriving location from that either locally or on a server. I'm satisfied that it's usually going to be difficult though, with the possible exception of say, a supermarket app who plants non-beacon-like devices in their stores. However a user would probably raise their eyebrows at a supermarket app that asks for access to Bluetooth.
Re:A popular Bluetooth car battery monitor that siphons up a... by russdill on Tuesday June 27, 2023 @01:56AM (#36489362)
It's difficult to comprehend what's going on here without it being spelled out because it really is that dumb. For an Android app to connect to BLE devices, it needs the location permission. An Android app with the location permission gets access to gps location. It's not possible to allow an app to connect to a BLE device without also giving the app access to the location API.
Re:A popular Bluetooth car battery monitor that siphons up a... by lultimouomo on Tuesday June 27, 2023 @03:00AM (#36489741)
Again, this is before Android 12 - afterwards the app can declare that it just wants BLE not for location purposes, and not get access to GPS (and apparently certain kind of BLE beacons). Still it's mind boggling that this glaring issue survived so long.
Re:A popular Bluetooth car battery monitor that siphons up a... by reaperman on Tuesday June 27, 2023 @02:18AM (#36489481)
I don't think "granularity" is what should be optimized here. Apple has made the right call by telling the user in plain terms what privacy/security they're giving up. Something like "Allow BLE 4.0 with EDR?" obfuscates to the user that they're potentially giving a permission which allows the app to track them and connect to nearby devices.

Binning these to practical real-world "sacrifices" makes far more sense. I'd say Apple is ahead on UX, not behind.

Re:A popular Bluetooth car battery monitor that siphons up a... by qwertox on Tuesday June 27, 2023 @03:20AM (#36489852)
I think the issue is, or at least was, that Google assumes that if you are willing to share your location via BLE, which could be guessed by sniffing for BLE MAC addresses, that you're at the same time willing to grant high resolution GPS access.

I get it that BLE MAC addresses can provide very detailed location information, in my case my thermostats/valves broadcast MAC addresses all the time, so if they are sniffable, it is known that I'm at home, but this is not the case when I'm on my bike or in my car, where maybe there's the address of the bike computer or the car radio, because these are traveling along with me, giving no positional information.

Once I meet other people or walk around some streets, geolocated BLE MAC addresses will be present again, but it still isn't the same as high resolution GPS. GPS doesn't require an additional database lookup from a database which the "spy" may not even have access to, it directly sends latitude, longitude and accuracy.

It's annoying that Google neglected or still neglects this.

Re:A popular Bluetooth car battery monitor that siphons up a... by throwaway742 on Tuesday June 27, 2023 @01:05AM (#36489113)
I wish they had more granular permissions.
Re:A popular Bluetooth car battery monitor that siphons up a... by avereveard on Tuesday June 27, 2023 @01:15AM (#36489162)
As an addendum I wish applications weren't aware of permission given or denied
Re:A popular Bluetooth car battery monitor that siphons up a... by raxxorraxor on Tuesday June 27, 2023 @04:22AM (#36490293)
While not technically wrong, this is a prime example of bad engineering. I expect this to be for nudging people to activate location services.
Re:A popular Bluetooth car battery monitor that siphons up a... by kevincox on Tuesday June 27, 2023 @07:05AM (#36491282)
Yes. Because BLE scanning can effectively be used to determine user location it is grouped into the location permission.

In theory it would be slightly harder to determine the users location if only BLE scanning was granted but I'm sure the Alibaba would have no difficulty getting more or less the same amount of location info.

Plus how do you express this to users? Do you call it "BLE Scanning" and try to explain that this reveals location information? Most users will miss that explanation. Or do you call both permissions "Location"? But now what is the incentive to request the lesser one.

I actually think that Google made a reasonable call here. If they both grant access to more or less the same info it makes sense to be behind the same permission.

Re:A popular Bluetooth car battery monitor that siphons up a... by Aardwolf on Tuesday June 27, 2023 @07:05AM (#36491283)
Why do 100k people need a car battery monitoring app? The dial is right on the dashboard of the car, what does this app possibly do?! And drain your phone battery continously as well, is that really worth the ability to see on your phone screen what your dashboard already tells? And if it's for a stationary battery, why not just analog volt meter dial?

Sorry for complaining, but it's so hard to find standalone devices that don't require an app nowadays (simple example: try finding an LED lamp where you can choose the light color that allows doing it with a button on the lamp itself without app - I found one but it was non-trivial and it still doesn't allow color cycling without app). If people wouldn't prefer this BS, it would be easier to find sane electronics/electrics again.

Re:A popular Bluetooth car battery monitor that siphons up a... by aembleton on Tuesday June 27, 2023 @07:11AM (#36491319)
Lots of cars don't have this dial - such as the Mk2 Prius. Mind you, I've never wanted this information either.
Re:A popular Bluetooth car battery monitor that siphons up a... by flangola7 on Tuesday June 27, 2023 @07:35AM (#36491480)
There's no battery information on my car dashboard.
Re:A popular Bluetooth car battery monitor that siphons up a... by Aardwolf on Tuesday June 27, 2023 @08:04AM (#36491673)
Not even a low battery warning icon when it's getting low?
Re:A popular Bluetooth car battery monitor that siphons up a... by skinner927 on Tuesday June 27, 2023 @09:16AM (#36492269)
I’ve had more than one battery die with zero indication on the dash.
Re:A popular Bluetooth car battery monitor that siphons up a... by wlonkly on Tuesday June 27, 2023 @06:32PM (#36499598)
The indicator with a picture of a battery is really about your alternator.
Re:A popular Bluetooth car battery monitor that siphons up a... by jjoonathan on Tuesday June 27, 2023 @08:29AM (#36491841)
The battery is there to start the (ICE) car. Its voltage under ~500 of amps of load is the relevant voltage. The voltage when the car is off is almost always irrelevant (it provides no guarantee about the ability to crank) and the voltage when the car is running is doubly irrelevant (alternator). What you want to do is watch and record the voltage dip while cranking, and this alone will give you a sense of your battery health.
Re:A popular Bluetooth car battery monitor that siphons up a... by Aardwolf on Tuesday June 27, 2023 @08:34AM (#36491880)
If it's this important, does the onboard computer of the car not check this and warn if needed? If not, why not and why did humanity end up in a state where clunky apps are needed for this when the car already has all the electronics it needs for this?
Re:A popular Bluetooth car battery monitor that siphons up a... by Goronmon on Tuesday June 27, 2023 @09:30AM (#36492449)
If not, why not and why did humanity end up in a state where clunky apps are needed for this when the car already has all the electronics it needs for this?

(Almost) No one is making their car purchasing decisions based on the existence of a car battery health feature.

Re:A popular Bluetooth car battery monitor that siphons up a... by Aardwolf on Tuesday June 27, 2023 @10:58AM (#36493827)
I mean, probably nobody looks at whether a stick to measure the oil level is integrated in the oil cap either, but it's still there fortunately (or do you need an app for that too these days?)
Re:A popular Bluetooth car battery monitor that siphons up a... by FractalParadigm on Tuesday June 27, 2023 @12:48PM (#36495444)
Unfortunately, a lot of vehicles these days, mostly high-end, do not come with oil dipsticks anymore[0]. I know that Audi starting switching to sensors-only around 2012, and I believe BMW started even earlier than that.

[0]: https://www.motorbiscuit.com/oil-dipsticks-disappearing-at-a...

Re:A popular Bluetooth car battery monitor that siphons up a... by jjoonathan on Tuesday June 27, 2023 @09:48AM (#36492704)
People are accustomed to the coping mechanisms: aggressive battery replacement (on a schedule / at the first sign of struggle) or letting the battery deteriorate until the car fails to start and then asking for a jump / calling a tow truck. People see these inconveniences as inevitable, not as the result of a missing feature that really ought to be standard. Manufacturers don't feel pressured to do better so they don't do better.