Commit Graph

3980 Commits

Author SHA1 Message Date
David Cooper 49a4133979 GREASE
This is an initial implementation of the idea I proposed in #791. It includes checks based on draft-ietf-tls-grease as well as checks for specific implementation bugs that have previously been encountered.

This code needs testing. While I know of one server that will fail if the ClientHello contains more than 128 ciphers, I haven't been able to test any of the other code against any servers that have the tested-for bugs.

In addition, there is a need for polishing. The tests are referred to as `--grease`, which may not be a very user-friendly name. In addition, there is no output providing information about what tests are being performed. If a server fails a test, then a warning message is printed and is sent to `fileout()`. If the server passes all of the tests, then there is just a single output of "No bugs found."

At the moment, the code is not run by default. Unless `-g` or `--grease` is explicitly included in the command line, the code in this commit is not executed.
2017-09-19 09:18:46 -04:00
Dirk b9b09f586e added MS CA store, see #825
Finally complete, thx @naumanshah03
2017-09-19 15:15:54 +02:00
Dirk Wetter f48deaaa9d Update README.md 2017-09-19 14:50:08 +02:00
Dirk 4972cda2af FIX #762 (replace which by 'type -p') 2017-09-19 00:08:33 +02:00
Dirk 1c10ad0124 remove echoing ~ /usr/bin/timeout 2017-09-18 23:38:06 +02:00
Dirk b222fe8f53 Merge branch '2.9dev' of github.com:drwetter/testssl.sh into 2.9dev 2017-09-18 23:34:12 +02:00
Dirk Wetter 95af735862 Update README.md 2017-09-18 23:33:25 +02:00
Dirk Wetter 3caa73c1b8 Update README.md 2017-09-18 23:32:35 +02:00
Dirk bd55830a7e FIX #823, for jabber try PTR record first or fail 2017-09-18 23:25:07 +02:00
Dirk f014a1853b missing update from 985c845486 2017-09-18 23:01:37 +02:00
Dirk Wetter 7294df927f Merge pull request #677 from dcooper16/no_sni
Just get non-SNI certificate once
2017-09-18 21:14:34 +02:00
David Cooper 34fa8fc98e Just get non-SNI certificate once
Currently the call to `$OPENSSL s_client` to obtain the certificate returned by the server when SNI is not provided is in `certificate_info()`, which means that it is called once for each certificate found the various called to `get_server_certificates()`.

This PR moves the call to `$OPENSSL s_client` to `run_server_defaults()` so that the call is made only once, even if more than one server certificate was found.

In addition, in most cases the certificate returned by the server when SNI is not provided will already have been retrieved by `run_server_defaults()` (in rounds 8-14), in which case `$HOSTCERT.nosni` can just be copied from there rather than making an additional call to `$OPENSSL s_client`.
2017-09-18 13:31:38 -04:00
Dirk Wetter a395f91f0e Merge pull request #777 from dcooper16/fix772
Fix #772
2017-09-18 18:36:53 +02:00
Dirk 6b1d81d28d imor housekeeping for ``fileout()`` in ``run_http_header()`` 2017-09-18 18:18:05 +02:00
Dirk Wetter 200440a28f Merge pull request #820 from seccubus/insecure_redirect
Fixed file output error in case of insecure redirect
2017-09-18 18:01:43 +02:00
Dirk f372b4b775 FIX #622
If the host negotiated SSLv3 reading of the ServerKeyExchange message failed
and as a consequence determination of the DH key
2017-09-18 17:50:06 +02:00
David Cooper a264898f77 Initial fix for #772
This commit provides a partial fix for #772.
2017-09-18 09:52:30 -04:00
Dirk 8b076e9841 relect what to do for updtaing ca_hashes.txt 2017-09-18 14:20:56 +02:00
Dirk 985c845486 update of certificate stores, except MS 2017-09-18 14:18:00 +02:00
Dirk 26c77cc3c2 any openssl will do 2017-09-18 14:02:12 +02:00
Dirk c4e5533ab0 FIX #822 2017-09-15 21:20:42 +02:00
Dirk 837a6fb31c fix travis build in fad8c63 2017-09-15 15:38:11 +02:00
Dirk fad8c631ef consistently open the file with echo here as well
see CSVFILE (and request #822)
2017-09-15 15:09:13 +02:00
Dirk Wetter 90cd8cd3e2 Merge pull request #796 from sdann/mysql_standard_cipher
Catch MySQL (yaSSL) server bug when testing standard cipher categories
2017-09-15 14:02:26 +02:00
Frank Breedijk 49ed49f505 Fixed file output error in case of insecure redirect 2017-09-11 16:59:34 +02:00
Dirk 50287ef2c4 fix for empty/malformed socket replies
During protocol check if a sever answered unexpected with
closing the conenction or another malformed reply the
output was not ok as DETECTED_TLS_VERSION was empty.

This fixes it by filling the variable with a string in ``parse_tls_serverhello()``
and then check in higher level (``run_protocols()``) the content.

Also it seems that I forgot in the commit from yesterday one ``&&`` to
commit in ``run_breach()``
2017-09-01 16:13:32 +02:00
Dirk ee8c5e51a1 fix vulnerability output for breach and x509 based client auth
and polish output in ``run_renego()``
2017-08-31 17:22:10 +02:00
Dirk 9345b55865 added ALL_CLIENTS for client siumulation 2017-08-30 23:40:47 +02:00
Dirk Wetter 25f1293756 client simulation update
file renamed (dash is more consistent)

env var "ALL_CLIENTS" now shows every browser (or client) during
client simulation
2017-08-30 23:04:52 +02:00
Dirk Wetter 4379174970 rename generated file, comment it better + take care of one GREASE cipher 2017-08-30 23:02:21 +02:00
Dirk Wetter 54539e9da3 rename client simulation file (das is more consistent)
update client simulation: now has every client from SSLlabs and
it is properly ordered
2017-08-30 23:00:32 +02:00
Dirk Wetter e45d80eb40 reordering of global vars, warning for client simulation of run w openssl more clear 2017-08-30 21:09:52 +02:00
Dirk Wetter 8be7dcbf09 Reorder client simulation data (see #776) and update README 2017-08-30 20:35:15 +02:00
Dirk Wetter da16b6a2e2 Merge pull request #818 from dcooper16/aria-ciphers
Add OpenSSL names for ARIA ciphers
2017-08-30 17:27:29 +02:00
David Cooper 6460de39a2 Add OpenSSL names for ARIA ciphers
A PR was just accepted into the master branch of https://github.com/openssl/openssl that specifies OpenSSL names for the ARIA GCM cipher suites: bc32673869. This PR adds these OpenSSL names to the cipher-mapping.txt file. It also changes the description of the encryption algorithm for these ciphers from "ARIA" to "ARIAGCM" to be consistent with OpenSSL and with the other GCM ciphers in the cipher-mapping.txt file.

In addition, OpenSSL names for some of the ARIA CBC ciphers are provided in https://github.com/openssl/openssl/blob/master/doc/man1/ciphers.pod, and this PR adds those OpenSSL names to the cipher-mapping.txt file as well.
2017-08-30 11:12:11 -04:00
Dirk Wetter 2b055e4425 FIX #778
read the session ticket lifetime and based on that emit a proper output
2017-08-30 12:54:52 +02:00
Dirk Wetter 3e2d321e68 FIX #789 2017-08-30 12:24:13 +02:00
Dirk 5f2043eb02 slight change in wording to "problem" for #817 2017-08-29 16:04:05 +02:00
Dirk Wetter 515844208f Merge pull request #817 from dcooper16/fileout_insert_warning
Use of fileout_insert_warning()
2017-08-29 16:02:29 +02:00
David Cooper 72227fea4d Use of fileout_insert_warning()
This PR addresses the same issue as 6bb3494d98.  In its current form, fileout_insert_warning() cannot be used after fileout_section_header() has been called for the first time.
2017-08-29 09:03:47 -04:00
Dirk Wetter d534447da2 Merge pull request #816 from dcooper16/cipher_match_json
Fix single cipher and JSON pretty
2017-08-29 11:18:48 +02:00
David Cooper fa063ccd98 Fix single cipher and JSON pretty
testssl.sh produces an invalid JSON file if the --json-pretty option is used with the --single-cipher option. The reason is that fileout_section_header() isn't called before run_cipher_match() calls fileout() and fileout_section_footer() is not called afterwards.

There is also a problem with MEASURE_TIME, since the "cleanup" at the end of lets_roll() is not performed.

This PR fixes these problems by adding a call to fileout_section_header() before the call to run_cipher_match() and by copying the code from the end of lets_roll() to run_cipher_match() (just before the call to exit).
2017-08-28 16:12:57 -04:00
Dirk b5c92e9a90 renaming the id of client simul to be consistent with previously used function at least 2017-08-28 21:14:39 +02:00
Dirk 6bb3494d98 addressing @dcooper's remark in #815 2017-08-28 21:09:09 +02:00
Dirk 0933cfd041 further fixes WARNING in fileout (should be WARN) 2017-08-28 20:54:08 +02:00
Dirk 078f4a9992 Merge branch '2.9dev' of github.com:drwetter/testssl.sh into 2.9dev 2017-08-28 18:38:19 +02:00
Dirk 16dae3511e FIX #815
Extra client side warning led to a non-valid JSON pretty output. This fixes
this bug by adding an extra object. The objects are named "clientProblem${NUMBER}".
By "extra client side" I mean extra warnings which are not happening during regular
tests -- those are no extra ones and should just warn with ``fileout()`` instead
of ``fileout_insert_warning()``.

Also some ``fileout arg1 WARN`` were patched: WARN is not a finding. It is just
a report that either on the client side something doesn't work as expected or
the server could not be checked during a particular test. WARNING doesn't
exist at all, WARn should be used instead.

Some lines where a warning output to JSON or CSV was missing, was added.
2017-08-28 18:25:45 +02:00
Dirk Wetter 9f994cc9a4 Update Readme.md 2017-08-26 11:20:46 +02:00
Dirk Wetter 5ea2b7c612 typo 2017-08-13 11:32:24 +02:00
Dirk Wetter 484e5bef7a Merge pull request #813 from dcooper16/update_readme
Update README.md for etc directory
2017-08-05 11:16:50 +02:00