Skip to content

SSLScan

sudo apt-get install sslscan
sudo yum install sslscan
brew install sslscan
git clone https://github.com/rbsec/sslscan.git
cd sslscan
./configure
make
sudo make install
docker pull nmap/nmap:latest
docker run -it nmap/nmap sslscan example.com:443
sslscan example.com
sslscan example.com:443
sslscan example.com:8443
sslscan --no-failed example.com
sslscan -v example.com
sslscan -q example.com
sslscan --show-certificate example.com
sslscan --show-certificate example.com | grep -A 50 "Certificate"
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
sslscan --show-certificate example.com
openssl s_client -connect example.com:443 </dev/null 2>/dev/null | openssl x509 -text -noout
sslscan example.com
sslscan example.com | grep -i "weak"
sslscan example.com | grep -E "256|128|64"
sslscan example.com > ciphers.txt
openssl s_client -connect example.com:443 -cipher 'DES-CBC3-SHA' 2>/dev/null | head -n 20
sslscan example.com
sslscan example.com | grep -i "sslv2"
sslscan example.com | grep -i "sslv3"
sslscan example.com | grep -E "TLSv1\.0|TLSv1\.1"
sslscan example.com | grep -E "TLSv1\.[2-3]"
openssl s_client -connect example.com:443 -ssl2    # SSLv2
openssl s_client -connect example.com:443 -ssl3    # SSLv3
openssl s_client -connect example.com:443 -tls1    # TLSv1.0
openssl s_client -connect example.com:443 -tls1_1  # TLSv1.1
openssl s_client -connect example.com:443 -tls1_2  # TLSv1.2
openssl s_client -connect example.com:443 -tls1_3  # TLSv1.3
sslscan example.com | grep -i "heartbleed"
echo -n "Q" | openssl s_client -connect example.com:443 2>/dev/null | grep -i heartbeat
sslscan example.com | grep -i "poodle\|sslv3"
sslscan example.com | grep -E "TLSv1\.0|CBC"
sslscan example.com | grep -i "compression"
sslscan example.com | grep -i "weak.*key\|512.*rsa"
sslscan example.com | grep -i "rc4"
sslscan example.com | grep -i "sslv2"
sslscan --no-failed example.com | grep -iE "vulnerable|weak|sslv2|sslv3|heartbleed|poodle"
sslscan --starttls example.com:25
sslscan --starttls example.com:587
sslscan --starttls example.com:143
sslscan --starttls example.com:110
sslscan --starttls example.com:21
sslscan --starttls example.com:389
sslscan --starttls example.com:5222
echo "EHLO example.com" | nc example.com 25 | grep -i "starttls"
sslscan --xml=report.xml example.com
cat report.xml | grep -E "protocol|cipher|certificate"
sslscan example.com > report.txt
sslscan example.com | awk '{print $0}' > report.json
sslscan example.com 2>&1 | tee report.log
sslscan example.com > baseline.txt
sslscan example.com > current.txt
diff baseline.txt current.txt
cat hosts.txt | while read host; do sslscan "$host" >> results.txt; done
while IFS=: read -r host port; do sslscan "$host:$port" >> batch-results.txt; done < hosts.txt
cat hosts.txt | xargs -P 5 -I {} sslscan {} > batch-results.txt
nmap -p 443 10.0.0.0/24 -oG - | awk '/open/{print $2}' | while read ip; do sslscan "$ip"; done
for host in $(cat hosts.txt); do
  sslscan --xml="$host.xml" "$host"
  echo "Scanned: $host"
done
timestamp=$(date +%Y%m%d_%H%M%S)
sslscan example.com > "scans/example_$timestamp.txt"
sslscan --client-cert=cert.pem --client-key=key.pem example.com
openssl s_client -cert client.pem -key client-key.pem -connect example.com:443
openssl verify -CAfile ca-chain.pem client.pem
openssl x509 -in client.pem -text -noout
echo | openssl s_client -connect example.com:443 -tlsextdebug 2>/dev/null | grep -A 2 "OCSP"
echo | openssl s_client -connect example.com:443 -status 2>/dev/null | grep "OCSP response"
openssl s_client -connect example.com:443 -tlsextdebug 2>&1 | grep -i "ocsp"
sslscan --no-sni example.com
sslscan --timeout=10 example.com
sslscan --ip=192.168.1.1 example.com
sslscan --no-sni example.com
sslscan example.com
sslscan mail.example.com

Comparison: SSLScan vs testssl.sh vs sslyze

Section titled “Comparison: SSLScan vs testssl.sh vs sslyze”
FeatureSSLScantestssl.shsslyze
LanguageC/C++BashPython
SpeedFastMediumFast
ProtocolsSSL/TLSSSL/TLS/HTTP/DNSSSL/TLS
Vulnerability ChecksBasicComprehensiveGood
STARTTLS SupportYesYesYes
Output FormatsText, XMLText, JSON, CSVText, JSON
InstallationEasyNo depsPython required
CommunityActiveVery ActiveActive
CVE CoverageStandardExtensiveGood
Best ForQuick scansDeep auditsAutomated checks
  • Quick SSL/TLS configuration checks
  • Simple vulnerability screening
  • Batch scanning multiple hosts
  • Resource-constrained environments
  • CI/CD integration
  • Comprehensive security audits
  • Deep vulnerability analysis
  • Regulatory compliance checks
  • Edge case testing
  • Maximum CVE coverage
  • Automated security testing
  • Python integration
  • API-based scanning
  • CI/CD pipelines
  • Large-scale assessments
sslscan --show-certificate example.com | tee audit.txt
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates
sslscan example.com | grep -E "sslv2|sslv3|TLSv1\.0|weak" && echo "Non-compliant" || echo "Compliant"
sslscan --no-failed example.com > compliance-report.txt
sslscan example.com > before.txt
# Update SSL/TLS config
sslscan example.com > after.txt
diff before.txt after.txt
for host in web1 web2 web3; do
  echo "=== $host ===" >> weak-ciphers.txt
  sslscan "$host" | grep -i "weak" >> weak-ciphers.txt
done