531 points · by rl1987 · 4y ago · 98 comments
You'd be the sole owner of that root cert / its private key, so you wouldn't have to worry about people in public networks mitm'ing you, but you'd mitm everything on your own network (that is, the traffic coming from devices where you trusted that custom CA).
Unless you want to do that with devices that don't explicitly trust your custom CA, but in that case, it's a feature that this isn't possible.
Governments could legislate of course, there could be a rule that means you can't sell Nest because it doesn't have some "hack" feature. After all the EU mandated people provide a sane charge port on phones and it more or less worked, even if you don't live in the EU your phone likely no longer has some arbitrary custom charge port on it, and you can buy replacement chargers or keep the one from a previous phone, reducing waste.
You also could legislate from the far end, for public services, you could say if I own a device using my credentials to do stuff, I get to have the agreed key material so that I can decrypt messages after the fact. That's a huge pain to implement, most of the ways to do it make everybody's security a bit worse, but it isn't technically impossible.
But technologically we can't change the mathematics of the encryption, Diffie-Hellman works, two parties can agree a secret (which in effect becomes a symmetric key) without either of them uttering the secret.
The average user doesn't know to care. They keep buying this garbage and, in turn, financing the lobby against consumer protection laws for embedded devices.
It makes me want to give up on technology and go live in a shack in the woods.
One annoying problem is certificate pinning, if you have deices that join your network and others, but it's doable.
The real problem is devices sold to consumers that don't allow you to install custom certs or allow you to configure a proxy. There should probably be a law that says every network device should have a means for the owner to decrypt the traffic on the fly.
Maybe there could be some kind standard DHCP option for a trusted root CA on the network. For user controlled devices (i.e. phones), they wouldn't trust it, but any kind of vendor managed device would. Probably too naive of a solution.
As a device manufacturer that uses certificate pinning, do you really want to trust whatever cheap crap router people have at home to provide a trusted root CA? Let's say that one gets hacked (which happens too often..), you are now also wide open. Sure, it's the owners responsibility, and with certificate pinning that's not configurable, you are depriving responsible owners of the possibility to decrypt their own traffic, but we at least need to acknowledge that there is a balance to strike here, and it's not obvious what the perfect solution would be.
Maybe an opt-out of certificate pinning that is so "hard" to reach that it's really only for power users that know what they are doing. (And with "hard" I mean more than some window popping up that says "Are you sure you want to do this? You'll void all warranty blah blah" -- people have already been conditioned to just click away certificate warnings in their browser; the same people would just click anything to just go on with their lives..)
Oh and adding a nerdy feature to home routers is never gonna happen. Consider how long it took for IPv6 to be enabled by default.
Now if the problem is that they have an option to configure a proxy, but don't trust your internal cert for the proxy itself, then the answer is to use a publicly signed cert on your internal proxy server. Even if it's just a let's encrypt one. It does feel dirty using public namespace for something that is only ever internal, but it works fine.
Only problem is that on Android 7 and above apps can choose to ignore any added certificates in the user store and the system store is off limits. Only way you can do it is by managing the phone in COBO or COPE mode with Android Enterprise. Which requires an expensive MDM system and a factory reset to enroll it.
Also the app can do certificate pinning which is even worse to get around. You'll have to modify the actual app.
I wouldn't be surprised if this rigmarole was the result of app development companies trying to keep secret how much data they exfiltrate.
And those modes are the only ones that allow you to push certificates to the system store. Normal BYOD work profile mode doesn't allow you to do that anymore. They only go into the user store where apps are free to ignore them - since Android 7. This mode is only meant for user owned phones and thus Google wants to limit what you as an admin can do. And manually you can't add them anymore either.
So that's why I mentioned the factory reset there.. It really is needed if you want to add root CAs to the system store.
(I managed 60.000 phones, 40k of which Android until a couple months ago :)
Better solution IMO is flash Lineage, preferably a variant with signature spoofing, and refuse to use proprietary garbage that pins certificates. If that means no streaming services or whatever it is then fine, I'll just pirate instead thank you very much. Why should I put money towards supporting things that erode my rights?
This stupid wireless lightbulb I have want to ping home to its manufacturer and I have no way to stop it. I had to go through the trouble of putting it on its own network and blocking it from everything. Very annoying. In the end I returned it because I couldn't trust it.
This require a rooted phone. Or you can patch the app with objection, so you don’t need the root: https://github.com/sensepost/objection/wiki/Patching-Android...
Can download the APK from places like https://apkpure.com/
What a fun tool for over two decades!
That's a real question for the ethernet people ;)
Wireshark is an objectively better name though, it's for the best.
Wireshark and its predecessors have made it easy to visualize how protocols actually work, and peel back the magic that makes the internet work.
Between the ability to "follow TCP stream" or the "conversation" views between two hosts, wireshark has helped connect the abstract and the observed / real behavior of networks. Which seems to make the difference for people trying to get beyond the basics of networking in workshops / training sessions.
The built-in protocol dissectors are also a big help for teaching.
Some common situations won't work well out of the box (multi interface PCAPs), or I need to read the manual again... but with a bit of scripting / light processing of the PCAP it works very well.
It's a wonderful tool and I'm very happy our network technology teacher showed us this back in high school.
[1] It's actually the capture part of Wireshark
(Shameless self-promotion) I had written a blog post about it back then. Here goes [1]
[1] https://arjkb.gitlab.io/post/2017-11-27-capture-packets-usin...
This will tell curl, among many other applications, to save the necessary keys.
You still have to root the emulated device as you would with a regular device. But it works
This doesn't work if you use DH, and you should be using DH.
To work with DH, you need to run your browser with a SSL key logfile, as discussed here:
https://security.stackexchange.com/questions/35639/decryptin...