Commit Graph

4171 Commits

Author SHA1 Message Date
David Cooper 54fad800c0
Fix issue with run_protocols() in --ssl-native mode
This PR fixes a minor problem with run_protocols() in "--ssl-native" mode if $OPENSSL does not support TLS 1.3. Currently, the warning message that $OPENSSL does not support a protocol is printed when run_prototest_openssl() is called. This causes a problem for the output if $OPENSSL does not support TLS 1.3, since the run_prototest_openssl() is called before the results for TLS 1.2 are printed. The result is something like this:

 SSLv2      not offered (OK)
 SSLv3      not offered (OK)
 TLS 1      offered (deprecated)
 TLS 1.1    offered (deprecated)
Local problem: /home/cooper/Desktop/testssl.sh/bin/openssl.Linux.x86_64 doesn't support "s_client -tls1_3"
 TLS 1.2    offered (OK)
 TLS 1.3     NPN/SPDY   not offered
 ALPN/HTTP2 http/1.1 (offered)
2019-11-06 15:58:38 -05:00
Dirk Wetter cd647ba2d0
Merge pull request #1368 from Night1/patch-1
Fix typo
2019-11-06 14:29:08 +01:00
Niklas f3a8884793
Fix typo
Fixed typo
2019-11-06 12:14:16 +01:00
Dirk Wetter ed4bffb5d2
Merge pull request #1367 from dcooper16/fix1366
Fix #1366
2019-11-06 08:55:34 +01:00
David Cooper 7add991156
Fix #1366
When processing a command line for parallel mass testing, create_mass_testing_cmdline() did not account for the newer shortened versions of the output file options: -oj, -oJ, -oC, and -oH. This caused the command line for the child processes to be incorrect.
2019-11-05 16:10:34 -05:00
Dirk Wetter 6679dd7a16
Merge pull request #1365 from drwetter/drwetter-patch-4
remove blank in output
2019-11-03 20:49:36 +01:00
Dirk Wetter 3b89dc6b0a
remove blank in output
added in bda9c02183
2019-11-03 20:49:22 +01:00
Dirk Wetter cbf6422221
Merge pull request #1364 from scottj/3.0
fix bug in f5_ip_oldstyle() printf format string
2019-11-03 09:20:19 +01:00
Scott Johnson f79e5bbaca fix bug in f5_ip_oldstyle() printf format string 2019-11-02 10:34:00 -05:00
Dirk Wetter bda9c02183
Merge pull request #1363 from drwetter/drwetter-patch-3
Marking CBC and SEED ...
2019-11-02 16:03:39 +01:00
Dirk Wetter 47baf7c206
Marking CBC and SEED ...
.. ciphersuites as obsolete in cipher categories
2019-11-02 16:03:24 +01:00
Dirk Wetter 21d41b5f68
Merge pull request #1362 from drwetter/drwetter-patch-2
Amendments + reordering
2019-11-02 10:21:11 +01:00
Dirk Wetter 35f70f2375
Amendments + reordering
add IDN etc. -support and David's work on determine_optimal_* functions
2019-11-02 10:20:57 +01:00
Dirk Wetter e909d4cd8c
Merge pull request #1327 from drwetter/IDN_improvements
Idn improvements
2019-11-02 09:52:52 +01:00
Dirk Wetter 457ffe78cd
Merge pull request #1205 from dcooper16/server_preference_cipher_order
Separate server preference test (cipher order) for TLS 1.3
2019-10-30 08:12:43 +01:00
Dirk Wetter 9a5c8c08d5
Add case in cipher order for TLS != 1.3 2019-10-29 19:03:36 +01:00
Dirk Wetter 2f9bcea5e6
change another nope to no 2019-10-29 17:36:08 +01:00
Dirk Wetter 0f40e85f62
TLS 1.3 and cipher order
If a server offers TLS 1.3 only and the cipher order is server side this commit changes the severity level to INFO.

Also it changes nope to no in two places
2019-10-29 17:32:50 +01:00
David Cooper 2810c70163
Address comments in #1205
This commit addresses the comments in #1205. If a server only supports TLS 1.3, then it is not considered an issue if the server does not enforce a cipher order. However, if the server does not support a cipher order for TLS 1.2 and below, then that is an issue, even if the server does support a cipher order for TLS 1.3.
2019-10-28 16:15:38 -04:00
David Cooper beec1a7e1e Use results of determine_optimal_sockets_params() 2019-10-28 15:02:49 -04:00
David Cooper 3ea1b1b884 WIP: Separate server preference test (cipher order) for TLS 1.3
This PR is an attempt to fix #1163 by running separate tests for a server cipher order preference to TLSv1.3 and for SSLv3 - TLSv1.2.

If the server supports TLSv1.3, then a test is performed to determine whether the server enforces a cipher order to TLSv1.3. A separate test is performed for SSLv3 - TLSv1.2 unless it is known that the server does not support any of these protocols.

If the server enforces a cipher order for SSLv3 - TLSv1.2, but not for TLSv1.3, then cipher_pref_check() is not called for TLSv1.3, since cipher_pref_check() is intended to show the cipher order that the server enforces. As TLSv1.3 will be the negotiated protocol if it is supported, the negotiated cipher for TLSv1.3 will already be presented.

This PR still has one major flaw, which may create a problem when testing a TLSv1.3-only server. If run_protocols() is run before run_server_preference(), then everything will be okay, as run_server_preference() will be able to determine that SSLv3 - TLSv1.2 are not supported. However, if run_server_preference() is run by itself, run_server_preference() will not know that SSLv3 - TLSv1.2 are not supported and so it will try to determine whether the server enforces a cipher preference order for these protocols. The attempt to connect to the server will fail, but at the moment run_server_preference() doesn't know whether the failure is because the server does not support SSLv3 - TLSv1.2 or because the server supports at least one of these protocols, but does not support any ciphers in $list_fwd. At the moment, run_server_preference() incorrectly flags an error.

One option would be to perform additional tests against the server in this case to determine the reason for the connection failure. Another option would be to have some code that is always run earlier, such as determine_optimal_proto(), test whether a server that supports TLSv1.3 supports any earlier protocols (SSLv3 - TLSv1.2).
2019-10-28 15:02:49 -04:00
Dirk Wetter bbd103fe95
Merge pull request #1360 from drwetter/drwetter-patch-1
Remove c&p relict
2019-10-28 18:44:42 +01:00
Dirk Wetter d3e3724d65
Merge pull request #1356 from dcooper16/fix_parse_tls_serverhello_bug
Fix parse_tls_serverhello() bug
2019-10-28 18:41:43 +01:00
Dirk Wetter 326558dec1
Remove c&p relict 2019-10-28 18:36:39 +01:00
Dirk Wetter 9c27a03c30
Merge pull request #1357 from dcooper16/fix_do_starttls_initialization_bug
Fix do_starttls initialization bug
2019-10-28 18:08:01 +01:00
Dirk Wetter 1335d9ebda
Merge pull request #1359 from drwetter/fix_1355
Adress #1355
2019-10-28 18:01:58 +01:00
Dirk Wetter bfb94c8acb Adress #1355
by adding "_hint" to the additional information when
testing for DROWN.
2019-10-28 18:00:10 +01:00
Dirk Wetter 10a6c7b9d2
Merge pull request #1358 from dcooper16/use_jsonID
Use $jsonID rather than literal string
2019-10-28 17:49:16 +01:00
David Cooper 8a0f94f561
Use $jsonID rather than literal string
In run_drown(), $jsonID is set to "DROWN" and most calls to fileout() are of the form

     fileout "$jsonID" ...

However, one call is written as

    fileout "DROWN" ...

This PR changes this one call to be consistent with the others. This does not change the functionality of the program.
2019-10-28 12:43:29 -04:00
David Cooper 42c8769983
Fix do_starttls initialization bug
At the moment, $do_starttls is initialized to true in initialize_globals() and then it is set to true again in parse_cmd_line() if the --starttls command line option is used. Presumably the intention was to set $do_starttls to false in initialize_globals().
2019-10-28 10:15:05 -04:00
David Cooper be073e6134
Fix parse_tls_serverhello() bug
This PR fixes a minor bug in parse_tls_serverhello(). In some cases the server's entire response is not retrieved. In these cases, it is possible that the response from the server ends with a portion of a handshake message.

The loop at the beginning of parse_tls_serverhello() extracts the various handshake and alert messages from the server's response. If it gets to the end of the response, and what is at the end is not a complete message, it should just ignore that fragment and break out of the loop. At the moment, however, parse_tls_serverhello() just continues in the loop rather than breaking out. This has not been a problem up to now, since $msg_len is usually set to a positive value from a previous iteration of the loop, which causes the loop to end.

In the case of the server identified in #1353, however, $msg_len is 0 and so the continue rather than break results in an endless loop.
2019-10-28 10:06:21 -04:00
Dirk Wetter b64f5afaea
Merge pull request #1354 from drwetter/patch-1351
Changes to HTML header parsing
2019-10-26 15:13:39 +02:00
Dirk Wetter c840ea50ec
Update testssl.sh
remove '
2019-10-26 14:29:35 +02:00
Dirk Wetter e4f7788899
replace html pattern for header file
.. with just a pattern for  '<' or '{' maybe with a leading blank
2019-10-26 14:21:32 +02:00
Dirk Wetter ca5ff39bce
Extend pattern for HTTP header
Add another pattern because the SEDs tested so far do not seem to be fine with header containing x0d x0a (CRLF) -- which is the usual case. So we also trigger on any sign on a single line which is not alphanumeric (plus _)

See #1351
2019-10-26 14:14:21 +02:00
Dirk Wetter 53951fdb06
Merge pull request #1351 from tkaehn/headerfile_vs_ipv4_address_in_header
'IPv4 address in header' shows body content
2019-10-26 13:14:04 +02:00
Dirk Wetter 0cfd30f8b8
make filtering for header more robust
... by re-adding the former filters after ``sed '/^$q'``
2019-10-26 13:13:10 +02:00
Dirk Wetter f5c3b4e41d
Merge pull request #1352 from dcooper16/fix_client_simulation
Fix client simulation bug
2019-10-23 23:05:05 +02:00
David Cooper 73edf6fa8e
Fix client simulation bug
This PR fixes a bug in modify_clienthello() that occurs when client simulation is being performed, the ClientHello contain an SNI extension, and $SNI is empty. In the case, modify_clienthello() should just skip over the SNI extension and not include one in the modified ClientHello. However, the code currently only skips over the 2-byte extension type. The result being that the remainder of the extension is included in the modified ClientHello. This PR fixes the problem by ensuring the $offset is advanced whether or not $SNI is empty.
2019-10-23 11:03:52 -04:00
Thomas Kähn 7caa6a38b8 HEADERFILE ends on first newline.
Otherwise 'IPv4 address in header' shows body content.
2019-10-23 14:12:10 +02:00
Dirk Wetter 3c18262389
Merge pull request #1350 from drwetter/fix_1336
Squash message to use ./bin/openssl.* when --ssl-native is supplied
2019-10-19 10:07:55 +02:00
Dirk 7964a692ef Squash message to use ./bin/openssl.* when --ssl-native is supplied
PR #1336 included logic to pre-test the server side with sockets
and/or with openssl. However when the user supplied --ssl-native
sockets were never tested before. As a result ALL_FAILED_SOCKETS
was still true, so that the final eif statement complaint erroneously
that sockets didn't work but openssl does.

Also Travis complaint.

This PR fixes it by checking SSL_NATIVE to the final part of the
if statement.

One could also test sockets before and then set ALL_FAILED_SOCKETS
appropriately but that would only make sense if the socket methods
like run_robot() or run_heartbleed() would check ALL_FAILED_SOCKETS
first.

At the moment I went for this as it is easier and the case that sockets
aren't working but openssl does seems not very likely.
2019-10-19 09:52:02 +02:00
Dirk Wetter 764466d710
Merge pull request #1349 from drwetter/add_1336
Remove double TLS13 only handling
2019-10-18 21:33:30 +02:00
Dirk 1513d4eb49 Remove double TLS13 only handling
... as it was moved to determine_optimal_proto(), see #1336.

LF added in message when TLS13 only
2019-10-18 21:29:14 +02:00
Dirk Wetter 3389d84103
Merge pull request #1336 from dcooper16/ossl_determine_optimal_proto
Use OpenSSL for determine_optimal_proto()
2019-10-18 21:07:15 +02:00
Dirk Wetter 7a327f5439
Merge branch '3.0' into ossl_determine_optimal_proto 2019-10-18 21:06:49 +02:00
Dirk Wetter f118085278
Merge pull request #1339 from dcooper16/simplify_determine_sizelimitbug
Simplify determine_sizelimitbug()
2019-10-17 09:39:54 +02:00
Dirk Wetter e7d67e6134
Merge pull request #1341 from dcooper16/run_protocols_speedup
Use determine_optimal_sockets_params() in run_protocols()
2019-10-17 09:28:33 +02:00
Dirk Wetter a8a938470c
Merge pull request #1342 from dcooper16/bad_version_negotiation
Warn if bad version negotiation detected
2019-10-17 09:22:08 +02:00
Dirk Wetter 975ee61eee
Merge pull request #1346 from csett86/osx10146
Update Safari to 13.0 and macOS to 10.14
2019-10-17 08:53:42 +02:00