200

Typically certificates are validated by checking the signature hierarchy; MyCert is signed by IntermediateCert which is signed by RootCert, and RootCert is listed in my computer's "certificates to trust" store. Certificate Pinning is where you ignore that whole thing, and say trust this certificate only or perhaps trust only certificates signed by this ...


35

It's ambiguous, but it refers to solutions for an issue in SSL certificate chain verification. Essentially, trust in SSL boils down to root certificates, the certificates your system trusts in to be genuine. Those either come with your OS or with your browser. If one of those is compromised, all certificates signed by this and transitively signed ...


23

SSL server certificates come from the X.509 world. The client verifies the validity of the server's certificate by validating a lot of cryptographic signatures from Certification Authorities. The beauty of the scheme is that it is stateless: a given server could change its certificate every five minutes, and it would still work with clients. It has been ...


15

Generally what happens in a HTTPS connections is that client asks for SSL certificate from the SSL compliant server it is communicating with over https. Server will provide a certificate from its key store. After client receives this certificate it validates its credentials depending on whether hostname is same as requested has a verifiable chain of trust ...


14

KASLR and SMEP are kernel-mode protections, applying ASLR to kernel space and enforcing privilege ring boundaries on execution respectively. EMET is solely a user-space protection tool, and as such is not involved with KASLR or SMEP. You should also be aware that EMET is not a magic bullet. It is designed with two goals: to raise the cost of exploit ...


12

It really depends on how your application/site manages the certificates and public keys, i.e. how often are the keys and certificates rotated. For example, if your site rotates the certificates very often, then you'll also need to update your application that often as well, if you are pinning the certificate. Whereas, in this use case, pinning public key ...


11

The power in a certificate is NOT in the certificate. It is in the private key. When a server "uses a certificate", it really uses the private key; and the server shows the certificate (that contains only the public key) to the client. The certificate is a proof that a given public key belongs to a specifically named entity. For instance, the certificate ...


9

With browsers that have certificate pinning, user-installed root CAs are normally exempted from pinning requirements; if the certificate received doesn't match the pinned certificate or key but is signed by a custom-added CA, the browser doesn't complain. This is done to support the exact scenario here, as well as the scenario where a user decides to MitM ...


9

Terry Chia answered the question "What is the benefit of rotating certificates so frequently?" fully correct, so there's nothing for me to add. However, I'd like to add a note that Google does frequently change their public keys as well, so the assumption of the cheat sheet is invalid. This does add pretty much confusion and may be part of the reason for ...


9

Certificate pinning allows to bypass standard certificate authority chains to mitigate the risk of an valid certificate be issued to a criminal. Motivation for a new solution... SSL/TLS certificates are signed by other certificates. Browsers normally recognize a certificate as valid when in some point of this signature chain a trusted entity is found. The ...


8

This type of problem lends itself to Cargo-Cult Security type "solutions". In the real world there is no possible mechanism that can prevent a rogue client from connecting to your service. A VPN is a proven security system that allows trusted clients access to a trusted network, but the internet is inherently untrustworthy. The attacker will have access ...


6

TL;DR: No. That's not how certificates or pinning work. All certificate pinning does is limit the root of the trust chain to a smaller set, for a specific domain. It doesn't change how the certificates work. It only adds a new constraint on acceptable roots, without disabling any others, and they all have to match -- domain name, date, etc., and now pinned ...


6

Does this mean that these applications cease to function completely on corporate and academic networks that utilize SSL inspection, unless the administrator specifically exempts them Yes,You are right the apps that use certificate pinning wont work in an MITM situation.They didnt work when i tried so i think its a fair assumption to make that they wont ...


5

It depends on what fingerprint you mean. The public key fingerprint is a hash of the public key only. Since the public key stays the same on a simple renewing, this fingerprint will be the same too. The certificate fingerprint as shown in the browser is instead a hash of the complete certificate. Since the contents of the certificate will change to reflect ...


5

Per this answer, cert pinning can be bypassed on a rooted Android device or jailbroken iOS device. I would go on to state that I think that your approach of trying to secure your application by adding client-side security is doomed to fail. While you can raise the bar of having your application examined via obfuscation and other tricks, as there's no ...


4

The document you linked to details how the author bypassed pinned certificate validation in two different ways : by disassembling the application, removing the check and rebuilding the APK or by changing the certificate in the application keystore. Both method require a high degree of access to the application. There are no way to fully protect your ...


4

No, it is not possible to determine the state of SSL pinning at the client. SSL pinning is part of the certificate validation done solely inside the client and the only feedback the server gets is if the validation succeeded (connection continues) or not (connection closed, maybe TLS alert). Also there is nothing fully reliable the server could to to "ask" ...


4

The behaviour of HSTS is variable depending on whether the includeSubdomains directive is applied. In the case of HSTS without includeSubDomains, a user visiting www.facebook.com wouldn't protect them if they accidentally went to ww.facebook.com without an explicit HTTPS prefix. However, when the includeSubDomains directive is applied, visiting any subdomain ...


4

To sign the CSR: openssl x509 -req -days 365 -in private.csr -signkey ca.key -out test.crt From man x509: -signkey filename ... If the input is a certificate request then a self signed certificate is created using the supplied private key using the subject name in the request In other words: you are creating a self signed certificate with ca.key ...


4

Securing secure websockets Secure Websockets start life as a standard HTTPS request and only connect if a valid HTTPS connection can be established with the server. As a result, websockets will automatically respect any public key pinning, strict transport policies, etc, which the server sets in the response headers when the client first attempts to ...


3

It sounds like your use of a self-signed certificate is safe. But any variation in your usage pattern runs risks. For example, if you connect to your server via a web browser or other tool, you will not be able to automatically validate the certificate. You can still do that manually, but it won't be automatic and is somewhat error prone. I suspect that ...


3

Yes, generally speaking. The comments have linked you correctly to the mitm proxy documentation for that feature already. If that however is a feature of fiddler I do not know. If it's not in the documentation, go for MITM proxy instead:) This, by the way, is independent of you using certificate pinning; this would work fine without a pinned certificate ...


3

Fingerprint for Public Key Pinning stays the same if you renew the cert with the same private key you used before. See this page for instructions how to generate the fingerprint, you can see it can be extracted from private key or CSR, not only from the cert itself.


3

It means that rather than trusting a central authority for validating the PKI, you are utilizing your own means to determine that a public key is valid. Pinning allows removal of the trust of a central authority and instead takes that responsibility on directly. The "problem" that it is trying to solve is relying on third party trust, however it requires ...


3

From the github readme for the iOS SSL Kill Switch project: Once installed on a jailbroken device, iOS SSL Kill Switch patches low-level SSL functions within the Secure Transport API So your question basically boils down to: "How do I prevent my app from being infected with malware on a rooted / jailbroken device?". In short: you don't. This is why you ...


3

You can pin more than one certificate, and you should pin at least 2. If somehow you lose access to one certificate, you can use the second. With only one certificate, nobody that connected to your site with pinning enabled will be able to connect to your site via HTTPS until the certificate expire (but they can connect via HTTP). If you employed HSTS, ...


3

Public key pinning absolutely can prevent MITM even with a trusted CA certificate. The whole point of pinning is that the application knows exactly which certificate (hash, issuer, etc) to expect. Even though the trusted CA can generate a "valid" certificate for the domain, it won't be the exact certificate that the application is looking for, so it will ...


3

It's because some applications don't use the common HTTPS API from the SDK. Some of them implement their own libraries, and have their own keystores. In those apps, the certificate used for the connection is usually hard-coded, or the root certificate is hard-coded. In this cases, unless you modify the application to trust your certificate, installing user ...


Only top voted, non community-wiki answers of a minimum length are eligible