Rappel :
Attention dans cet article l’outils est utilisé pour la recherche et l’apprentissage.
Ce type d’outils ne doit pas être utilisé vers un serveur qui ne vous appartient pas, ceci peut être puni par la loi (voir les articles 323-XX).
Environnement de test :
Pour cela nous allons utiliser une VM tournant sur la distribution Kali .
Installation du script :
Recupération du script
Aller sur le site https://testssl.sh/ et récupérer le script shell testssl.sh.
Rendre le script exécutable une fois la récupération éffectuée.
$ chmod + x testssl . sh
Utilisation :
La commande et ses options
root @kali :~ # ./testssl.sh -h
No mapping file found
testssl . sh < options >
- h , -- help what you 're looking at
-b, --banner displays banner + version of testssl.sh
-v, --version same as previous
-V, --local pretty print all local ciphers
-V, --local <pattern> which local ciphers with <pattern> are available?
(if pattern not a number: word match)
testssl.sh <options> URI ("testssl.sh URI" does everything except -E)
-e, --each-cipher checks each local cipher remotely
-E, --cipher-per-proto checks those per protocol
-f, --ciphers checks common cipher suites
-p, --protocols checks TLS/SSL protocols
-S, --server_defaults displays the servers default picks and certificate info
-P, --preference displays the servers picks: protocol+cipher
-y, --spdy, --npn checks for SPDY/NPN
-x, --single-cipher <pattern> tests matched <pattern> of ciphers
(if <pattern> not a number: word match)
-U, --vulnerable tests all vulnerabilities
-B, --heartbleed tests for heartbleed vulnerability
-I, --ccs, --ccs-injection tests for CCS injection vulnerability
-R, --renegotiation tests for renegotiation vulnerabilities
-C, --compression, --crime tests for CRIME vulnerability
-T, --breach tests for BREACH vulnerability
-O, --poodle tests for POODLE (SSL) vulnerability
-Z, --tls-fallback checks TLS_FALLBACK_SCSV mitigation
-F, --freak tests for FREAK vulnerability
-A, --beast tests for BEAST vulnerability
-J, --logjam tests for LOGJAM vulnerability
-s, --pfs, --fs,--nsa checks (perfect) forward secrecy settings
-4, --rc4, --appelbaum which RC4 ciphers are being offered?
-H, --header, --headers tests HSTS, HPKP, server/app banner, security headers, cookie, reverse proxy, IPv4 address
special invocations:
-t, --starttls <protocol> does a default run against a STARTTLS enabled <protocol>
--xmpphost <to_domain> for STARTTLS enabled XMPP it supplies the XML stream to-'' domain -- sometimes needed
--mx <domain/host> tests MX records from high to low priority (STARTTLS, port 25)
--ip <ipv4> a) tests the supplied <ipv4> instead of resolving host(s) in URI
b) arg "one" means: just test the first DNS returns (useful for multiple IPs)
--file <file name> mass testing option: Just put multiple testssl.sh command lines in <file name>,
one line per instance. Comments via # allowed, EOF signals end of <file name>.
partly mandatory parameters:
URI host|host:port|URL|URL:port (port 443 is assumed unless otherwise specified)
pattern an ignore case word pattern of cipher hexcode or any other string in the name, kx or bits
protocol is one of ftp,smtp,pop3,imap,xmpp,telnet,ldap (for the latter two you need e.g. the supplied openssl)
tuning options:
--assuming-http if protocol check fails it assumes HTTP protocol and enforces HTTP checks
--ssl-native fallback to checks with OpenSSL where sockets are normally used
--openssl <PATH> use this openssl binary (default: look in $PATH, $RUN_DIR of testssl.sh
--proxy <host>:<port> connect via the specified HTTP proxy
--sneaky be less verbose wrt referer headers
--quiet don' t output the banner . By doing this you acknowledge usage terms normally appearing in the banner
-- wide wide output for tests like RC4 , BEAST . PFS also with hexcode , kx , strength , RFC name
-- show - each for wide outputs: display all ciphers tested -- not only succeeded ones
-- warnings < batch | off | false > "batch" doesn 't wait for keypress, "off" or "false" skips connection warning
--color <0|1|2> 0: no escape or other codes, 1: b/w escape codes, 2: color (default)
--debug <0-6> 1: screen output normal but debug output in temp files. 2-6: see line ~105
All options requiring a value can also be called with ' = ' ( e . g . testssl . sh - t = smtp -- wide -- openssl = /usr/ bin / openssl < URI > .
< URI > is always the last parameter .
Need HTML output? Just pipe through "aha" ( Ansi HTML Adapter : github . com / theZiz / aha ) like
"testssl.sh <options> <URI> | aha >output.html"
La commande de base
root @kali :~ # ./testssl.sh mail.google.com
No mapping file found
###########################################################
testssl . sh 2.6 from https :/ / testssl . sh /
( 1.379 c 2015 / 09 / 29 16 : 47 : 47 )
This program is free software . Distribution and
modification under GPLv2 permitted .
USAGE w / o ANY WARRANTY . USE IT AT YOUR OWN RISK !
Please file bugs @ https :/ / testssl . sh / bugs /
###########################################################
Using "OpenSSL 1.0.2g 1 Mar 2016" [ ~ 124 ciphers ] on
kali :/ usr / bin / openssl
( built: "reproducible build, date unspecified" , platform: "debian-amd64" )
Testing now ( 2016 - 07 - 26 10 : 21 ) ---> 172.217 . 20.37 : 443 ( mail . google . com ) <---
further IP addresses: 2 a00 : 1450 : 4007 : 80 e :: 2005
rDNS ( 172.217 . 20.37 ): par10s09 - in - f5 . 1e100 . net .
Service detected: HTTP
--> Testing protocols ( via sockets except TLS 1.2 and SPDY / NPN )
SSLv2 not offered ( OK )
SSLv3 not offered ( OK )
TLS 1 offered
TLS 1.1 offered
TLS 1.2 offered ( OK )
SPDY / NPN h2 , spdy / 3.1 , http / 1.1 ( advertised )
--> Testing ~ standard cipher lists
Null Ciphers not offered ( OK )
Anonymous NULL Ciphers not offered ( OK )
Anonymous DH Ciphers not offered ( OK )
40 Bit encryption Local problem: No 40 Bit encryption configured in /usr/ bin / openssl
56 Bit encryption Local problem: No 56 Bit encryption configured in /usr/ bin / openssl
Export Ciphers ( general ) Local problem: No Export Ciphers ( general ) configured in /usr/ bin / openssl
Low ( <= 64 Bit ) Local problem: No Low ( <= 64 Bit ) configured in /usr/ bin / openssl
DES Ciphers Local problem: No DES Ciphers configured in /usr/ bin / openssl
Medium grade encryption not offered ( OK )
Triple DES Ciphers offered ( NOT ok )
High grade encryption offered ( OK )
--> Testing ( perfect ) forward secrecy , ( P ) FS -- omitting 3 DES , RC4 and Null Encryption here
PFS is offered ( OK ) ECDHE - ECDSA - AES256 - GCM - SHA384 ECDHE - RSA - AES256 - GCM - SHA384 ECDHE - RSA - AES256 - SHA384 ECDHE - ECDSA - AES256 - SHA384 ECDHE - RSA - AES256 - SHA ECDHE - ECDSA - AES256 - SHA ECDHE - ECDSA - AES128 - GCM - SHA256 ECDHE - RSA - AES128 - GCM - SHA256 ECDHE - ECDSA - AES128 - SHA256 ECDHE - RSA - AES128 - SHA256 ECDHE - RSA - AES128 - SHA ECDHE - ECDSA - AES128 - SHA
--> Testing server preferences
Has server cipher order? yes ( OK )
Negotiated protocol TLSv1 . 2
Negotiated cipher ECDHE - ECDSA - AES128 - GCM - SHA256 , 256 bit ECDH
Cipher order
TLSv1 : ECDHE - ECDSA - AES128 - SHA ECDHE - ECDSA - AES256 - SHA ECDHE - RSA - AES128 - SHA AES128 - SHA DES - CBC3 - SHA ECDHE - RSA - AES256 - SHA AES256 - SHA
TLSv1 . 1 : ECDHE - ECDSA - AES128 - SHA ECDHE - ECDSA - AES256 - SHA ECDHE - RSA - AES128 - SHA AES128 - SHA DES - CBC3 - SHA ECDHE - RSA - AES256 - SHA AES256 - SHA
TLSv1 . 2 : ECDHE - ECDSA - AES128 - GCM - SHA256 ECDHE - ECDSA - AES128 - SHA ECDHE - ECDSA - AES256 - GCM - SHA384 ECDHE - ECDSA - AES128 - SHA256 ECDHE - ECDSA - AES256 - SHA ECDHE - ECDSA - AES256 - SHA384 ECDHE - RSA - AES128 - GCM - SHA256 ECDHE - RSA - AES128 - SHA AES128 - GCM - SHA256 AES128 - SHA AES128 - SHA256 DES - CBC3 - SHA ECDHE - RSA - AES256 - GCM - SHA384 ECDHE - RSA - AES128 - SHA256 ECDHE - RSA - AES256 - SHA ECDHE - RSA - AES256 - SHA384 AES256 - GCM - SHA384 AES256 - SHA AES256 - SHA256
h2: ECDHE - RSA - AES128 - GCM - SHA256 ECDHE - RSA - AES128 - SHA AES128 - GCM - SHA256 AES128 - SHA AES128 - SHA256 DES - CBC3 - SHA ECDHE - RSA - AES256 - GCM - SHA384 ECDHE - RSA - AES128 - SHA256 ECDHE - RSA - AES256 - SHA ECDHE - RSA - AES256 - SHA384 AES256 - GCM - SHA384 AES256 - SHA AES256 - SHA256
spdy / 3.1 : ECDHE - RSA - AES128 - GCM - SHA256 ECDHE - RSA - AES128 - SHA AES128 - GCM - SHA256 AES128 - SHA AES128 - SHA256 DES - CBC3 - SHA ECDHE - RSA - AES256 - GCM - SHA384 ECDHE - RSA - AES128 - SHA256 ECDHE - RSA - AES256 - SHA ECDHE - RSA - AES256 - SHA384 AES256 - GCM - SHA384 AES256 - SHA AES256 - SHA256
http / 1.1 : ECDHE - RSA - AES128 - GCM - SHA256 ECDHE - RSA - AES128 - SHA AES128 - GCM - SHA256 AES128 - SHA AES128 - SHA256 DES - CBC3 - SHA ECDHE - RSA - AES256 - GCM - SHA384 ECDHE - RSA - AES128 - SHA256 ECDHE - RSA - AES256 - SHA ECDHE - RSA - AES256 - SHA384 AES256 - GCM - SHA384 AES256 - SHA AES256 - SHA256
--> Testing server defaults ( Server Hello )
TLS server extensions renegotiation info , server name , session ticket , EC point formats
Session Tickets RFC 5077 100800 seconds
Server key size EC 256 bit
Signature Algorithm SHA256 with RSA
Fingerprint / Serial SHA1 04 9885477 BEE6012283FD4D777ABF7046D778FC5 / 1144 F32C0739F308
SHA256 C59D84ACF5B829712E72A543A2B8DA3BB38BB7877B8B349761508C9C7D7B4C73
Common Name ( CN ) mail . google . com ( works w / o SNI )
subjectAltName ( SAN ) mail . google . com inbox . google . com
Issuer Google Internet Authority G2 ( Google Inc from US )
EV cert ( experimental ) no
Certificate Expiration >= 60 days ( 2016 - 07 - 13 09 : 26 --> 2016 - 10 - 05 09 : 17 - 0400 )
# of certificates provided 3
Certificate Revocation List http :/ / pki . google . com / GIAG2 . crl
OCSP URI http :/ / clients1 . google . com / ocsp
OCSP stapling not offered
TLS clock skew + 2 sec from localtime
--> Testing HTTP header response @ "/"
HTTP Status Code 301 Moved Permanently , redirecting to "/mail/"
HTTP clock skew + 1 sec from localtime
Strict Transport Security --
Public Key Pinning --
Server banner GSE
Application banner --
Cookie ( s ) ( none issued at "/" )
Security headers X - Frame - Options : SAMEORIGIN
X - XSS - Protection : 1 ; mode = block
X - Content - Type - Options : nosniff
Reverse Proxy banner --
--> Testing vulnerabilities
Heartbleed ( CVE - 2014 - 0160 ) not vulnerable ( OK )
CCS ( CVE - 2014 - 0224 ) not vulnerable ( OK )
Secure Renegotiation ( CVE - 2009 - 3555 ) not vulnerable ( OK )
Secure Client - Initiated Renegotiation not vulnerable ( OK )
CRIME , TLS ( CVE - 2012 - 4929 ) Local problem: /usr/ bin / openssl lacks zlib support
BREACH ( CVE - 2013 - 3587 ) NOT ok: uses gzip HTTP compression ( only "/" tested )
POODLE , SSL ( CVE - 2014 - 3566 ) not vulnerable ( OK )
TLS_FALLBACK_SCSV ( RFC 7507 ), experim . Downgrade attack prevention supported ( OK )
FREAK ( CVE - 2015 - 0204 ) Local problem: /usr/ bin / openssl doesn 't have any EXPORT RSA ciphers configured
LOGJAM (CVE-2015-4000), experimental Local problem: /usr/bin/openssl doesn' t have any DHE EXPORT ciphers configured
BEAST ( CVE - 2011 - 3389 ) TLS1 : DES - CBC3 - SHA
-- but also supports higher protocols ( possible mitigation ): TLSv1 . 1 TLSv1 . 2
RC4 ( CVE - 2013 - 2566 , CVE - 2015 - 2808 ) no RC4 ciphers detected ( OK )
--> Testing all locally available 124 ciphers against the server , ordered by encryption strength
Hexcode Cipher Suite Name ( OpenSSL ) KeyExch . Encryption Bits
-------------------------------------------------------------------------
xc030 ECDHE - RSA - AES256 - GCM - SHA384 ECDH 256 AESGCM 256
xc02c ECDHE - ECDSA - AES256 - GCM - SHA384 ECDH 256 AESGCM 256
xc028 ECDHE - RSA - AES256 - SHA384 ECDH 256 AES 256
xc024 ECDHE - ECDSA - AES256 - SHA384 ECDH 256 AES 256
xc014 ECDHE - RSA - AES256 - SHA ECDH 256 AES 256
xc00a ECDHE - ECDSA - AES256 - SHA ECDH 256 AES 256
x9d AES256 - GCM - SHA384 RSA AESGCM 256
x3d AES256 - SHA256 RSA AES 256
x35 AES256 - SHA RSA AES 256
xc02f ECDHE - RSA - AES128 - GCM - SHA256 ECDH 256 AESGCM 128
xc02b ECDHE - ECDSA - AES128 - GCM - SHA256 ECDH 256 AESGCM 128
xc027 ECDHE - RSA - AES128 - SHA256 ECDH 256 AES 128
xc023 ECDHE - ECDSA - AES128 - SHA256 ECDH 256 AES 128
xc013 ECDHE - RSA - AES128 - SHA ECDH 256 AES 128
xc009 ECDHE - ECDSA - AES128 - SHA ECDH 256 AES 128
x9c AES128 - GCM - SHA256 RSA AESGCM 128
x3c AES128 - SHA256 RSA AES 128
x2f AES128 - SHA RSA AES 128
x0a DES - CBC3 - SHA RSA 3 DES 168
Done now ( 2016 - 07 - 26 10 : 22 ) ---> 172.217 . 20.37 : 443 ( mail . google . com ) <---