Commit Graph
100 Commits
Author SHA1 Message Date
Dirk 636843d6ff Fix mass testing problem
... see #1208. Also some redundant quotes were removed
2019-02-28 19:30:33 +01:00
Dirk 727a2888d6 Re-adding IP/FQDN + PORT to CSV output
This commit fixes a recently introduced bug, see #1128
2018-09-20 22:05:28 +02:00
Dirk 3c80c06554 Fix filename expansion in CSV output
(Backport of 2.9.5 branch)

This commit fixes #1123 where a security header containing an asterix lead
to a local filename expansion which was included in the CSV file output.
A new function fileout_csv_finding() addresses this.

Also if "$GIVE_HINTS" isn't true the headline and each line in the CSV file doesn't include
anymore the word hint -- which is more consistent with the JSON output.
2018-09-19 11:57:42 +02:00
Dirk 1b06d6e61a Bump subversion number 2018-09-07 17:05:41 +02:00
Dirk 485c09461b Avoid conflicts of OpenSSL 1.1.1 config file
This addresses a bug where openssl s_client connects hiccuped
because of newer config files which our openssl 1.0.2 couldn't
swallow.

It appeared first on Debian.

FIX #1117

FIX #1098
2018-09-05 16:56:15 +02:00
Dirk 45c6f98382 Fix error introduced from previous commit 2018-08-15 02:17:14 +02:00
Dirk 32947188dd FiX test scenarios with -6 and --ip=<ipv6address>
This PR fixes #1100 where those cmdline options were supplied
and also the IPv4 address was tested.

It also lables supplied IPv6 addresses as AAAA records
instead of A records.

Still, determine_ip_addresses() has space for improvements.

Some comparisons fixed strings popped up during debugging were polished
to avoid internal quoting

[[ $VAR == "teststr" ]]

will be otherwise expanded to

[[ $VAR == \t\e\s\t\s\t\r ]]
2018-08-15 01:34:27 +02:00
Dirk 452f4333c0 The certificate from self-signed.badssl.com was about to expire
which raises a MEDIUM type issue in testssl.sh .

This commit does a workaround for this, so that those certificates
will be ok in Travis CI.
2018-06-13 15:02:08 +02:00
Dirk af8b0855b6 Fix line feeds in vulnerabilty output when running in wide mode (backport)
Backport of b6cc01a558:

-----

This commit is a FIX for #1069, thus when running in
wide mode it corrects an additional line feed which
happened sometimes.

As @dcooper16 pointed out it also cleans up the needless
if-statements in run_rc4(), run_lucky13() and run_beast().

It also inserts for wide mode lines a blank so the alignment
is not at the left border anymore (check for leftovers
needed).
2018-06-13 13:41:33 +02:00
Dirk 7daf5de674 JSON and CSV output problem with mass testing
This is a backport of #1039 to 2.9.5. Log from David Cooper:

There is currently a problem if mass testing is being performed, JSON and/or CSV output is to be produced, the parent process calls `fileout()`, and each child process have its own output file for the JSON and/or CSV output. The can be seen, for example, with the following:
```
testssl.sh --openssl=openssl_1.1.1 --file test_servers.txt --csvfile output_dir --jsonfile output_dir
```
A call will be made in the parent process to report that openssl_1.1.1 has "No engine or GOST support via engine." `fileout()` will try to write to output_dir, which will result in an error.

This PR fixes the problem by checking that the file to be written to is not a directory (as is already done in `html_out()` for HTML output).

NOTE: At some point, a change should be made so that all of these checks are performed once (probably in `html_header()`,`csv_header()`, and `json_header()`), with the results being stored in a variable, so that these file operations do not need to be performed each time output is to be written to one of these files.
2018-04-24 07:54:23 +02:00
Dirk 4071f252bc CCS injection: better handling of TLS alert protocols
This is a backport of 8149c2d5cf.

In certain situations while testting for CCS injection it could have happened
that an error code was sent which was not interpreted properly by testssl.sh.
(https://tools.ietf.org/html/rfc5246#section-7.2)

This has now been fixed and thus addresses #906. Also it has been made sure
that other error codes are reported appropiately.

The case where this test failed before was a non-patched Ubuntu 12.04
with openssl/postfix on port 25.
2018-04-20 11:46:21 +02:00
Dirk ec7ef8aa3c Bump patch version 2018-04-09 10:07:46 +02:00
Dirk c96d01d376 Fix regression in #198
For enddate conversion there's no need to tell ``date``
to convert the time including the TZ. MacOS X' date hiccups
when this will be done (strangely, FreeBSDs are fine).
2018-04-09 09:07:51 +02:00
Dirk 7d4f36493c be more verbose what --warnings batch means (see #1027) 2018-04-05 21:54:25 +02:00
Dirk 68b07f1ebc workaround for missing date format conversion (OpenBSD) in http date 2018-03-24 19:45:21 +01:00
Dirk 7cd872313e better matching of empty server banners
Backport of b1b30b3fb8
2018-03-23 14:28:39 +01:00
Dirk 4ff442ad7f Backport of fix for #1021
Note: The order of an if-statement matters if a variable isn't
declared. ;-)

Probably this 2.9.5 can live without it but rather play safe
and clean...
2018-03-21 15:06:09 +01:00
Dirk 48a702a569 readjust missing HSTS in JSON to info level, see #1010 2018-03-21 09:56:50 +01:00
Dirk ef594c4e1f fix non-initialized variables 2018-03-02 21:02:16 +01:00
Dirk c636a82b0a Fix HPKP regression where it stated that only one SPKI was used 2018-03-01 15:34:25 +01:00
Dirk ac5aca0dcf address #876 (empty addcmd2 variable) 2018-02-27 13:08:42 +01:00
Dirk a2d59abf87 Rollup: OpenBSD compatbility, SLES 10 incompatibility
bash 3.2 is now a minium requirement and it is being tested.
It refuses to run if anything lower is detected/

Rollback of d5c86a8df2, see #999

Backport (f812403292) for OpenBSD date.
Also adding LibreSSL not to warn bceause of trust reliability
2018-02-19 11:16:04 +01:00
Dirk d5c86a8df2 Fix #999, for bash 3.1, regex matchg failed 2018-02-16 19:11:58 +01:00
Dirk f7288fd4bf Backport of Alpine Linux Dockerfile from 2.9dev 2018-02-09 14:11:27 +01:00
Dirk c004469e0f backport of #982
fixes #981
2018-02-08 14:16:36 +01:00
Dirk af6ca18933 change certificate enddate not to contain the TZ offset 2018-01-31 16:37:22 +01:00
Dirk 56aa009491 backport #968 2018-01-23 10:13:46 +01:00
Dirk e40e4007b1 backport of #961 (client auth and broken json-pretty) 2018-01-19 14:18:10 +01:00
Dirk 4d7aa5df8b Fix for POP3, robustness for STARTTLS
POP3 STARTTLS handshakes were often unsuccessful as
a regex wasn't properly escaped.

Furthermore if a STARTTLS handshake doesn't succeed, there's
a warning now.
2017-12-06 12:48:55 +01:00
Dirk 8ebba5593d Fixes in headers
- double word match: Content-Security-Policy matched also X-Content-Security-Policy
- X-UA-Compatible always appeared twice
2017-12-01 13:37:23 +01:00
Dirk a53cb4b971 Recognise TLS alerts as a sign that SSLv2 is not supported
See #908 and f61b701f5a

In order to have better debugging info the TLS alert message is printed
in clear. Messages code and text assignements was moveed to a separate
function.
2017-11-29 12:00:53 +01:00
Dirk 59b4f6364b Increase STARTTLS_SLEEP for lame servers 2017-11-24 23:09:03 +01:00
Dirk bf0fde27e6 backport dockerfile from 2.9dev 2017-11-19 16:14:30 +01:00
Dirk WetterandGitHub a802792db5 update links, reorder features 2017-09-27 09:02:29 +02:00
Dirk ed88add923 regression fix: output for CVE-2015-3197 was missing in DROWN 2017-09-20 17:24:37 +02:00
Dirk c5ac8c9227 workaround due to problem with blanks in $SWURL
SWURL contained for historical reasons trailing blanks
for released versions.
This caused an error in pr_boldurl --> html_out which
didn't write the trailing style info and didn't close
the href tag (travis complained.)

This patch removes the trailing blank but it doesn't
fix the error
2017-09-20 10:47:18 +02:00
Dirk 11b4f67d7e version number 2017-09-20 07:11:11 +02:00
Dirk WetterandGitHub f9c72ea85e Update Readme.md 2017-09-19 16:22:09 +02:00
Dirk 11d7645754 changed for 2.9.5 2017-09-19 16:13:38 +02:00
Dirk b9b09f586e added MS CA store, see #825
Finally complete, thx @naumanshah03
2017-09-19 15:15:54 +02:00
Dirk WetterandGitHub 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 WetterandGitHub 95af735862 Update README.md 2017-09-18 23:33:25 +02:00
Dirk WetterandGitHub 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 WetterandGitHub 7294df927f Merge pull request #677 from dcooper16/no_sni
Just get non-SNI certificate once
2017-09-18 21:14:34 +02:00
Dirk WetterandGitHub 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 WetterandGitHub 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
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 WetterandGitHub 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
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 WetterandGitHub da16b6a2e2 Merge pull request #818 from dcooper16/aria-ciphers
Add OpenSSL names for ARIA ciphers
2017-08-30 17:27:29 +02: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 WetterandGitHub 515844208f Merge pull request #817 from dcooper16/fileout_insert_warning
Use of fileout_insert_warning()
2017-08-29 16:02:29 +02:00
Dirk WetterandGitHub d534447da2 Merge pull request #816 from dcooper16/cipher_match_json
Fix single cipher and JSON pretty
2017-08-29 11:18:48 +02: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 WetterandGitHub 9f994cc9a4 Update Readme.md 2017-08-26 11:20:46 +02:00
Dirk WetterandGitHub 5ea2b7c612 typo 2017-08-13 11:32:24 +02:00
Dirk WetterandGitHub 484e5bef7a Merge pull request #813 from dcooper16/update_readme
Update README.md for etc directory
2017-08-05 11:16:50 +02:00
Dirk WetterandGitHub 6776a66603 Merge pull request #811 from dcooper16/certificate_transparency
Certificate Transparency
2017-08-03 21:55:28 +02:00
Dirk WetterandGitHub a81b99fd04 Merge pull request #809 from dcooper16/parse_tls_serverhello_debug_levels
parse_tls_serverhello(), dh_bits, debug level 2
2017-08-02 09:30:46 +02:00
Dirk 8b378ea218 FIX #808 2017-08-01 21:42:33 +02:00
Dirk 4536678b82 FIX (again) 804 and PRTG monitoring server 2017-08-01 15:37:40 +02:00
Dirk 6a4fd280bf FIX #802 2017-08-01 13:23:21 +02:00
Dirk 9540224722 adding comments for David's PR #807 and pointing to the cipher list in #806 2017-07-31 12:59:36 +02:00
Dirk WetterandGitHub 9c1fe0589c Merge pull request #807 from dcooper16/fix_806
Fix #806
2017-07-31 12:50:19 +02:00
Dirk 4276030500 STARTTLS improvements and no protocol detections
- add forgotten servive FTP and XMPP
- polish other services

- after TLS 1.2 run is finished run a check whether no protocol has been detected and ask the user for confirmation to proceed
2017-07-30 22:46:17 +02:00
Dirk WetterandGitHub eeda1ef684 Merge pull request #805 from dcooper16/client_sim_ssl2_server
Client simulation and SSLv2 servers
2017-07-27 17:34:42 +02:00
Dirk WetterandGitHub 64f6591210 Merge pull request #800 from dcooper16/fix_client_sim_sslv2
Fix client simulations with SSLv2 ClientHello
2017-07-27 12:58:23 +02:00
Dirk 8b2dfb81c5 reflect 37c8ee8c4e: debug level 2 is showing only minimal information like rough status and errors 2017-07-26 23:13:57 +02:00
Dirk 37c8ee8c4e Straigthen DEBUG level 2
FIX #786

Fixed all other occurences so that debug level 2 is showing only minimal information like rough status and errors

Better line breaks for level 2

In ``client_simulation_sockets()`` and ``tls_sockets()`` moved debug output into if statements (may save a bit of time)

Replaced "$DEBUG -eq" by "$DEBUG -ge"

Removed obsolete hb_rounds in ``run_heartbleed()``

Adjusted wide output in vulnerabilities
2017-07-26 22:37:50 +02:00
Dirk 2932e1f29e FIX #798 2017-07-26 09:55:49 +02:00
Dirk d783bd5856 reminder after #759 has been addressed 2017-07-25 21:53:05 +02:00
Dirk WetterandGitHub b60e25fbea Merge pull request #801 from dcooper16/std_cipherlists_has_server_protocol
std_cipherlists() and has_server_protocol()
2017-07-25 21:48:52 +02:00
Dirk 512cb81325 typo in comment for run_std_cipherlists() 2017-07-25 20:38:02 +02:00
Dirk WetterandGitHub 468e96f419 Merge pull request #787 from sdann/fix_has_server_protocol
Fix logic in has_server_protocol()
2017-07-25 16:27:36 +02:00
Dirk b7f4b23c23 commenting #797 2017-07-25 16:19:36 +02:00