Commit Graph

669 Commits

Author SHA1 Message Date
David Cooper
e8cc32af54 Merge branch 'master' into socksend_tls_clienthello_extensions 2016-06-02 09:16:45 -04:00
David Cooper
f5fcff22d6 Merge branch 'master' into run_allciphers(),run_cipher_per_proto(),-and-SSLv2 2016-06-02 09:14:20 -04:00
David Cooper
c593675b8e Merge branch 'master' into more_sslv2_sslv3_fixes 2016-06-02 09:09:57 -04:00
David Cooper
fc6b5070af Merge branch 'master' into fix_issue_276 2016-06-02 09:08:24 -04:00
Dirk Wetter
6a9b0e01fc - polishing #366 and IPv6-related 2016-06-02 09:59:52 +02:00
David Cooper
6825c0b363 Allow for certificates with no subjectAltName extension
While it seems that almost all certificates include a subjectAltName extension, need to allow for the possibility that the two certificates being compared don't have subjectAltName extensions.
2016-06-01 16:20:10 -04:00
David Cooper
3bc0d6b45c Fix issue #276
Here is my proposed change to fix issue #276.
2016-06-01 15:57:40 -04:00
David Cooper
a9cd3ec6ca Merge branch 'master' into version_negotiation
Conflicts:
	testssl.sh
2016-05-31 09:51:13 -04:00
typingArtist
2c69e83f5b https://github.com/drwetter/testssl.sh/issues/365 add UNBRACKETED_IPV6 quirks option
Since some OpenSSL binaries, namely Gentoo’s, don’t support bracketed
IPv6 addresses but unbracketed ones, specified as the -connect option,
the UNBRACKETED_IPV6 environment variable can be set to true for
disabling the automatic addition of brackets around IPv6 addresses on
such platforms.
2016-05-27 20:11:47 +02:00
typingArtist
cf62353fc6 https://github.com/drwetter/testssl.sh/issues/365 ensure DNS PTR lookups use un-bracketed IPv6 address
While standard OpenSSL requires the literal IPv6 address enclosed
in [brackets], standard DNS lookup tools don’t support the additional
characters. Before making reverse PTR lookups, these brackets have to
be removed from the IPv6 addresses.
2016-05-27 19:54:23 +02:00
Dirk Wetter
e1a8306286 - try to address #352
- WARNING in fileout is MEDIUM now
- NOT ok for medium on screen squashed
2016-05-27 17:43:45 +02:00
Dirk Wetter
6fb15e83fa global $OPENSSL_NR_CIPHERS 2016-05-26 12:56:55 +02:00
David Cooper
4d059f7106 Merge branch 'master' into version_negotiation 2016-05-25 16:57:37 -04:00
David Cooper
acc72a1daf Merge branch 'master' into socksend_tls_clienthello_extensions 2016-05-25 16:50:56 -04:00
David Cooper
a503d883c7 Merge branch 'master' into run_allciphers(),run_cipher_per_proto(),-and-SSLv2 2016-05-25 16:38:23 -04:00
David Cooper
f9757c4e4d Merge branch 'master' into more_sslv2_sslv3_fixes 2016-05-25 16:32:04 -04:00
David Cooper
2a4d987f31 Merged master fixed conflict. 2016-05-24 14:19:19 -04:00
David Cooper
e0c147ec86 run_pfs() and run_rc4() show each fixes
When run_rc4() is run with the "--show-each" option, but without the "--wide" option, a list of all RC4 ciphers is printed, without any distinction between those that are supported by the server and those that are not. This is the same issue I noted in #332 for run_pfs().

In run_pfs(), the displayed output was corrected, but all ciphers were still being added to $pfs_ciphers, so the list of supported PFS ciphers sent to fileout() was incorrect.

This PR fixes both issues.
2016-05-24 13:57:47 -04:00
Dirk
5a03e96304 - consequently removed "NOT ok" for not-av of TLS 1.2 2016-05-23 22:42:40 +02:00
Dirk Wetter
bf17a17b70 - 3DES in standard cipher list is medium, thus "NOT ok" is too much (need for elegant general way for "medium")
(see also https://www.keylength.com/en/8/)
2016-05-23 18:56:05 +02:00
Dirk Wetter
aa99c5eb88 - FIX #347
- LF removed in JSON
2016-05-20 13:45:53 +02:00
Dirk Wetter
803e363310 Merge pull request #356 from dcooper16/server_key_size
Fix typo in Server key size check
2016-05-20 08:16:48 +02:00
David Cooper
2ffed62d53 Recognize more signature algorithms
This PR adds to the list of signature algorithms recognized in certificate_info().
2016-05-19 16:45:56 -04:00
David Cooper
dccf9bef63 Fix typo in Server key size check
When certificate_info() is trying to determine what type of public key the server has so that it can determine whether the key size is acceptable, it sometimes looks at $cert_sig_algo rather than $cert_key_algo. This PR fixes that and also adds support for DSA public keys.
2016-05-19 16:39:06 -04:00
Dirk Wetter
9a1425da14 - FIX #354
- polish #353
2016-05-18 19:06:26 +02:00
David Cooper
2a0a382321 Don't use dec2hex
The dec2hex() was actually converting from hex to decimal. Since it was only being used in one place, and wasn't really needed there, I just deleted it.
2016-05-17 12:02:12 -04:00
David Cooper
cba7fddbdd Revised parse_tls_serverhello()
Revised parse_tls_serverhello() to more carefully check the response for errors, and to provide for more flexibility (e.g., if handshake messages are split across multiple fragments).
2016-05-16 16:52:51 -04:00
David Cooper
07a8bd3143 Support version negotiation test
The new test in PR #346 sends a TLSv1.4 ClientHello, so socksend_tls_clienthello() needs to include the signature algorithms extension if $tls_low_byte >= 3 rather than only if it is equal to 3.
2016-05-11 09:24:07 -04:00
Dirk Wetter
4eefe0df8b Merge pull request #314 from thomaspatzke/master
logfile, jsonfile and csvfile parameters work without =
2016-05-11 00:14:24 +02:00
David Cooper
1d4622ebab Additional checks in run_protocols()
One server I am testing responds to an SSLv3 ClientHello with TLSv1.2. If tls_sockets is being used, then testssl.sh responds with "#FIXME: downgraded. still missing a test case here." This PR fixes that, and in general checks the responses in run_protocols() more closely.

If tls_sockets is being used and the connection fails even though the server supports an earlier version of SSL/TLS, then it flags an error. If tls_sockets returns 2, then it verifies that $DETECTED_TLS_VERSION is equal to the highest version number supported by the server (that is also less than the version number in the ClientHello).

In addition, in order to test servers' support for version negotiation, it adds a new test that sends a TLSv1.4 ClientHello and verifies that the server responds with the highest version number that it supports. (This test only runs if both $using_sockets and $EXPERIMENTAL are true and server actually supports some version of SSL/TLS other than SSLv2.)
2016-05-06 15:12:53 -04:00
David Cooper
92c2b60d9b Signature Algorithms extension for TLSv1.2 only
Changed to only include the signature algorithms extension for TLSv1.2, since RFC 5246 says:

   Note: this extension is not meaningful for TLS versions prior to 1.2.
   Clients MUST NOT offer it if they are offering prior versions.
   However, even if clients do offer it, the rules specified in [TLSEXT]
   require servers to ignore extensions they do not understand.

Inclusion of the extension for TLS 1.1 didn't seem to cause any harm, but it seems better to follow the RFC and not include it for TLSv1.0 or TLSv1.1.
2016-05-05 17:08:40 -04:00
David Cooper
120a5c86ef Add padding extension
RFC 7685 notes that there is at least one TLS implementation that hangs if the client sends a ClientHello with a TLSCiphertext.length between 256 and 511 bytes, and so the padding extension was defined in order to get around this bug. (OpenSSL s_client includes this extension when the -bugs option is used.) So, I changed socksend_tls_clienthello() to include the padding extension if the CLientHello would have a length between 256 and 511 bytes, making the padding extension just large enough to make the ClientHello 512 bytes.

I also fixed a typo (a missing "0x") in the check for whether any ECC ciphers are included in the Client Hello.
2016-05-03 16:48:42 -04:00
David Cooper
9d1803d6eb More SSLv2 (and SSLv3) related fixes
In doing some work on cipher_pref_check() I noticed that it was failing on SSLv2 since the call to "$OPENSSL s_client" includes SNI. I've also noticed in my testing that "$OPENSSL s_client" will not connect to an SSLv2-only server unless the "-ssl2" flag is included. So, I carefully checked each call to "$OPENSSL s_client" in the program (other than in run_allciphers and run_cipher_per_proto, since those functions are already addresses in PR #341) to see whether they would inappropriate fail with an SSLv2-only (or SSLv3-only) server.

As a general rule, if the call doesn't currently include the protocol, then I added "-ssl2" if $OPTIMAL_PROTO is "-ssl2", indicating that the server only supports SSLv2, and I removed any $SNI if a protocol is specified if a protocol is specified and it is either SSLv2 or SSLv3.

I tested it on an SSLv2-only server, and the results are much better. I also tested it on a collection of other servers, none of which support SSLv2, and the results are the same as with the current code.

The only thing I haven't been able to test is how the revised code works when the "--starttls" option is used. I don't believe the changes I made would cause anything to break in that case, but I also don't think code will work any better in that case, if the server only supports SSLv2. Of course, since no server should support SSLv2 (let alone only SSLv2), it shouldn't really be an issue.

One thing that I did not change, but that I do not understand; why does determine_optimal_proto() try the protocols in the order "-tls1_2 -tls1 -ssl3 -tls1_1 -ssl2" rather than "-tls1_2 -tls1_1 -tls1 -ssl3 -ssl2"? Doesn't the current ordering imply that TLS v1.0 and SSLv3 are better than TLS v1.1?
2016-04-29 17:04:01 -04:00
David Cooper
91bab81e26 "$OPENSSL ciphers" ignores "-tls1_1" and "-tls1_2"
Versions of OpenSSL prior to 1.1.0 ignore the options "-tls1_1" and "-tls1_2". So, a call of the form "$OPENSSL ciphers -tls1_2 -V 'ALL:COMPLEMENTOFALL:@STRENGTH' would list all supported ciphers (including SSLv2 ciphers), not just ciphers appropriate for TLS1.2.

This changes the code to use "-tls1" instead of "-tls1_1" or "-tls1_2" if a version of OpenSSL other than 1.1.0 is being used.
2016-04-21 14:05:19 -04:00
Dirk Wetter
269a9e8c60 - fix LF in JSON/CSV output
- fix EV detection
2016-04-21 18:44:57 +02:00
David Cooper
cf84d69171 Fix some typos
Note: I deleted line 207, "HAS_SSL2=false", since it was a repeat of line 203.
2016-04-21 12:04:33 -04:00
Dirk
c62177044b - FIX #336 2016-04-20 18:53:04 +02:00
David Cooper
fe098d4b39 Use $HAS_SSL2
I changed the code to use the global $HAS_SSL2 rather than $sslv2_locally_supported.

I don't think there's a need to use $HAS_SSL3 in run_allciphers(), since the call to "$OPENSSL s_client" for non-SSLv2 ciphers does not specify a protocol. It's also not needed in run_cipher_per_proto(), since there is already a call to locally_supported() before anything further is done with a protocol.
2016-04-19 09:47:52 -04:00
David Cooper
7e506e5c5a More extensions in socksend_tls_clienthello()
This PR adds the signature algorithms, heartbeat, session ticket, and next protocol extensions to the client hello message created by socksend_tls_clienthello() for TLS 1.0 and above. It also adds the supported elliptic curves and ec points format extensions if the client hello message includes any ECC cipher suites.

I tested this version against several servers with $EXPERIMENTAL set to true and get the same results as with the current code with $EXPERIMENTAL set to false.
2016-04-13 15:39:12 -04:00
David Cooper
c6db49066f run_allciphers(),run_cipher_per_proto(), and SSLv2
This PR addresses two problems related to SSLv2 in run_allciphers() and run_cipher_per_proto().

In run_cipher_per_proto(), the call to "$OPENSSL s_client" is changed to that $SNI is not included if $proto is -sslv2 or -sslv3. As noted in a comment within run_prototest_openssl(), "newer openssl throw an error if SNI is supplied with SSLv2" and "SSLv3 doesn't have SNI (openssl doesn't complain though -- yet)."

run_allciphers() will sometimes incorrectly report that a server supports an SSLv2 cipher, even if the server does not support SSLv2 at all. The problem occurs if there is a supported SSLv3 cipher suite that has the same OpenSSL name as an SSLv2 cipher suite (e.g., RC4-MD5). Since the call to "$OPENSSL s_client" only uses the OpenSSL name, but the results report both the name, hexcode, and RFC cipher suite name, both the SSLv2 and SSLv3 cipher suites are reported as being supported (e.g., 0x04=RC4-MD5=TLS_RSA_WITH_RC4_128_MD5 and x010080=RC4-MD5=SSL_CK_RC4_128_WITH_MD5). This PR fixes the problem by testing SSLv2 cipher suites separately from non-SSLv2 cipher suites.
2016-04-11 15:51:53 -04:00
Dirk Wetter
199708f94c Merge pull request #335 from dcooper16/run_cipher_per_proto_speedup
run_cipher_per_proto speedup
2016-04-08 22:11:59 +02:00
David Cooper
bbb8af804e Fix typo in neat_list()
The last line of neat_list currently uses $HEXC as the parameter to show_rfc_style(), but it should use $hexcode. At the moment using $HEXC instead of $hexcode makes no difference, since hexcode="$1" and in all calls to neat_list() the first parameter is $HEXC. However, this bug could create problems in the future since neat_list() will misbehave if the value of the first parameter (hexcode) isn't the same as $HEXC.
2016-04-08 14:49:44 -04:00
David Cooper
bbcc869dec run_cipher_per_proto speedup
This PR makes basically the same changes to run_cipher_per_proto() as I previously made to run_allciphers(). The main difference is that in this function, round 0 consists of a single call to "$OPENSSL s_client" with "-cipher" including all of the locally supported ciphers. The reason for the difference is that in run_allciphers() its saves time to assume the server supports at least one cipher suite. In the case of run_cipher_per_proto(), however, it is likely that the server will not support some protocols at all, so its usually faster to start with a single call to "$OPENSSL s_client" that tests whether the server supports the protocol at all.
2016-03-31 09:38:20 -04:00
Dirk
16927f523f - NOT OK ==> NOT ok
- FIX #332 (--show-each w/o --wide)
- polishing PR #329
2016-03-30 23:28:31 +02:00
Dirk
bed1a602f1 - small hint for new chacha/poly ciphers 2016-03-29 21:56:31 +02:00
David Cooper
eac2df6d81 run_allciphers() speedup
The run_allciphers() function currently works by calling "$OPENSSL s_client" once for each cipher suite supported by $OPENSSL. In the case of "OpenSSL 1.0.2-chacha (1.0.2e-dev)" that means 195 calls to  "$OPENSSL s_client" even though servers tend to only support a small fraction of these cipher suites.

This PR produces the same output as the current run_allciphers() with fewer calls to "$OPENSSL s_client", which results in the function running faster (usually much faster). The basic idea behind the revised function is to test cipher suites in blocks. If $OPENSSL supports 195 cipher suites, then it group these cipher suites into 4 blocks of 64 (with the final block being smaller). It makes one call to "$OPENSSL s_client" with cipher suites 1-64, and if it fails, then it knows that none of these 64 cipher suites are supported by the server and it doesn't need to perform any more tests on these 64 cipher suites. If it succeeds, then it breaks the 64 cipher suites into 4 blocks of 16 and calls "$OPENSSL s_client" with each of those blocks. The blocks of 16 that are successful are broken into blocks of 4, and for each of the successful blocks of 4 the individual cipher suites are tested.

For testssl.sh and www.google.com the number of calls to "$OPENSSL s_client" is reduced from 195 to 88. For github.com the number of calls is reduced to 56!

I haven't made any changes to run_cipher_per_proto yet, but if this PR is accepted I can make the same changes in that function.

Thanks,

David
2016-03-25 10:00:50 -04:00
Dirk
dd30b8225e - FIX #324 (thx, @dawsonpaul 2016-03-21 23:03:42 +01:00
Dirk Wetter
b5b158d5b2 - BREACH missed a LF 2016-03-19 18:15:38 +01:00
Dirk
ab7f66533c - FIX #323
- add  MicrosoftSharePointTeamServices in header detection
2016-03-19 17:20:36 +01:00
Dirk Wetter
942359c8c1 - FIX #318
- minor code housekeeping
- increased amount of buffer read for sockets, real fix follows. #313
2016-03-12 17:08:43 +01:00
Thomas Patzke
7cc41a1a92 logfile, jsonfile and csvfile parameters work without = (as documented in help) 2016-03-08 22:25:00 +01:00
Dirk
483139f0a4 - show censy link by default 2016-03-05 21:35:30 +01:00
Dirk Wetter
28a6199109 - several code housekeepings
* SHOW_EACH_C has now the correct logic
  * pr_litemagenta ==> pr_warning
  * fileout WARN according to pr_warning then changed appropiately
  * some global vars in "" to avoid unneccessary shell expansion
  * HAS_SSL2/HAS_SSL3 now works more reliably
  * warning added in cipher order if ssl2/ssl3 is not supported by openssl
2016-03-05 21:07:49 +01:00
Dave Cottlehuber
9e77f38318 fix certificate_info() test 2016-03-03 21:47:36 +01:00
Dirk Wetter
1ead2e65bc - experimental label for DROWN 2016-03-03 20:04:20 +01:00
Dirk Wetter
6367693ccf - first check for DROWN #305 2016-03-03 19:50:44 +01:00
Dirk Wetter
752e6cdf56 - one outstanding openssl CVE issue wrt SSLv2
- first skeleton for DROWN #305
2016-03-03 11:56:25 +01:00
Thomas Martens
38477b4383 renamed pr_brown to pr_svrty_medium 2016-03-01 20:42:34 +01:00
Thomas Martens
dbfa66e6c7 renamed pr_yellow to pr_svrty_minor 2016-03-01 20:41:03 +01:00
Thomas Martens
ff9f1632e4 renamed pr_green to pr_done_best 2016-03-01 20:39:30 +01:00
Thomas Martens
2686f8cdb4 renamed pr_litegreen to pr_done_good 2016-03-01 20:36:41 +01:00
Thomas Martens
207e4e5ce4 renamed pr_red to pr_svrty_critical 2016-03-01 20:31:26 +01:00
Thomas Martens
cad924e707 renamed pr_litered to pr_svrty_high 2016-03-01 20:25:41 +01:00
John Carver
87218b6b1a Merge branch 'master' into uppercase-severity-codes 2016-02-23 10:34:32 -06:00
Dirk
20cee1e788 - fix: relative redirect led to fp (https) 2016-02-22 10:44:43 +01:00
Dirk
c70a13d014 - fix #296 (no recent regression as assumed) 2016-02-20 21:46:17 +01:00
Dirk
583584e095 - FIX #297
- FIX #243
- reformmated BEAST a bit (was screwed up in ! WIDE mode if too many ciphers
2016-02-20 14:10:04 +01:00
Dirk
71b4c03202 - fix key problem hpkp 2016-02-20 11:07:47 +01:00
John Carver
4be1539a4d lowercase ok when used with NOT in (NOT ok) 2016-02-18 11:49:47 -06:00
John Carver
291edce0c3 uppercase server sets a cipher order (OK) 2016-02-18 11:41:17 -06:00
John Carver
6858026412 uppercase INFO when outputting status_code 2016-02-18 11:15:31 -06:00
b1gb1t
2ee021d337 Correction of line 3607: new line (\n) corrupted the json format 2016-02-16 09:54:01 +01:00
Dirk Wetter
61c1669687 Merge pull request #292 from dcooper16/multiple_certificates
Detect multiple certificates cleanup
2016-02-14 00:08:52 +01:00
Sietse van der Molen
394f186000 also remove carriage returns, fix for csv 2016-02-12 12:40:31 +01:00
Sietse van der Molen
b2e4df60ca fix json output
use double quotes instead of single quotes
delete newlines from strings
2016-02-12 11:05:36 +01:00
David Cooper
02239be295 Detect multiple certificates cleanup
This corrects the indentation within determine_trust() when there are multiple certificates and the output for "Chain of trust (experim.)" takes up more than one lines.

In addition, it fixes the ID field of the JSON output for entries related to the certificate. At the moment, each ID string begins with a blank space. This changes it to remove the space if there is one certificate and to add "Server Certificate #X" at the beginning of each ID if there is more than one certificate.

Perhaps there's a better way than just using, for example, "Server Certificate #1 key_size" as a way to distinguish multiple "key_size" entries in the JSON file. This is just one idea, and it can certainly be changed if those who intend to use the JSON output prefer something else.
2016-02-09 13:35:46 -05:00
AndreiD
8842aeb2b9 Fix #289 - the grep that decides whether a domain is a local address doesn't consider the case when the full domain name is in the hosts file, but followed by .some.other.stuff. This PR addresses this case. 2016-02-08 12:51:54 +01:00
Dirk Wetter
70cd658447 - FIX #283 (regression from 1a8ed3d70a)
- minor output fixes for BEAST
- >4096 bit RSA keys labled in litemangenta now as it could have compatibility probs
- -V 0x.. or -V 0X.. gives at least a warning
2016-02-07 19:13:59 +01:00
Thomas Jensen
c48b27a9a9 fix typo in b93fc824 2016-02-07 03:07:30 +01:00
Dirk
b93fc82489 slightly better output for OCSP stapling 2016-02-06 22:31:32 +01:00
Dirk
a676742256 Remaining issues solved for OpenSSL 1.1.0 compliance, output corrections, CN/SNI improvements 2016-02-03 17:55:53 +01:00
Dirk
9cf3e21c3d - swapped sig_algo and server key size
- output improvements for unknown sig algos like GOST
2016-02-03 09:55:47 +01:00
Dirk
ea18d2f02c - fix: discovering the CN for the default host (without SNI)
- CN parsing of certificate improved
- CN / subject can be also cyrillic now -- supposed the terminal supports the charset
2016-02-03 00:05:57 +01:00
Dirk
dd65050ee1 - "secret" env switch shows during -e/-E the signature algorithm (see also #276)
- exp. date check corrected esp. for openssl 1.1.0
- warning relaxed for chain of trust
2016-02-01 22:06:27 +01:00
dcooper16
9f998d8c53 Number of trusted certificate files in $INSTALL_DIR/etc/*.pem
The number of .pem files in $INSTALL_DIR/etc is currently hard-coded into determine_trust. This modifies the code so that the number of files can be changed without having to change the code.
2016-02-01 14:11:50 -05:00
Dirk Wetter
f7853f36a0 - added SSL_CERT_FILE=/dev/null
- output cleanups in determine_trust()
2016-02-01 17:33:59 +01:00
dcooper16
abffd1b81e Fix chain of trust problem
This should fix issue #278. I'm not sure whether openssl verify will ever print out more than one error, so to be safe, I wrote the code to handle the possibility that it might; if there is more than one error, it just takes the first and ignores the rest.
2016-02-01 11:17:13 -05:00
Dirk Wetter
8f9b38f7d4 - LF and other corrections for HPKP
- output corrections for 2 x HPKP (e.g. scotthelme)
2016-02-01 13:23:28 +01:00
Dirk
0bfe12742e correct signature keysizes, FIX #249 2016-02-01 10:19:23 +01:00
Dirk
c62abaf215 fix colored output in wide mode (FIX #277) 2016-01-31 23:53:13 +01:00
Dirk
5ae9bb8c13 - typo in IPv4 header
- fixed recognition of XML,HTML to separate header
- fixed -V <pattern
2016-01-31 21:02:18 +01:00
Dirk
1726d3b41c minor change of color 2016-01-31 11:04:59 +01:00
Dirk
f7baa560c2 - typos, etc 2016-01-31 10:54:45 +01:00
Dirk
c564e305a7 - FIX #273 2016-01-31 01:55:23 +01:00
Dirk
fc346a35fe - indentation reverted to old value if in only one certificate
- minor cleanups in the output
2016-01-30 23:59:29 +01:00
dcooper16
2bf9c5d81e Detect multiple certificates
Modifies --server-defaults to handle cases in which the server has more than one certificate (e.g., one with an RSA key and one with an ECC key).
2016-01-28 17:06:34 -05:00
Dirk
495b9cda9b - several fixes/improvements for new JSON/CSV file feature #268
* no color code in files
  * rc4 ciphers were missing
  * NODE was missing
  * calling of NODEIP/PORT was not neccessary
  * default naming of files similar to $LOGFILE
2016-01-23 23:33:17 +01:00
Dirk
8a2fe5915a - /usr/bin/printf --> printf 2016-01-23 20:33:46 +01:00
Dirk
1a8ed3d70a - JSON/CSV from #268, labeled it experimental
- fixes partly #31
- several fixes to it (backticks, single sq brackets, renaming funcs, removed lf in JSON, ...)
2016-01-23 19:18:33 +01:00
Thomas Martens
b16ab6a021 added colorblind option
if colorblind option is set swap green and blue in the output
2016-01-22 20:40:08 +01:00
Thomas Martens
8bae1bc1ed added --mapping=no-rfc
don't display the RFC ciphername in the cipher checks.
2016-01-19 21:55:06 +01:00
Dirk
b97788ba73 typo fixed 2016-01-15 17:30:47 +01:00
Dirk
5257c2f38a - inline license clarifications
(separate file needed later)
2016-01-15 17:04:16 +01:00
Dirk
a9643b6d1e - hooks for rfc/non-rfc
- FIX for beast: no CBC cipher at all is  now displayed
- minor cosmetic stuff
2016-01-15 16:37:47 +01:00
Dirk
2871aaaee3 - optical cleanups for #265
- don't do browser tests for non-HTTP services
2016-01-15 15:53:03 +01:00
Frank Breedijk
55c0b24278 Don't forget to add help message 2016-01-13 10:26:12 +01:00
Frank Breedijk
ab47f8ada9 Added client simulations based on @ivanr s list on ssllabs 2016-01-13 10:21:01 +01:00
Dirk
dc4f90ac48 missing linefeed 2015-12-29 17:07:03 +01:00
Dirk
b962ccde53 FIX #262 2015-12-29 10:05:20 +01:00
Dirk
3b17c9e321 cosmetic corrections to help 2015-12-27 14:51:18 +01:00
Dirk
914e364d1e - fix headline for non-socket support 2015-12-27 13:33:53 +01:00
Dirk
e10da3a78a - minor adjustmentents to program style 2015-12-24 23:00:23 +01:00
Dirk
5c19bf5892 - fix for web sites having leading spaces b4 html/xml content starts 2015-12-22 21:08:52 +01:00
Dirk
c3269f1927 - Fixes for #260 2015-12-22 20:31:52 +01:00
Dirk Wetter
f65fa69c3c Merge pull request #248 from lainegholson/master
Add HTTP2/ALPN support
2015-12-22 12:05:53 +01:00
Frank Breedijk
826ac43504 Redirect test that doesn't depend om JSON/CSV output 2015-12-21 20:59:40 +01:00
Laine Gholson
d2df8b8590 Fix unrelated typos 2015-12-21 10:37:23 -06:00
Laine Gholson
d0122698ed Fix ALPN when testing multiple IPs 2015-12-13 13:16:37 -06:00
Laine Gholson
d43351e2cb Undo commit f56fdd4 2015-12-13 13:13:51 -06:00
Laine Gholson
f56fdd43da Don't output reason not testing spdy when testing server prefs 2015-12-12 23:09:42 -06:00
Laine Gholson
1bd08f34bd Remove redundant newlines 2015-12-12 22:58:52 -06:00
Laine Gholson
e8b04c77d3 Consider h2 a valid NPN protocol 2015-12-12 20:07:24 -06:00
Laine Gholson
3d28f44e56 Change flag order 2015-12-12 18:41:13 -06:00
Laine Gholson
33bda6408a Add HTTP2/ALPN support 2015-12-12 18:20:57 -06:00
Dirk
bac7cde3bd - re-adjusted preference for rfc/iana mapping file 2015-12-11 13:13:22 +01:00
Dirk
867d698a16 - days left until expiration 2015-12-08 17:51:46 +01:00
Dirk
1f39ab8241 - fix timestamp in log file 2015-12-08 16:37:35 +01:00
Dirk
041b77c5ed - sanity check whether URL/URI is last arg
- typo fix while logging (fall back CVS tags weren't written
2015-12-08 13:31:52 +01:00
Dirk
2e0e7b83d5 reverse non-typo
drill comes later
2015-11-28 17:33:10 +01:00
Dirk Wetter
ad8f82f190 Merge pull request #240 from k0ste/master
Add drill support (ldns lib), fix mistype
2015-11-28 17:14:18 +01:00
Laine Gholson
7fee2fe29b Show SHA384 certificates as secure 2015-11-26 13:53:35 -06:00
Konstantin Shalygin
30d046a6a5 fix PWD mistype 2015-11-23 20:02:06 +06:00
Konstantin Shalygin
43cb1d8763 add drill support 2015-11-23 19:54:41 +06:00
Dirk
f76d07d43e - logging now the cmd line, FIX #238
- internal improvements of stdout banner
2015-11-21 13:39:37 +01:00
Laine Gholson
c5a4eafed7 Fix filename typo
CREDITS.md was called CREDIT.md
2015-11-14 17:19:13 -06:00
Armin F. Gnosa
7e08d3d4da fixed typo in parameter descriptions 2015-11-12 23:47:43 +01:00
Dirk
5749051839 - fix vertical distances after PFS && wide
- fix misleading "--ip=v4only" in help
2015-11-11 17:49:36 +01:00
Dirk
756a6ab41d - NEW: logging of stdout!
- rearragments in global var declaration for better readability
2015-11-11 11:56:32 +01:00
Dirk
87592aafd9 - line space for some single vuln. adjusted 2015-11-08 22:14:28 +01:00
Laine Gholson
e122d65f52 Only use local rDNS with .local domain 2015-11-06 19:16:21 -06:00
Laine Gholson
457fcacf3f Fix error 2015-11-05 19:39:26 -06:00
Laine Gholson
d9dfe438e5 Prefer 'avahi-resolve' over 'dig' for mDNS 2015-11-05 19:04:04 -06:00
Laine Gholson
a9a4326038 Support rDNS with mDNS and Bonjour mDNS (mac) 2015-11-05 15:54:29 -06:00
Dirk Wetter
50c5f0b93d add '-bugs' so that buggy F5s can be better tested 2015-11-03 23:29:53 +01:00
Dirk
e390345629 typo 2015-11-03 19:51:45 +01:00
Dirk
c272878c73 - warning session tickets -> PFS 2015-11-03 19:51:05 +01:00
Dirk
8ff39c5028 - client based authentication, FIX #215
- SSL Session ID support test
2015-11-03 13:13:10 +01:00
Dirk
0463471c40 - fixing side effect from #225
- other minor output corrections
2015-11-03 10:30:59 +01:00
Dirk
84e6be3547 - revert part of #225
- clarify name of bool var for type of tput
2015-11-02 10:49:40 +01:00
Dirk Wetter
8b54609c3d Merge pull request #225 from Harinus/master
Fix: tput: No value for $TERM and no -T specified
2015-11-02 10:40:59 +01:00
Laine Gholson
8c173764bd Use 'awk' instead of 'sed -E' 2015-11-01 10:40:44 -06:00
Laine Gholson
686dd511a6 Add support for .local domains with avahi 2015-10-31 20:01:52 -05:00
Martin Hoffmann
6a8d4870ab Missing space ;)
Whoops... edited this from the github webpage..
2015-10-30 09:56:48 +01:00
Martin Hoffmann
9bfeac19bc Fix: tput: No value for $TERM and no -T specified
Avoid "tput: No value for $TERM and no -T specified" when running from CGI or similar by checking for interactive shell
2015-10-30 09:46:35 +01:00
Peter Mosmans
62af7be5a1 Added check for availability oftput (Fixes #222)
Slight change due to drwetter's comment
2015-10-25 22:31:44 +10:00
William Lovins
4095dc53be Changed wording for easier readability. 2015-10-16 14:40:06 +01:00
Dirk
7bf1319c93 - FIX #218 for exim and friends 2015-10-15 15:14:37 +02:00
Dirk
eb49132682 - changed headline for each sub test from blue to underline+bold
- save determine_service log
2015-10-15 14:15:07 +02:00
Dirk
78fab8addb - FIX #213, wording 2015-10-13 22:25:01 +02:00
Dirk
d4dbf1138c - FIX #214 2015-10-13 08:31:54 +02:00
Dirk
1a1f007ef9 - banner f'up reversed 2015-10-11 23:34:53 +02:00
Dirk
8c0786d147 - switched on clientauth functionality (missed b4) 2015-10-11 23:23:35 +02:00
Dirk
b9bfd48871 - client based auth (see sclient_connect_successful() works now, see #206)
- careful regression tests for this, point open: speed
- test for more TLS extensions
- heartbleed() does now before a check whether heartbeat is available to save time
- breach simplyfied (and doesn't have to be killed in seldom cases)
- tmpfiles are only being erased after exit not after each function
- user agent is testssl -- unless --sneaky is chosen
- global host vars are now being resetted to prevent side effects
- tls version in record layer is now always 1
- used ERRFILE wherever possible
- smaller code cleanups
2015-10-11 23:07:16 +02:00
Dirk Wetter
0600e39b45 - fix screw up of rDNS display for those few folks having only IPv4 ;-) 2015-10-06 12:30:29 +02:00
Dirk
f8d6a2fb6d - IPv6 formatting fixed, see #11 (points 3,4,5)
5 cannot be done automagically, see issue
2015-10-05 09:56:21 +02:00
Dirk
a0d634f94a - ouput corrections for BEAST 2015-10-04 12:32:29 +02:00
Dirk
41bc2fb70c - regression wrt what_dh 2015-10-03 00:14:52 +02:00
Dirk Wetter
f3cef41053 - some speed improvements (sed, tr --> bash internal s'n'r)
- revamped BEAST a bit: availablity of higher protocols lead now to yellow color, see #208
- Fixed error in BEAST (no higher protos led to no message)
- made BEAST it faster: one check for protocol ssl3+tls1 upfront, see #208
2015-10-01 13:27:14 +02:00
typingArtist
2ca6c2b0dc improved variable naming, scope and worked around length limitation of cipher list, as suggested by @drwetter 2015-09-30 14:54:39 +02:00
typingArtist
449aada392 fix CBC cipher selection
CBC cipher selection is not so easy using the openssl tool alone. Selecting the cipher based on the string CBC occuring in it would be right if it’s
about the RFC name of the cipher but not so with the openssl naming. Since CBC ciphers are not going to be continued anyway, I think it’s safe to take
a static list. However, it’s easy to extract it from the cipher list in openssl-rfc.mapping.html, but we certainly don’t want to require that file to
be shipped all the time.
2015-09-30 12:44:27 +02:00
Dirk
1c1eaa53d8 - fix for renamed http_header function 2015-09-29 18:47:49 +02:00
Dirk
cac49cb1f1 - "--file" implicitly does "--warnings=batch"
- "--file" works now fine with equal sign
- fixed load balancer issue where header request stalled and testssl.sh consequently too
- http_date needed to be changed too because of that
- needed to estimate then the http_date when request was killed (HAD_SLEPT)
  will Mr. Spock like this??
- fixed load balancer issue where header request for breach test stalled and thus an error was displayed
- code improvements
2015-09-28 22:54:00 +02:00
Dirk
feaef680aa - IPv6 #11 is 80% working (whohoo!). Needed is an openssl capable IPv6 and HAS_IPv6=true in the environment
- FIX #191
2015-09-26 22:44:33 +02:00
Dirk Wetter
cc81642ee3 - #FIX 202 (EV detection from TERENA/Digicert) 2015-09-25 14:35:42 +02:00
Dirk
a2efc201b7 - added a failure condition for trust check 2015-09-24 09:10:43 +02:00
Dirk
06466cca92 - proxy in determine_trust was missing 2015-09-23 09:03:47 +02:00
Dirk
0b1e573fc9 - FIX #190: Server temp key backport for RH-ish systems works now automagically
- just to be sure there's a cmd line flag --has-dhbit / env HAS_DH_BITS
- some reordering
2015-09-22 20:09:26 +02:00
Dirk
4b57a22f6e - FIX #198 (date env problem under BSD and maybe others) 2015-09-22 17:14:36 +02:00
Dirk
1668daa04e - NEW: chain of trust -- for openssl 1.0.2 only
- FIX #97
2015-09-22 15:05:59 +02:00
Dirk
3eeb1f9d9d - check whether dig, host or nslookup is there. The error message is now describing the cause 2015-09-21 16:43:47 +02:00
Dirk
23802e219d - #FIX 197
- renamed a variable
2015-09-21 14:03:48 +02:00
Dirk
6406e1828d - minor polish of output 2015-09-19 15:03:40 +02:00
Dirk
413b64c44a - fixed proxy name resolution and make it more robust
- additional line if a proxy is used above rDNS
2015-09-18 15:12:01 +02:00
Dirk
945d26d222 - changed version number
- retabed to five spaces
2015-09-17 15:30:15 +02:00
Dirk
58096d6633 2.6 release 2015-09-15 08:49:00 +02:00
Dirk
467988fb0a - improved resilience in cipher order check
- improved also there compatibility with intolerant IIS6 servers
2015-09-14 12:54:54 +02:00
Dirk
a2ba43ec78 - litemagenta should be used for not fatal conditions / magenta for fatal conditions (prg terminates then) 2015-09-14 11:12:37 +02:00
Dirk
9b08cb7584 - FIX /workaround for #188 (https://github.com/drwetter/testssl.sh/issues/188)
- bumped up version to rc4
2015-09-14 11:03:10 +02:00
Dirk
a9f231b3ff - fix where an $PID"ERRFILE" was written 2015-09-09 16:41:32 +02:00
Dirk
d28317f2d0 - exit code always 0 unless an error occured
- enable devel feaure of SSLv2 via socket
2015-09-08 19:30:03 +02:00
Dirk
566a059250 - fix for issue when a non-HTTP service indicates a misleading non-match of certificate
- wildcard check
2015-09-06 18:21:08 +02:00
Dirk Wetter
b9bfa2355a fix for scott helme's multiple keys (https://scotthelme.co.uk/hpkp-toolset) 2015-09-04 14:19:06 +02:00
Dirk Wetter
422b4d511a minor cleanups for finding openssl binaries 2015-09-04 10:04:56 +02:00
Dirk Wetter
6a036cd7d4 removed hardcoded obsolete paths for binaries 2015-09-03 13:26:02 +02:00
Dirk
1c5870e3e3 typo, fix from Stefan Stidl (thx!) 2015-09-03 12:17:32 +02:00
Dirk
489baa1299 unitize programming styles: ${var} --> $var, double square brackets instead of single 2015-09-03 12:14:47 +02:00
anoma
6b22851104 Typo. Inconsistent CVE string format
Trivial typo. All other CVE outputs are in the form CVE-XXXX-YYYY
2015-09-03 09:10:06 +01:00
Dirk Wetter
90930a2f78 - changed return code if someone dares to use dash as it hiccups
- catch users try to use sh instead of real bash (#184),  see http://www.gnu.org/software/bash/manual/bashref.html#Bash-POSIX-Mode)
2015-09-02 12:56:03 +02:00
Dirk Wetter
45eb3ed662 better phrasing for LOGJAM, see #181 2015-08-28 17:43:38 +02:00
Dirk Wetter
90ead7a301 FIX #183 2015-08-28 17:06:07 +02:00
Dirk Wetter
412fb6fb05 FIX #182 2015-08-28 16:46:28 +02:00
Dirk Wetter
9b718d39d0 - removed VERBERR (is now DEBUG=2)
- hex2dec uses now internal echo instead of printf (which has problems with some chars if unexpected content if not properly used)
2015-08-28 14:59:04 +02:00
Dirk
b5818f6034 - FIX $177
- some by-catches whle shellchecking
- minor cleanups
2015-08-28 00:15:51 +02:00
Dirk
c102bb6712 micro fix for the ESC code orgination fron tput test 2015-08-27 20:39:20 +02:00
Dirk
0d9370237c - FIX #172
- labeled TLS_FALLBACK_SCSV as experimental, to be improved in next release (remarks in code)
- removed experimental from FREAK check
- separated headerfile from errorfile, TLS handshake oids were sometimes misinterpreted as IPv4 addreses in header
- bumped up rc version
- linefeeds
2015-08-27 11:25:12 +02:00
Dirk Wetter
c93dc01b41 better service detection, dedicated line for NNTP and certificate stuff redirected to ERRFILE 2015-08-26 20:06:53 +02:00
Dirk Wetter
838112e6d2 - LibreSSL compatibility: recent pull spits out an error if cnf file isn't found (oh well) ==> introduction of #ERRFILE, good idea anyway
- commented what I wanted to achieve with the colors
- code cleanups
2015-08-24 23:50:03 +02:00
Dirk
aa91990fb3 - fix bug where a host name like AAA.BBB.CCC.DDD.in-addr.arpa.DOMAIN.TLS was taken as an ipv4 address
- freebsd 9 supports now also colors with setaf, Darwin?
- correct indentation of help
- improved parsing in command line so that where a distinct option is required it is also tested in the 1st place
- removed -q in help (deprecated as we might want to use it for other things in the future)
- fix: if $PWD/openssl was a dir it bailed out
- cleanup of fatal errors ==> provide ONE function
2015-08-24 22:17:35 +02:00
Dirk
83bf9067aa FIX #167 (# of certificates provided) 2015-08-23 21:16:34 +02:00
Dirk Wetter
6baf5e377c - sanitize '%' in general output function, avoids hiccups in url encoded strings
- FIX #178 (Security headers only key in green, not value)
- CSP rule for facebook hast 127.0.0.1 which is labeled as IP address
2015-08-21 18:10:45 +02:00
Dirk Wetter
87cef93b6c - more solid parsing for HPKP header (FIX #163)
- X-UA-Compatible is now an "other" flag and key won't be swallowed
2015-08-21 12:43:10 +02:00
Dirk Wetter
394bde8ff5 output FIX for multiple CRLs (#165) 2015-08-21 10:47:29 +02:00
Peter Mosmans
cd4ba60f16 Fixes #174
Thanks to Ligushka
2015-08-18 16:07:24 +02:00
Jonathon Rossi
e8cbf1a699 Fix subject alternative name on darwin 2015-08-18 17:15:17 +10:00
Dirk
9afab04012 FIX #162 (leading space for rp banner and missing lf) 2015-08-17 20:13:52 +02:00
Dirk
405b0f10bf FIX #161 + small improvemnet on rengotiation 2015-08-15 21:33:17 +02:00
Dirk
e3fcd786f7 - FIX #160 -- removed code from #27
- bumped up version to 2.6rc2
2015-08-15 18:48:49 +02:00
Dirk Wetter
58a1c1c1da - expiration variables tunable via ENV
- cleanups expire section
2015-08-13 16:56:12 +02:00
Thomas Kähn
8963916b3b Fix certificate expiration check 2015-08-12 18:28:50 +02:00
Dirk Wetter
719536a44e FIX: Dilyans bug where a STARTTLS servive runs on a different port 2015-08-12 13:58:45 +02:00
Dirk
5bc6e5fda9 - if a record is local host it is shown now
- also look in etc hosts for MSYS2
- cosmetic improvements
2015-08-12 00:17:28 +02:00
Dirk Wetter
81b158431f NEW: showing # of detected pinned keys (HPKP) 2015-08-10 15:58:56 +02:00
Dirk Wetter
72aa8add5c FIX for missing CN (e.g. cloudflare) 2015-08-10 15:17:42 +02:00
Dirk Wetter
e6f0f79157 - FIX: rDNS ignores CNAME now
- some code beautified
2015-08-10 14:47:11 +02:00
Dirk
aa2b33fdb4 rp header fine tuning 2015-08-08 13:42:31 +02:00
Dirk
dc60d9360a reverse proxy banner alignment 2015-08-08 13:37:05 +02:00
Dirk
56e6f90308 FIX #158 (pagesspeed header was identified as IPv4 addr) 2015-08-08 10:20:13 +02:00
Dirk Wetter
70ff293fb7 - fix for #156
- reverting #27. Catch is the functions are being initiated at a fixed time instead of while calling. This conflicts with the --color option which is done late. Other solution?
2015-08-05 11:31:55 +02:00
Dirk
f1fe2c3286 just renaming as rc1 for 2.6 2015-08-02 01:25:39 +02:00
Dirk
fcb8c5d0bc - FIX for multiple ip addresses for one mx host (didn't expect a matroshka ;-))
- make dotted lines smaller
2015-08-02 01:16:27 +02:00
Dirk
ea1ab3b911 help for mass testing option in #153 2015-08-02 00:26:34 +02:00
Dirk
325abcfc06 - first shot for szepeviktor's color function maker #27 2015-08-02 00:03:30 +02:00
Dirk
9006234c34 - NEW: mass testing via --file
- FIX: ipv6 address in rDNS was ..umm err ....missing some chars
- rough ipv6 address detection (fixes single colon in "further ip addresses")
- FIX: facebook has EC certificate but signing algo is not EC
- FIX for wrong openssl location in banner
2015-08-01 23:11:27 +02:00
Peter Mosmans
c04497f2f6 Another fix for #140
Suppress awk warnings
Don't try to retrieve header information from openssl stderr output
2015-07-27 12:16:03 +02:00
Dirk
f45f91a07e - quiet mode for mass testing (see #148) w/o banner
- -q is now --devel
2015-07-25 14:33:08 +02:00
Dirk
d4f7dd0f91 * squash dirname err msg on FreeBSD
* numerous DNS related internal improvements
* FIX #137
* FIX #147
2015-07-23 17:11:33 +02:00
Dirk
013a24caea * - improved DNS parser again, see #141 #140
* at least exit with -250 or worse if a problem occurs (rest still undefined, needs to be fixed, see #145/#100)
* renamed all top level tests in "run_" for better code
2015-07-22 13:11:20 +02:00
Dirk
c66a2c8f2e FIX #144: reverse screw up of hpkp function for BSD/Darwin 2015-07-21 20:35:49 +02:00
Dirk
784294b52d awk fixes for MSYS2 FIX #141, #FIX 140 2015-07-21 14:20:15 +02:00
Jonathon Rossi
298a91d743 Fix bash 3 support
Mac OS X ships with bash 3, not 4. The case statement fallthrough and
continue operators were added in bash 4.
2015-07-21 15:11:20 +10:00
Dirk Wetter
f81b3a5c25 * GOST ciphers sometimes missing during scan
* help was not precise wrt some arg w no params
2015-07-20 14:05:35 +02:00
Dirk Wetter
66f0b22adb word match for -V / -x now only for non-numbers: testssh.sh -x cc google.com tests for chaha ciphers
(before only word matching was done e.g.: testssl.sh -x ECDH chase.com
2015-07-17 15:58:07 +02:00
Dirk Wetter
d9b9d2c2fb * path display error in banner fixed 2015-07-17 14:58:12 +02:00
Dirk Wetter
cda5eff12e * STARTTLS_SLEEP
* resolved misleading output STARTTLS + socket
* fixed poodle ciphers in code (but not used yet)
2015-07-17 14:33:23 +02:00
Dirk Wetter
f04ee57e79 * display shortend path to $OPENSSL in banner 2015-07-17 13:25:39 +02:00
Harald Wagener
4df61eed14 Update testssl.sh
Fix typo.
2015-07-17 11:05:07 +02:00
Dirk Wetter
54290b220a - Provide Darwin binaries and paths thereto
- provide also other static bins in $PWD/bin
2015-07-16 23:01:10 +02:00
Dirk Wetter
b157a26632 * EV certificate detection
* SSLv2 + STARTTLS protocol check always uses sockets now
* STARTTLS protocol now returns over sockets the TLS time (if available)
* few LibreSSL output oddities fixes
* output corrections for STARTTLS
* additional path for binaries (we change the path soon but leave both in the code for now)
2015-07-16 17:58:03 +02:00
Dirk
4c033bc0cc * header flags added 2015-07-14 20:44:04 +02:00
Dirk
2e40c2bde6 * misleading warning for DH bits for Negotiated cipher omitted if no DH or EC and OPENSSL <= 1.0.1 2015-07-14 19:58:04 +02:00