Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I see. Which would mean that in cases where the application/OS can be made to blindly trust the "fake" CA (by inserting a root certificate into the certificate store, like in Android), the proxy can simply send the certificate and the client will believe that the certificate comes from Amazon. The certificate list can be refreshed by flushing the cache, yes?
Thanks for the explanation
There are some cases where this would not work by the way. It's called certificate pinning and it's basically when an application comes with the trusted certificate for a host built-in. Even if you were to override it with a root certificate in the certificate store, the app simply wouldn't use it.
Shouldn't flushing the cache mitigate this problem?
No, not at all. The request never hits the cache. The certificate is stored within the app and all internet communication is specifically pinned to said certificate. It doesn't even ask your certificate store.
I see. Thanks, I'll have to rethink the idea in that case.
Yeah, unfortunately it's a huge barrier if you're wanting to see why your devices are phoning home and the data being sent. It makes it extremely difficult if not impossible for most people to bypass.
I understand. What other methods would you suggest to be able to snoop on/decrypt the traffic from my device?
Specifically for attempting to bypass certificate pinning you're solidly in the realm of reverse engineering. I haven't attempting it myself but I have read the efforts of others over the years and the process was quite evolved and ever changing. If you are interested in going down this rabbit hole you may use these links as starting points but be prepared to adapt them.
https://felipe-herranz.medium.com/uncertify-a-tool-for-recompiling-android-apps-bypassing-different-certificate-pinning-techniques-de3d30ded2c6
https://gist.github.com/approovm/e550374428065ff1ecafca6a0488d384
https://frida.re/
https://codeshare.frida.re/browse
Best of luck.
Thanks, I had heard of frida before, but never tried it. I'll save this comment, many thanks for the pointers!
That's the sum of it. Like others and I have noted some mobile apps (and Apple phones in particular have their entire OS configured to not trust any intercepted certs when attempting to speak to Apple home base) are prone to using certificate pinning and will reject the intercepted certs regardless of the trust store. It's mostly beneficial for adjusting the browser.
If I might ask, what's the purpose of this proxy? Functionally there are a lot simpler and more efficient ways to block traffic from a phone. If it's more for traffic inspection I've seen a couple VPN based pcap apps for Android that could get a lot more detail while a DNS filter could both control and give visibility to traffic from the device without all the cert hassles.
Thanks, I didn't realise that certificate pinning was this strict.
This effort is to check if my mobile has a baseband processor that might be communicating with the internet. I want to know if my device has a backdoor in hardware. The idea with a VPN has me intrigued, could you tell me more about that?
https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture
Something like that should ship all traffic through a local VPN adapter and output a standard pcap file.
Another option if you have a bit more fancy networking available is to set up a security onion instance, then mirror a port on the network and just capture everything at an on-wire level. That would also cover things beyond just web traffic to catch other things like ssh or whatever other remote connectivity could be in play. Seeing the content of the connection is different than just seeing the connections existence though. The endpoint generally has the best visibility before data gets pushed into a a connection but unless you start getting into kernel level debugging it can still be hard to see into the behavior of internal applications.
https://play.google.com/store/apps/details?id=eu.faircode.netguard
This is also a local VPN way of seeing all the outgoing traffic along with allowing control of it as a local firewall.
Hi, thanks for the resources. However, I don't think I'll be able to decrypt the traffic from my mobile using this, yes? Using a VPN for this is a great idea though, this also happens to be how NoRoot firewalls work on Android