| name | testssl |
| description | Auth/lab ref: testssl.sh: broad TLS/SSL testing script checking protocol support, cipher suites, vulnerabilities (BEAST, POODLE, Heartbleed, ROBOT, DROWN, etc.), and certificate issues. |
| license | GPL-2.0 |
| compatibility | Linux / macOS / Windows (WSL/Cygwin); Bash 3.2+, OpenSSL or LibreSSL. |
| metadata | {"author":"AeonDave","version":"1.0"} |
testssl.sh
TLS/SSL testing script — protocols, ciphers, vulnerabilities, certificates.
Quick Start
testssl.sh https://target.com
testssl.sh target.com:8443
testssl.sh --starttls smtp mail.target.com:25
Core Flags
| Flag | Purpose |
|---|
-p | Check protocols (SSLv2/3, TLS 1.0-1.3) |
-s | List cipher suites (preferred + supported) |
-f | Check forward secrecy |
-h | Check HSTS / HPKP |
-U | Test all vulnerabilities |
-E | List cipher suites per protocol |
-B | Heartbleed (OpenSSL vulnerability) |
--beast | BEAST attack check |
--breach | BREACH check |
--crime | CRIME check |
--lucky13 | Lucky13 timing attack |
--poodle | POODLE (SSLv3) |
--sweet32 | Birthday attacks on 64-bit block ciphers |
--logjam | Logjam (DH key exchange weakness) |
--drown | DROWN attack (SSLv2 overlap) |
--ticketbleed | Ticketbleed (F5 vulnerability) |
--robot | ROBOT attack |
--tls-fallback | TLS_FALLBACK_SCSV check |
-e | List all supported ciphers |
--protocols | List supported protocols only |
--server-defaults | Server defaults (cert, session, etc.) |
--server-preference | Server cipher preference |
--client-simulation | Simulate handshake with common clients |
--starttls <proto> | STARTTLS: smtp / pop3 / imap / ftp / xmpp / ldap |
--mx | Test all MX records of a domain (mail servers) |
--file <file> | Batch mode — one target per line |
--mode parallel | Run batch in parallel (use with --file) |
--outprefix <str> | Prefix for all output files in batch mode |
--append | Append to existing output file |
--ip <ip> | Force specific IP for SNI hosts |
--proxy <host:port> | SOCKS5/HTTP proxy |
--sneaky | Sneaky mode (minimal headers) |
--ids-friendly | Avoid IDS trigger patterns |
-t <n> | Timeout per connection |
--connect-timeout <n> | Connection timeout |
--openssl <path> | Specify OpenSSL binary to use |
-oJ <file> | JSON output |
-oC <file> | CSV output |
-oH <file> | HTML output |
-oA <file> | All output formats (adds extensions) |
--color <0-3> | Color output level |
--quiet | Minimal output |
--warnings batch | Batch mode (no interactive prompts) |
--parallel | Parallel testing (faster, less reliable) |
--nodns <min> | Skip DNS reverse lookups |
Vulnerability Checks (-U runs all)
| Flag | Vulnerability | Impact |
|---|
--heartbleed | Heartbleed (CVE-2014-0160) | Memory leak → private key |
--ccs | CCS Injection (CVE-2014-0224) | MITM |
--ticketbleed | Ticketbleed (CVE-2016-9244) | Memory leak |
--robot | ROBOT (RSA PKCS#1 oracle) | RSA key recovery |
--breach | BREACH | HTTP compression info leak |
--crime | CRIME | TLS compression info leak |
--beast | BEAST | CBC mode attack (TLS 1.0) |
--poodle | POODLE | SSLv3 CBC attack |
--sweet32 | Sweet32 | 3DES birthday attack |
--logjam | Logjam | DH 512/1024-bit export weakness |
--drown | DROWN | SSLv2 cross-protocol attack |
--lucky13 | Lucky13 | CBC timing attack |
--tls-fallback | Downgrade fallback | Missing SCSV |
--freak | FREAK | Export RSA key exchange |
--rc4 | RC4 biases | Statistical attacks |
Protocol & Cipher Assessment
testssl.sh -p target.com
testssl.sh -s target.com
testssl.sh -f target.com
testssl.sh -E target.com
Common Workflows
testssl.sh -U -p -s -h -f --server-defaults target.com
testssl.sh -U --quiet target.com
testssl.sh --starttls smtp mail.target.com:587
testssl.sh --starttls imap mail.target.com:143
testssl.sh --jsonfile report.json -U target.com
testssl.sh -oH report.html -U -p -s target.com
testssl.sh -oA report -U -p -s -f target.com
testssl.sh --client-simulation target.com
testssl.sh --file targets.txt --warnings batch -U --quiet
testssl.sh --file targets.txt --mode parallel --warnings batch \
-oA pentest-$(date +%Y%m%d)
testssl.sh --mx example.com
testssl.sh --sneaky --ids-friendly --nodns min -U target.com
Key Findings for Reports
| Finding | Severity | Recommendation |
|---|
| SSLv2 enabled | Critical | Disable immediately |
| SSLv3 enabled | Critical | Disable (POODLE) |
| TLS 1.0 enabled | Medium/High | Disable if possible |
| Heartbleed | Critical | Patch OpenSSL |
| ROBOT | High | Disable RSA key exchange |
| NULL ciphers | Critical | Remove |
| EXPORT ciphers | Critical | Remove |
| RC4 ciphers | High | Remove |
| 3DES (Sweet32) | Medium | Remove |
| DH < 2048-bit | Medium | Use 2048+ bit DH |
| Self-signed cert | Medium | Replace with trusted CA |
| Expired cert | High | Renew certificate |
| No HSTS | Low/Medium | Add Strict-Transport-Security |
| No PFS | Medium | Enable ECDHE ciphers |
| SHA1 certificate | Medium | Replace with SHA256+ |
Output Parsing
cat report.json | jq '.[] | select(.severity != "OK" and .severity != "INFO") | {id: .id, severity: .severity, finding: .finding}'
cat report.json | jq '[.[] | .severity] | group_by(.) | map({severity: .[0], count: length})'
cat report.json | jq '.[] | select(.id | startswith("cert")) | {id: .id, finding: .finding}'
cat report.json | jq '.[] | select(.severity == "CRITICAL" or .severity == "HIGH") | {id, finding}'
Resources
| File | When to load |
|---|
references/tls-hardening.md | TLS configuration best practices, cipher suite recommendations, HSTS setup |