this post was submitted on 07 Dec 2023
125 points (97.0% liked)

Selfhosted

40296 readers
409 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

cross-posted from: https://lemmy.crimedad.work/post/39255

Is self-hosted enough to avoid push notifications going through Apple and Google servers?

all 30 comments
sorted by: hot top controversial new old
[–] possiblylinux127@lemmy.zip 10 points 11 months ago

surprised face

[–] JASN_DE@feddit.de 9 points 11 months ago (1 children)

That depends a lot on what you're hosting resp. if the mobile apps are using Google's/Apple's messaging/notification services.

[–] whofearsthenight@lemm.ee 11 points 11 months ago (1 children)

Sort of. If you’re receiving a notification from a remote server on iOS or standard android, they go through Apple or googles servers. That said, some apps rather than sending your device the actual notification (where this vulnerability comes from) will instead send a type of invisible notification that basically tells the app to check for a new message or whatever and then will display a local notification so the actual message stays on device and inside of the hosting services servers (like a self host.)

[–] towerful@programming.dev 6 points 11 months ago* (last edited 11 months ago) (2 children)

That said, some apps rather than sending your device the actual notification

Pretty sure that is actually the recommendation from apple/google, as it reduces bandwidth for their notification servers.
I think the message payload is severely limited.
Like, pre-ios8 the limit was 256 bytes. Now it's 2kb.

https://stackoverflow.com/a/6316022

[–] whofearsthenight@lemm.ee 3 points 11 months ago (1 children)

I didn't know that. Hmm, sounds like it's decently likely this is a bit overblown then. I mean, I suppose there are a lot of lazy companies out there that will skip this, but that severely limits the functionality in a way that it's going to force the secure method.

[–] towerful@programming.dev 5 points 11 months ago* (last edited 11 months ago)

It opens users to timing attacks.
If there are 10000 notifications per second. And across 100 incidents user A does something to cause a notification and user B receives a notification within network latency time periods, it is likely user A is talking to user B.
Whilst that seems like arbitrarily useless data, having this at the giga/peta scale that the US government is processing it, you can quickly build a map of users "talking" to users.
Now, this requires the help of other parties. You need to know that user A is using WhatsApp at the time. And yeh, you don't know what the message is, but you know that they are hitting WhatsApps servers. And you know that within 5 minutes of User B receiving a notification, they are also then contacting WhatsApp servers.
So now you know that user A is likely talking to user B via WhatsApp.
And also user G, I X and M are also involved in this conversation.
And you bust user G on some random charge. And suddenly warrants are issued for more detailed examination of users A, B, I, X and M.
Maybe they have nothing to hide and are just old college friends. Or maybe they are a drug ring, or whatever.

It's all the "I have nothing to hide", phones being tied to a person, privacy and all that.
We can't really comprehend the data warehouse/lake/ocean level of scale required to realise what all the little pieces of meta data and tracking information being able to add up to "User A is actually this person right here right now and they bought a latte at Starbucks and got 5 loyalty points" level of tracking.

Is it likely this bad?
Probably.
Theres the "Target knows I'm pregnant before told anyone" story.
https://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/

That's over a decade ago. It's not let off. And you can bet that governments are operating at a level a few years beyond private industry.

So yeh, every bit of metadata counts

[–] KairuByte@lemmy.dbzer0.com 1 points 11 months ago

Honestly, they likely also suggest this in an attempt at privacy. For all their other faults, Apple has always championed security and privacy.

[–] plague_sapiens@lemmy.world 5 points 11 months ago* (last edited 11 months ago) (4 children)

That's why everyone should use GrapheneOS. Sandboxed GooglePlay services can be used, if needed. I personally use 3 proprietary apps, one of them is WhatsApp Business (self-employed and for stupid dipshits that won't use anything else...), which is more privacy-friendly than the personal client itself. Join the resistance! Use GrapheneOS :)

Good read about push notifications on GOS: https://discuss.grapheneos.org/d/9407-this-is-why-i-use-grapheneos

[–] Rootiest@lemmy.world 10 points 11 months ago (3 children)

Sandboxed GooglePlay services can be used, if needed.

I don't see how that would prevent this at all.

What is being discussed here is governments compromising the push notification service on Apple's servers (and presumably Google's as well)

Sandboxing Google services on your phone does nothing to change the fact that virtually all apps that receive messages/notifications are going to be using the push notification APIs that are compromised.

Whether or not private data is sent in those pushes and whether or not they are encrypted is up to the app developers.

It's common for push messages to simply be used as a triggering mechanism to tell the device to download the message securely so much of what is compromised in those cases will simply be done metadata or even just "a new message is available"

But even so, that information could be used to link your device to data they acquired using other methods based on the timing of the push and subsequent download or "pull"

The problem is that if you go ahead and disable push notifications/only use apps that allow you to, you are going to have abysmal battery life and an increase in data use because your phone will have to constantly ping cloud servers asking if new messages/notifications are available.

[–] MigratingtoLemmy@lemmy.world 1 points 11 months ago (1 children)

Would applications that don't use GMS be compromised too? Example: everything from F-droid

[–] Rootiest@lemmy.world 1 points 11 months ago (1 children)

I think unless they use netfy or a similar alternative then yes.

The vast majority of apps will be using GCM or FCM for notifications.

Now whether or not those push messages are encrypted/don't contain private data is up to the app developer so how much is exposed can certainly vary.

[–] MigratingtoLemmy@lemmy.world 1 points 11 months ago* (last edited 11 months ago) (1 children)

I get it. ~~Indeed, it's obvious now that even these apps would need to use Google's API~~ I stand corrected. Nope, apps from F-droid usually do not use GCM.

I hadn't heard of netfy before this, I'll have to take a look. I'm assuming that's an alternative FOSS framework for notifications? Can it be used as a drop-in replacement for most applications?

[–] Rootiest@lemmy.world 2 points 11 months ago

You're right, for some reason I thought Firebase was allowed.

Yeah netfy is a FOSS notification service.

As to drop-in replacements, I don't think such a thing really exists on the user side, this is fully up to the app developer in how they want to implement notifications.

To use netfy instead of FCM your app would need to be designed to do so or support it as an alternative option.

[–] plague_sapiens@lemmy.world 1 points 11 months ago* (last edited 11 months ago)

Yeah you're right. Sandboxed gplay services can still be used to surveil clients, good thing you can use another profile with gplay services and install apps (which needs those) on there, meaning no potential leaks for apps that use their own push notification service and closed APIs (Google or Firebase). Good thread about it: https://discuss.grapheneos.org/d/9407-this-is-why-i-use-grapheneos

[–] navi@lemmy.tespia.org 7 points 11 months ago (2 children)

How does it handle push notifications? If they come from googles push service then they'd be exploitable as well.

[–] waspentalive@lemmy.one 4 points 11 months ago

Indeed - it seems that this tracking is done completely outside of the phone, asking the network where, physically, the push notification was delivered (Tower, time, and date) to locate the phone and ostensibly the owner of the phone.

[–] possiblylinux127@lemmy.zip 5 points 11 months ago (2 children)

What we need is more open hardware. Current phones are privacy issues because they are black boxes. Even if a libre device has bad security it always can be improved.

I use Lineage os on my phone with only free apps.

[–] plague_sapiens@lemmy.world 3 points 11 months ago (1 children)

More open source hardware would be epic, but imo this trend will take years to grow if it even will succeed. Most people just don't care about their privacy at all and with hw and sw being open, there's less money to be earned because of easier plagiarism.

[–] steveman_ha@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

Thats weird, it almost feels like a misalignment between our general needs for computing resource development, and the incentive structures produced by using capitalist economic markets to distribute even basic goods for survival...

[–] MigratingtoLemmy@lemmy.world 1 points 11 months ago

Put pressure to release the FP5 in the US. I don't know why they decided not to

[–] Ashyr@sh.itjust.works 1 points 11 months ago (1 children)

How do you sandbox Google apps? Is it possible to do that with Google docs? I've been replacing everything else, but Google docs is difficult to replace.

[–] plague_sapiens@lemmy.world 2 points 11 months ago

Every app is sandboxed by default and has no permissions, which you can give them. Like StorageScope for accessing only certain files.

[–] HiddenRetro@lemmy.world 3 points 11 months ago (1 children)

I’m curious how things like gotify stand up to this. Since it’s a notification server does it still rely on Google and it’s notification servers?

[–] LufyCZ@lemmy.world 1 points 11 months ago

Notify (hope I remmeber the name right) has an option for both push notifications (with the usage of Google services) and polling based notifications (fully self-hosted)

[–] tagginator@utter.online -3 points 11 months ago

New Lemmy Post: Apple Confirms Governments Using Push Notifications to Surveil Users (https://lemmy.world/post/9256878)
Tagging: #SelfHosted

(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)

I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md