Hot answers tagged

6

HSTS and HPKP are different concepts. An HTTP Strict Transport Security (HSTS) header instructs clients to use HTTPS for all future connections to a website, thereby preventing downgrade attacks. In contrast to HPKP, it doesn't influence how certificates are validated. An HTTP Public Key Pinning (HPKP) header instructs clients to pin a specific public key ...


6

Doesn't HPKP become useless after the max age has expired? Yes, after the timeout is reached, the pin is no longer effective. But the expectation is that you will eventually visit the page again before your pin expires, thus refreshing the timeout again and updating the pins. It can be dangerous to never let a pin expire because you could lock out previous ...


6

In case of legal SSL interception the proxy CA which is used to issue the certificates for the intercepted connections gets explicitly imported into the browser/OS as trusted. In such a case browser will ignore both the builtin pinning and also the pinning done with HPKP header. This is explicitly done this way to make legal SSL interception (in firewalls, ...


4

HPKP could be used for tracking in big scale since it has report URIs: Send HPKP header with includeSubdomains set and a report-uri with unique random generated parameter. Embed a hidden image from a subdomain that uses a invalid/not pinned certificate. Browser calls report-uri with unique parameter. Only issue I see is a new report-uri with new UID being ...


4

Yes, both HSTS and HPKP are enforced by the client/user agent. All that the server does is generate response headers. The server cannot enforce compliance because, in a MITM/interception scenario, the server might not even be involved at all to enforce the policy.


3

With HPKP you can pin a certificate in a certificate chain. This is easy to do, as long as you always use the same certificate provider. For example, if you always have DigiCert certificates, you can pin the DigiCert root certificate and this gives increased security. But what if DigiCert gets compromised? In that case you need a backup certificate key to ...


3

You should ALWAYS have two (or more) pins in your headers: one for your current certificate, and one (or more) for the backup certificate(s) (held separately from current one, best offline). If your current certificate was not compromised, you don't need to touch the pins or issue new certificate - you can simply renew existing certificate (ask CA to issue ...


3

Will browsers recognize HPKP header on subdomain if I set it only on domain.tld and add includeSubdomains in it? If the user never visits domain.tld and the HPKP header is only send on requests to this domain then the browser will never see the HPKP header. But only after the browser has seen the header it has any effect. Once the browser has seen the ...


2

SN: 09:48:B1:A9:3B:25:1D:0D:B1:05:10:59:E2:C2:68:0A SHA-256 Fingerprint: EA:16:D6:DA:76:9B:67:6B:C0:7A:19:A0:CD:21:AA:F1:5A:9A:66:93:A2:C3:CD:7A:87:81:7D:B1:6F:5F:48:F5 Nothing in the cert I am looking at has opendns in it. IIRC OpenDNS does not support DNSSEC, they support DNScrypt-proxy which would not involve any cert being exposed to the browser.


2

1507520108719,1,1 The first number is the expiry timestamp in milliseconds. Divide by 1000 to get a normal unix timestamp. The second one is the HSTS state, which can be "unset" (0), "set" (1) or "knockout" (2, overrides HSTS preload information as "no HSTS information available"). The third one indicates whether subdomains are included or not. Source: ...


2

You have two solution: Use HPKP and a trusted certificate Keep your custom CA and use the Firefox addon "Certificate Patrol": https://addons.mozilla.org/fr/firefox/addon/certificate-patrol/


2

Yes, the major browsers use HPKP preload lists but there is currently no mechanism to submit your own pins (as opposed to the HSTS list). The big vendors currently restrict the preloaded public key pins to their own properties and some high profile sites (Google, Facebook, Twitter, etc.). The RFC on the Public Key Pinning extension also explicitly mentions ...


2

can HPKP certificate pinning disable DPI inspection on firewall? No, HPKP has not automatic affect on the firewall and how it does DPI. Is it possible that Firefox and Chrome disable pin validation for users who imported custom root certificates all pinning violations are ignored. That's not only possible but this is actually the case. Pinning will be ...


1

Certificate pinning and a TrustStore are not the same concept. The difference is not necessarily in trusting the certificate vs trusting the public key used in it. You can pin certificates too. Android's Trust store essentially contains of a bunch of certificate authority that are trusted by the Android developers or users(they can manually add root ...


1

While both DANE/TLSA and HPKP are somehow related to validation of the server using public keys or certificates, they address different aspects of the validation. This means DANE can not not considered the DNS equivalent of HPKP. HPKP cares about future connections to the site.It specifies which keys will be expected in the future and thus makes it ...


1

HPKP is TOFU(Trust On First Use). So if a user system compromised, but the browser still retain the pin, when the malware redirect the url request to a fake certificate to their phony proxy. the browser will show error like "SSL_PINNED_KEY_NOT_IN_CERT_CHAIN" (varied depends on browser). However, there is some site doing it wrongly, e.g. as report by ...


1

HPKP is simple and great as long as you don’t renew your private key. But if you intend to change your private key, you have to declare the new corresponding public key max-age before. It’s not a big issue if you have a short max-age, but a short max-age makes HPKP somewhat useless. If you consider your server might be compromised and your private key ...


1

No, they are not the same. A public key is actually one member of a "key pair", consisting of both a public key and the matching private key. The CSR is a Certificate Signing Request, which is just a form you fill out. When creating a CSR, you attach your public key to it and fill in other needed data; you then send it to a Certificate Authority (CA). ...


1

It's http public key pinning. It is intended to provide some (but not total) protection against compromised CAs. https://tools.ietf.org/html/rfc7469


1

Is there another way to get around this problem? Yes, you can configure your SSL interception tool to delete any HPKP headers in responses. You'll need all users to start with a dedicated browser profile, that's only ever used under SSL interception. If the same browser profile is ever used without SSL interception, the real server may pin their ...


1

In response to Steffan's answer above but posting as separate answer due to length It's easy to remove HPKP from your own copy of Chrome by using the chrome://net-internals/#hsts page. Not so much the other browsers. It's impossible to remove it from everyone else's Chrome unless you can visit reach person (which may be possible in your use case, but kit ...


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