I checked my own app's metadata with packet captures. Here's what the server, Google and Apple actually see.
Last month I wrote a post here about metadata in the app I build: rotating mailbox addresses, sealed sender, the server only seeing random strings. A couple of weeks later another one said that wake-up registrations were
Last month I wrote a post here about metadata in the app I build: rotating mailbox addresses, sealed sender, the server only seeing random strings. A couple of weeks later another one said that wake-up registrations were now split per mailbox, so the server had nothing to join them on.
Those posts were about design. This time I checked it the way I'd check someone else's app: packet captures and database snapshots. I try to write about my own app honestly rather than sell it, and my rule is simple: whatever I find myself, I close right away. Same here. What I found is fixed in builds 241 and 242, and what can't be fixed inside an app, I describe as it is.
The setup
Nothing fancy, and you can do the same with any Android app:
- rooted emulator, the same release builds people get from Google Play (240 and 241 against the production server with a test account, 242 against a test server running the same code before release)
- only the app's own connections, filtered by its Linux uid from
/proc/net/tcp, polled every 200 ms - DNS from
tcpdumpon port 53 - every remote IP checked against onionoo to see if it's a Tor relay
- server side: Postgres snapshots before and after each action,
redis-cli monitor, the API log
uid=$(adb shell dumpsys package cc.umbera.app | grep -m1 userId= | cut -d= -f2)
adb shell "while true; do cat /proc/net/tcp /proc/net/tcp6 | awk -v u=$uid '\$8==u'; sleep 0.2; done"
One thing that bit me: am force-stop silently didn't kill the process on my first two runs, so my "cold starts" were warm. Throw those runs away.
Message content held up fine. I sent marker strings and grepped every snapshot, Redis dump and log for them. Zero hits. Everything below is about metadata.
Does anything leave the app outside Tor?
One thing did. On every cold start, with Tor enabled and connected:
A direct TLS connection to fcmregistrations.googleapis.com, 3176 bytes, plus a plain DNS lookup. 13 out of 13 runs on one build, 2 out of 2 on the next. Google got the real IP and the fact that the app had just been opened.
The cause is a pattern I'd bet exists in a lot of apps. Our Tor proxy covers our own HTTP client. But we also called Firebase's subscribeToTopic() so phones could get a shared push for community channels. That call is made by the Firebase SDK, and the SDK opens its own connections. It never touches your proxy. You won't see it in your own request logs, because it isn't your code making the request.
The fix in build 242: the phone doesn't subscribe itself anymore. It already sends its push token to our server in an anonymous wake-up registration, which goes over Tor when Tor is on. That registration got one more boolean, and the server does the topic subscription from its own address through the Instance ID batch API. The flag isn't stored anywhere and successful calls aren't logged.
Same test on 242, two cold starts: only Tor relays from the app's uid, zero connections to *.googleapis.com.
What stays: the Google Play services push channel (mtalk, port 5228). It's a system process shared by every app on the phone, and an app can't route it through Tor. Google sees that a push arrived. On Android our push for a message and for a call is the same 213-byte {"type":"wake"}, so a single push doesn't say which it was.
If you take one thing from this post: if your app has an in-app proxy, VPN or Tor toggle, capture by uid and look for connections you didn't write.
What the server can link
My earlier post was too short on this. There are two places.
Every wake-up registration carries the same push token. It has to, otherwise the server doesn't know which phone to wake. So anyone running the server can group all mailboxes of one phone by token. The mapping is stored encrypted, which protects against a leaked database dump, but not against whoever runs the server.
Without Tor, the app reads all its mailboxes over one WebSocket. At that moment the server sees one connection asking for a set of mailboxes. It doesn't write that down (I checked the DB, Redis and logs), but "doesn't store" is not "can't see". With Tor, reads, sends, wake-ups and contact lookups go over separate Tor circuits, so the connection link is gone. The token stays. That's true for any app with push: without a token the server can't wake the phone. So the mapping is kept encrypted and never logged.
Message size
The envelope header carries the ciphertext length, and AEAD doesn't hide length. Same text at different lengths, size on the server:
On the older build, 1 character gave 2050 bytes, 1000 gave 4426, 4000 gave 13366. You can read message length off the server almost to the character. Since build 241 the sender pads to buckets: anything from 1 to about 4000 characters is 16374 bytes, then 32 KB, 64 KB and so on. More bandwidth, and I think that's fine.
The catch is that the sender pads. Messages from someone on an old version still arrive with exact length.
The rest, in one picture
On calls: the record type is visible: message or signal, so the server can tell a call happened between two mailboxes even if it doesn't know whose they are. And iOS needs a separate VoIP push for incoming calls, so Apple can tell a call from a message.
I also cut retention on the server while I was in there:
Call invitations now live 24 hours, because that's exactly how long the client shows a missed call. Other call signals live 15 minutes, since clients treat a signal older than 90 seconds as stale anyway. The tradeoff: a phone that's been off for more than a day won't show missed calls older than a day.
Calls during the first seconds
My earlier Tor call test was with Tor already up. This time I called right after a cold start, while Tor was still building a circuit. The older build sometimes fell back to the TURN relay from the real IP: 3 of 6 calls in one run, 5 of 8 in another. On 241 it was 0 of 8, the call waits for the circuit. The price is that the first call after launch can take 30 to 60 seconds longer to connect.
What I didn't check
The iPhone version currently in the App Store is older than what I measured, and I didn't test it live. Everything iOS here comes from a simulator and server-side records. I didn't measure conferences with three or more people. There's been no external audit, these are my own measurements with my own scripts.
The crypto core and envelope tests are in the open repo: github.com/UmberaAPP/UMBERA. If you rerun any of this and get something different, I want to know.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.


