This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Talk:Certificate and Public Key Pinning
Past Failures
This section is 'further reading' for those interested in surveying the landscape.
- Governments Want/Require Interception
- Certified Lies: Detecting and Defeating Government Interception Attacks Against SSL, cryptome.org/ssl-mitm.pdf
- http://www.dailymail.co.uk/indiahome/indianews/article-2126277/No-secrets-Blackberry-Security-services-intercept-data-government-gets-way-messenger-service.html
- Governments Engage in Interception
- Vendors Provide Interception Taps
- Governments Use Interception Taps
- Mobile Interception is Patented
- Lawful interception for targets in a proxy mobile internet protocol network, http://www.google.com/patents/EP2332309A1
- Handset manufactures add trusted roots
- Carriers can add trusted roots
- No reference yet, but http://www.theregister.co.uk/2011/12/15/carrier_iq_privacy_latest/
- CAs can become compromised
- Researchers created Rogue CAs
- Researchers collided certificates on existing CA certificates
- DNS can become compromised
- Physical plant can become compromised
- Its easy to set up an AP or Base Station (Chris Paget's IMSI Catcher)
- Can't trust some CAs – they will sell you out and issue subordinate CAs for money
- Can't trust some browsers – they will sell you out and elide their responsibility
- Can't trust some browsers – they include questionable certificates out of the box
- Can't override some browser's CA list
- Can't override OS's CA list (burned into ROM)
- CRL/OCSP does not work as expected/intended
- User will break it too (not just bad guys)
- Interception proxies add additional risk
- HTTPS is broken
- PKI is broken
- www.cs.auckland.ac.nz/~pgut001/pubs/pkitutorial.pdf
- The Internet is Broken :)
Operational considerations
We use certificate pinning very commonly in my organization (yay for us) but we recently hit a problem when we were routinely changing a certificate on a service. The development team for one of the client applications and implemented pinning, but they had not considered what would happen when the certificate changed.
The majority of our clients support 2 pinned certificates at a time, so when we want to change the server cert the process is
1) Configure the new server cert in the client alongside the old one 2) Replace the old cert on the server 3) Configure the old cert from the client
This way we can do the cert rotation usually with no downtime for the client.
The team in question did not do this, which meant they had to have a few minutes of downtime (this is important as we have a demanding SLA) and also it meant that we had to do the change out of office hours to minimize the impact.
So, my suggestion is that we expand this page to include a section on "Operational considerations" that outlines the recommended approach.
Thoughts?
If no-one objects, I will add the new section in a couple of days.
Michael Goodwin (talk) 06:20, 2 April 2015 (CDT)
(I am not sure how to reply to your question so I will do it inline. Let me know the appropriate method).
I absolutely agree that this is a needed section. We have had certificate pinning in for two years and it has been extremely difficult because the teams don't fully grasp the operational implications. Our strategy has been to include the old cert and the new cert. Since our app is a consumer app, I have also lobbied extremely hard to get a 'Your app is out of date and needs to be upgraded' but have not got traction. As a result, every time the certificate changes it's a world of pain since we don't have an effective way to let users know they need to update.
I have many, many thoughts on the operations side and would love to contribute. SteveA
Android example contains code that breaks apps
The Android code example contains a section where it checks that the authtype equals "RSA". F5 recently changed their default authtypes to RSA-DHE. This meant that when we upgraded our F5's in production, all of our Android mobile apps broke. Obviously a big issue.
What is the compelling reason for this line of code:
if (!(null != authType && authType.equalsIgnoreCase("RSA"))) {
throw new CertificateException("checkServerTrusted: AuthType is not RSA"); }