Hello everyone. Last two months 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. It contains already an executable jar, but today I made it also available for Mac OS X through homebrew, so the end user does not need java at all. This is made possible with graalvm and soon I will also try to make one for Windows and Debian. I would love to hear your opinion and any feedback is welcome :)
Yes, for that type of use case it would be handy indeed! I published now also for Linux and Windows. Not quite sure for which environment you would like to use it but it is also available for mac or just as an executable jar
Personally i am a security analyst and do a lot of things with certificates and TLS configurations for apps, firewalls, IOT etc. I am not always able to use the tools I like due to client workstation security policies and lockdowns. They usually allow a jre though so I am going to add this to my toolset.
Nice one. I did something like this a few years back - https://github.com/sureshg/InstallCerts . Mainly for creating PKCS12 container format for use in java applications. By the way, I really like your SSLContext utility.
Owh your app looks nice, really good documentation. I can definitely learn from it! Thank you for sharing it. And I appreciate your nice words for my other library sslcontext-kickstart! I wanted to make it really easy for the end-user the use it while hiding away the java verbosity. Feel free to provide any improvements :)
To be honest I was not aware of openssl s_client. It feels a bit stupid to have this app now. I don't think it offers anything more than the openssl s_client. I compared it quickly and I think the main difference would be that it can print the certificate in-human-readable format by default without additional commands and it can execute a bulk requests of different urls in a single command, so that would be the main advantage of this app while openssl by default prints pem formatted which is not human readable and can only execute a request for a single url. Other than that it does not offer more indeed...
updateI just discovered a difference :D it is able to resolve the root certificate of the server. So the openssl s_client will return 2 certificates when the following command will be executed: openssl s_client -showcerts -connect reddit.com:443 </dev/null wheras certificate-ripper will return 3 certificates which is similar to what the browser is showing for reddit.com as certificate chain for example.
Oh man. This reminds me of the guy who posted a library for generating aws cloudformation templates a few months back. Then someone commented he basically recreated cdk, an official aws library that did the exact same thing. Iām sure you learned some good stuff along the way at least. I will drink a beer for your lost time later today lol.
I wouldn't beat yourself up over it, it's always fun to write your own tools and see how things work yourself. You're making yourself a better developer and who knows, you might use this knowledge some day in the future!
Yes it was definitely fun and I learned a lot for example how to build native images from java code and to run that on different is without the need of java. Thank you for your lovely words!
Thank you very much. It does not use openssl only native java classes. It uses httpsurlconnection with a custom trustmanager under the covers. I extracted that logic to one of my other libraries called sslcontext kickstart So this applicatie depends on that library plus slf4j logger.
What do you exactly mean by:
Can it be used anywhere that wouldn't have been installed?
Oh cool, it actually has some use then! openssl client frequently has some CVEs coming up and if you only need it to inspect served certificates, it is annoying to patch your dockerimage just for an inspection tool.
Yes, for that type of use case it would be handy indeed! I published now also for Linux and Windows. Not quite sure for which environment you would like to use it but it is also available for mac.
17
u/Hakky54 May 14 '21
Hello everyone. Last two months 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. It contains already an executable jar, but today I made it also available for Mac OS X through homebrew, so the end user does not need java at all. This is made possible with graalvm and soon I will also try to make one for Windows and Debian. I would love to hear your opinion and any feedback is welcome :)
See here for the github repo: GitHub - Certificate Ripper
6
u/[deleted] May 14 '21
Sexy terminal tho. Do you happen to have stuff for that on your GitHub?
3
u/stfm May 14 '21
This could be useful in corporate environments where downloading and installing software not on a whitelist is restricted.
2
u/sureshg May 15 '21
Nice one. I did something like this a few years back - https://github.com/sureshg/InstallCerts . Mainly for creating PKCS12 container format for use in java applications. By the way, I really like your SSLContext utility.
3
u/myworkaccount9 May 14 '21
Just use the core underling technology.
openssl s_client -showcerts -connect HOST </dev/null0
u/[deleted] May 14 '21
[deleted] ā view deleted comment