floe / mobile-information-systems

Mobile Information Systems lecture materials
Other
4 stars 0 forks source link

07-privacy-security: Certificate pinning deprecated in favor of certificate transparency #1

Closed JonasStjerne closed 5 months ago

JonasStjerne commented 2 years ago

Hey Florian, In your video 7.5 at 3:30 (slide 26 in 07-privacy-security) you talk about HTTPS. I think your video has some outdated information. Certificate pinning is deprecated in favor of Certificate Transparency, read here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning

Also, I have a follow up question about your statement that HTTPS doesn’t prevent man in the middle attacks. From what I’ve understood man in the middle attacks are quite difficult to do on HTTPS connections. I hope you can help improve my knowledge on this.

A mobile connects to a server (man in the middle) that functions as a proxy between the mobile and the real server that an app uses. Sure, this would be possible but if the proxy is not signed by a trusted CA for that domain it wouldn’t be able to decode any of the information between the mobile and the real server because it wouldn’t have the encryption key that the two uses. From my understanding it would only be possible for the proxy to decode the data if it gets a compromised certificate authority to sign its public key for that domain. And the compromised certificate authority would need to be signed by one of the mobile’s other trusted certificate authorities or the root certificate, have I misunderstood something? Thanks

floe commented 1 year ago

Hi Jonas, apologies for not responding earlier, I didn't see your comment.

Thanks for letting me know about Certificate Transparency - hadn't heard that before, it does look like a good alternative.

And you are correct that properly implemented HTTPS is very difficult to attack via MITM. However, there are tons of examples of buggy implementations that, e.g., don't check whether the certificate actually belongs to the correct domain, or whether the CA is correct, etc. etc.

E.g. on Android, you can easily enrol your own CA certificate into the system keystore, and then anything signed by that certificate will be accepted as trusted by default, unless the app specifically checks which CA signed the certificate. A widely used example is e.g. https://mitmproxy.org/.

Hope this helps! Best, Florian

JonasStjerne commented 1 year ago

Thanks for your response, makes a lot of sense. I will definitely have to look into this 😃

I hope all is well, BR Jonas

floe commented 10 months ago

Still need to update slides.