brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: nmap --script ssl-enum-ciphers grades the TLS ciphers a server offers

Nmap
~/tips/tip-security-nmap-ssl-enum-ciphers

nmap --script ssl-enum-ciphers -p 443 proxy.example.com

Lists every TLS protocol and cipher a server accepts and grades the weakest one from A to F.

To see which TLS ciphers your own reverse proxy accepts, you do not need a website. Nmap has a script for it.

The ssl-enum-ciphers script opens many SSLv3 and TLS connections, offers a different cipher each time and records which ones the server accepts. You get the accepted cipher suites per protocol version at the end.

nmap --script ssl-enum-ciphers -p 443 proxy.example.com

The docs recommend combining it with version detection, -sV, so TLS services on unexpected ports are found too:

nmap -sV --script ssl-enum-ciphers -p 8443 192.168.1.10

Each cipher suite gets a letter from A to F for the strength of its key exchange and cipher. The hash algorithm does not count in the grade. The line that starts with Least strength shows the weakest cipher on offer, and I read that one first. The script also warns about things like MD5-signed certificates and weak ephemeral Diffie-Hellman parameters.

The docs call the script intrusive. It has to open many connections, which makes it noisy and easy to spot, so point it only at servers you run yourself. Read the output as a list of what the server accepts and judge the letters against what your clients need. A weak suite that no client uses can often just be switched off in the server config.

Further reading: ssl-enum-ciphers NSE script

More Nmap tips nmap --packet-trace -p 22,80 192.0.2.10 nmap -p 22,80,443 -oG scan.gnmap 192.0.2.0/24 nmap -sV 192.0.2.10 sudo nmap -sU -p 53,67,123,161 192.0.2.10 nmap -sL 192.0.2.0/28 All Nmap tips (12) All topics

Link