SSL Penetration Test Checklist


This tool does a good job: https://testssl.sh/

SSL Checklist for Pentesters - the Manual Cheatsheet

This table accompanies the presentation referenced here. It lists various SSL/TLS checks that can be performed manually with OpenSSL or a browser. Sometimes the column "insecure result" doesn't actually refer to an insecure configuration (for example, it may be a nice-to-have) but this should be clear from the context of the issue or the comments.
IssueManual checkInsecure resultSecure resultComments
SSLv2openssl s_client -ssl2 -connect host:portIt connects!It doesn't connect!OpenSSL <1.0.0
SSLv3openssl s_client -ssl3 -connect host:portIt connects!It doesn't connect!Disable to prevent POODLE attack - and it's generally old and creaky anyway - but doing so will stop default instances of IE6 connecting
TLS > v1.0openssl s_client -tls1_1 -connect host:port
openssl s_client -tls1_2 -connect host:port
It doesn't connect!It connects!OpenSSL >1.0.0
Not insecure if missing but see presentation
Secure renegotiationsupportedopenssl s_client -connect host:portOpenSSL output reports "Secure Renegotiation IS NOT supported"OpenSSL output reports "Secure Renegotiation IS supported"OpenSSL >0.9.8l (BackTrack 5 R3 had a patched v0.9.8k that worked)
If it's not supported but client-initiated renegotiation is disabled then it's not an issue
Client-initiated securerenegotiation enabledopenssl s_client -connect host:port
HEAD / HTTP/1.0
R
Renegotation succeeds at R
HTTP response returned
Renegotiation fails at ROpenSSL >0.9.8l
Add -crlf if HTTP response not returned
DoS attack
Client-initiated insecurerenegotiationopenssl s_client -connect host:port
HEAD / HTTP/1.0
R
Renegotation succeeds at R
HTTP response returned
Renegotiation fails at ROpenSSL <0.9.8l (BackTrack 5 R3 had a patched v0.9.8k that worked)
Add -crlf if HTTP response not returned
CVE-2009-3555 and DoS
Public key size <= 1024-bitopenssl s_client -connect host:portOpenSSL output reports "Server public key is " <=1024 " bit"OpenSSL output reports "Server public key is " >1024 " bit"
Invalid certificate chainUse browser (not through proxy)Certificate errorNo certificate errorIs your browser checking for revocation (up the entire chain)? - see presentation
Certificate expiredUse browser (not through proxy)Certificate errorNo certificate errorIs your date/time correct?
Certificate with imminent expiryUse browser (not through proxy)
Examine certificate field expiry date
Less than a month to goMore than a month to goObviously not insecure (yet): just for client's information
EV certificateUse browser (not through proxy)
Examine address bar
Address bar not greenAddress bar greenExactly where the address bar is green depends on the browser
Not insecure if missing
Certificate signed using MD5 or SHA-1Use browser (not through proxy)
Examine certificate's signature [hash] algorithm field
MD5 or SHA-1One of the SHA-2 family
Certificate revocation mechanismsUse browser (not through proxy)
Examine certificate CRL and AIA fields
Field missingBoth fields populatedIf AIA field missing, browser may not check CRL
Certificate revoked including upstream chainUse Internet Explorer (not through proxy) with registry change:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WARN_ON_SEC_CERT_REV_FAILED
iexplore.exe=1 (DWORD)
Certificate errorNo certificate error with no warning about inability to check revocationOpera apparently also does OCSP with CRL fallback for whole chain
OCSP Staplingopenssl s_client -status -tlsextdebug -connect site:portCert status: revoked or unknown (invalid test)Cert status: goodRFC2560: good means "the certificate is not revoked, but does not necessarily mean that the certificate was ever issued or that the time at which the response was produced is within the certificate's validity interval"
Certificate subjectUse browser (not through proxy)
Examine certificate subject and subject alternative names fields
Mismatch between subject and hostname
Wildcard certificate
Certificate valid for target hostname (with or without www prefix)
No wildcard

Invalid certificate when Server Name Indication (SNI) missingCompare certificate returned from openssl s_client -connect site:port with and without -servername  optionInvalid certificate returned without -servername optionValid certificate returned without -servername option-ssl3 should show same result as test without -servername
Weak cipher suitesopenssl s_client -cipher NULL,EXPORT,LOW,3DES -connect site:portConnection succeeds with <128-bit or Triple DES cipherConnection failsIf successful, this will only prove that one of possibly many such ciphers is supported: tools are more comprehensive
Use just EXPORT to check for exposure to FREAK
Anonymous cipher suitesopenssl s_client -cipher aNULL -connect site:portConnection succeedsConnection failsIf successful, this will only prove that one of possibly many such ciphers is supported: tools are more comprehensive
Server preferenceopenssl s_client [-ssl2|-ssl3|tls1|tls1_1|tls1_2] -cipher -connect site:port
Change the order of CIPHERS to change client preference e.g.DEFAULT:+RC4 will make RC4 ciphers in the default set the leastpreferred
A preferred cipher will be selected irrespective of client's preference
For valid CIPHERS values refer to man ciphers or here or here
Different cipher suites may be supported per protocol
Only insecure if preferred cipher is weak
Cipher suite order recommendations from Mozilla
I wrote a post on this topic here.
Forward Secrecyopenssl s_client -cipher EDH,EECDH -connect site:portUnsupported
Supported but not preferred
Supported and preferredOpenSSL >=1.0.0 (later versions will tend to support more ephemeral ciphers)
RC4openssl s_client -cipher RC4 -connect site:portConnection succeedsConnection failsIf successful, this will only prove that one of possibly many such ciphers is supported: tools are more comprehensive
Also check server preference
CRIMEopenssl s_client -connect site:portOpenSSL output "Compression:" line is not "NONE", e.g. "zlib compression"OpenSSL output "Compression: NONE"Ensure the OpenSSL version in use supports compression: check Client Hello in Wireshark for a list of Compression Methods
CRIME (SPDY)openssl s_client -nextprotoneg NULL -connect site:port
Examine OpenSSL output "Protocols advertised by server"
Protocol list includes SPDY version <4No "Protocols advertised by server" or line does not include SPDY version <4SPDY version 4 said to address the problem but not yet released
Heartbeat enabledopenssl s_client -tlsextdebug -connect site:portOpenSSL reports "TLS server extension heartbeat"Heartbeat disabledOpenSSL >=1.0.1
HeartbleedTools only

Be wary of buggy tools that report false negatives [thanks to @anantshri]
Some tools are more aggressive than others
If tool relies on OpenSSL then 1.0.1-1.0.1f
Change Cipher Spec (CCS) flawTools only

If tool relies on OpenSSL then <1.0.1h, <1.0.0m, <0.9.8za
POODLEFor SSL, check for SSLv3 (above)
For TLS, refer to this posting



TLS_FALLBACK_SCSV supportopenssl s_client -ssl3 -fallback_scsv -connect site:port
-ssl3 specifically with POODLE in mind but it's bigger than that
It connectsIt fails with "inappropriate fallback" alertOpenSSL >=1.0.1j
See my other posts for more info.

Source: http://www.exploresecurity.com/wp-content/uploads/custom/SSL_manual_cheatsheet.html