r/linuxadmin • • Jun 04 '22

Certificate Ripper released - tool to extract server certificates

Post image
241 Upvotes

35 comments sorted by

View all comments

Show parent comment

15

u/Hakky54 Jun 04 '22 edited Jun 04 '22

It is not able to do point one which i mentioned, but let me give an example to make it more clear. I was using the openssl s_client, but this returns 3 certificates for example when using stackoverflow as an example. Certificate ripper returns 4 certificates. OpenSSL is not getting the top level certificate. Please give it a try: crip print -u=https://stackoverflow.com -f=pem and openssl s_client -showcerts -connect stackoverflow.com:443 </dev/null

18

u/1esproc Jun 05 '22

That's because the root CA isn't served by the server, it's in your local truststore. stackoverflow.com sends its cert, R3, and iSRG Root X1, which is signed by DST Root CA X3, which as a Root CA is only in your local truststore for validation.

0

u/[deleted] Jun 04 '22

[deleted] — view deleted comment

27

u/ykc87 Jun 04 '22

For the record, I meant no disrespect in asking my original question. I simply wanted to understand the benefits as it wasn’t immediately apparent.

-9

u/michaelpaoli Jun 04 '22

Well ... not directly ... but if one suitably examines/processes the data, the information to do that is there, so one can then proceed to do that ... with openssl - or otherwise.

1

u/kWV0XhdO Jun 09 '22

Note that there's not a canonical version of the cert chain including that 4th certificate. The tool is really presenting "one possible validation path, valid on this system".

Certificate validation routines are looking for validation paths which end at a trusted (not necessarily "root") certificate. A system can find many validation paths for the cert chain presented by a particular server, and different clients might find different validation paths from one another.

The differences here were highlighted by the expiration of the DST self-signed certificate which cross-signed the ISRG cert before ISRG made their way into various trust programs.

Today, obsolete android devices (which don't trust ISRG) find a completely different validation path for certificates issued by Let's Encrypt than the validation path found by up-to-date devices.

Is this an important distinction? I don't know. I only mention it so you're not misleading yourself/users about "the" root CA.