Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identify what cipher strength HTTPS apache connections are using

How can I identify the cipher strength of an active https connection to a linux redhat apache webserver. I want to harden my web server by removing lower strength ciphers and would like to check if clients are even using them.

EDIT My goal is to avoid negative impact of removal of a lower security cipher that a client relies on. Worst case scenario there is a stupid non browser (or old browser) app that is using an old insecure cipher, when I disallow the use of this cipher his/her app could break. I'm trying to proactively identify if there are any apps/browsers using any of the ciphers I'm going to disable.

like image 494
Dax Avatar asked Dec 07 '25 06:12

Dax


2 Answers

You can identify unsuccessful handshakes by enabling the appropriate level of logging on mod_ssl. See the Custom Log Formats section on http://httpd.apache.org/docs/2.2/mod/mod_ssl.html, notably

CustomLog logs/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

This should enable you to make a list of ciphers requested by clients and configure Apache accordingly.

like image 134
sce Avatar answered Dec 08 '25 19:12

sce


Your question and your goal aren't necessarily related. Each active connection may use a difference cipher based on the combination of: (a) the capabilities on the server (b) the capabilities of the client (c) cipher preference of the server and client. Looking at any individual connection will not tell you if your SSL configuration is optimal.

If your goal is to harden your SSL configuration, I suggest you use the SSL Server Test from SSL labs. It grades your server configuration based on known SSL vulnerabilities and best practices.

The last time I updated my SSL configuration I used the configuration tips from this blog post. Note that understanding of SSL vulnerabilities is constantly changing so I suggest you rerun the test every once in a while to ensure your configuration is the best that is currently known.

like image 22
Oz Solomon Avatar answered Dec 08 '25 21:12

Oz Solomon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!