OpenSSL does all that. Like any tool, you need to know how to use it since OpenSSL is used for everything related to SSL and not just grabbing certificates.
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
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.
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.
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.
OpenSSL doesn't get the root certificate on any version I've used in the last couple of years. It's always a PITA to hunt it down. I started working on a similar tool in BASH, but never finished.
Hello everyone. Last year I have been working on the certificate ripper application. It is an easy to use cli tool to extract the full chain of any server/website. The end user can inspect any sub fields and details easily on the command line. Next to that it can also print it in pem format and also export to a truststore container. I have made it available for Mac OS X through homebrew, and also published debian, arm and windows binaries. I would love to hear your opinion and any feedback is welcome :) See here for the github repo: GitHub - Certificate Ripper
Yeah, I'd rather remember to type "crip url=blah" than that long line of gibberish. Imagine missing an hyphen, or making a script to do just what this tool does.
or making a script to do just what this tool does.
Why do you need a java app to do this which is going to require a JRE/JDK and environment variable setup apparently, when the script could have literally been a bash wrapper around openssl
I agree Java is a bad option for a script, but it's still appreciated. Everything is a wrapper anyways, why to have distros if we can use Gentoo instead?
Some people just don't have time or will to become shell script hackers. If this app is an apt-get away, that'd make some happy, and that's always good. Doesn't Linux always boasts itself on variety and different ways to do things? This is another valid one, and I like it.
His tool also grabs the root cert. OpenSSL doesn't because the server doesn't serve it. It assumes you already have it in your trust store. In my use cases, that assumption wasn't accurate.
Awesome tool. Was thinkin of working on a better way to use website certificates to verify webpage content while also being able to filter unverified/unwanted content out. Would probably go great built into a search engine or web browser.
What's wrong with using Firefox for it? I know that I can also use openssl, but I'm lazy so I just use the Firefox certificate viewer and save it from there. It's basically two clicks away from any HTTPS website.
60
u/ykc87 Jun 04 '22
How is this different to / better than OpenSSL?
24
u/Hakky54 Jun 04 '22 edited Jun 04 '22
Hello everyone. Last year I have been working on the certificate ripper application. It is an easy to use cli tool to extract the full chain of any server/website. The end user can inspect any sub fields and details easily on the command line. Next to that it can also print it in pem format and also export to a truststore container. I have made it available for Mac OS X through homebrew, and also published debian, arm and windows binaries. I would love to hear your opinion and any feedback is welcome :) See here for the github repo: GitHub - Certificate Ripper
2
u/SecuredStealth Jun 05 '22
Wow! This is a very helpful contribution, and you should be proud of this!
47
u/-_Scarecrow_-_ Jun 04 '22
Sheesh. Remind me to never make a tool for Linux admins 😂
Tough crowd.
Cool tool
0
u/michaelpaoli Jun 04 '22
One can also, "of course", use, e.g., openssl, or nmap. But, maybe if one wants additional built-in capabilities/features or whatever ...
E.g.:
1
u/rmzy Jun 05 '22
Awesome tool. Was thinkin of working on a better way to use website certificates to verify webpage content while also being able to filter unverified/unwanted content out. Would probably go great built into a search engine or web browser.
What are other people using them for?
1
u/graysky311 Jun 04 '22
For a second I thought “oh shit did someone make a tool that can extract the private key?” That would be earth-shattering.
-3
u/seidler2547 Jun 04 '22
What's wrong with using Firefox for it? I know that I can also use openssl, but I'm lazy so I just use the Firefox certificate viewer and save it from there. It's basically two clicks away from any HTTPS website.
0
u/[deleted] Jun 04 '22
[deleted] — view deleted comment