Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insecure pinning #29

Open
MarcusWolschon opened this issue Feb 14, 2017 · 0 comments
Open

insecure pinning #29

MarcusWolschon opened this issue Feb 14, 2017 · 0 comments

Comments

@MarcusWolschon
Copy link

MarcusWolschon commented Feb 14, 2017

https://github.com/moxie0/AndroidPinning/blob/master/src/org/thoughtcrime/ssl/pinning/PinningTrustManager.java#L176

The chain you get is the chain given by the peer = web server.
It can contain any number of certificates that have nothing to do with the trust chain created internally by checkSystemTrust().

CertificateChainCleaner.java tries to fix that but it does not validate any signatures.
So adding invalid certificates can create a second trust chain to circumvent the pinning.

checkPinTrust() returns true if the parameter contains any certificate that matches the pin.
By attaching any trusted, correctly pinned certificate to the TLS-response the entire pinning can be circumvented.

See
https://www.cigital.com/blog/ineffective-certificate-pinning-implementations/
for a more detailed explanation of your security flaw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant