Commit Graph
100 Commits
Author SHA1 Message Date
Dirk WetterandGitHub 1b11575c28 Merge pull request #2040 from dcooper16/ossl31
Support OpenSSL 3.0.1-dev and 3.1.0-dev
2021-11-10 08:12:30 +01:00
Dirk WetterandGitHub 883d7bd237 Merge pull request #2039 from dcooper16/fix_debugme1_redirect
Fix calls to debugme1() with redirects
2021-11-10 08:09:22 +01:00
Dirk WetterandGitHub b7d6b7ca7b Merge pull request #2034 from magnuslarsen/3.1dev
[Rating] Fix cipher rating, and add penalty for weak ciphers
2021-11-06 12:20:18 +01:00
Dirk WetterandGitHub 75dd8fc89b Merge pull request #2031 from dcooper16/fix2030
Fix 2030
2021-10-29 09:14:27 +02:00
Dirk WetterandGitHub b00e065546 Merge pull request #2028 from dcooper16/prioritize_chacha
Fix #1733
2021-10-28 09:09:53 +02:00
Dirk WetterandGitHub 1dc858dc90 Merge pull request #2026 from dcooper16/speedup_cipher_pref_check
Speedup cipher_pref_check()
2021-10-27 10:04:13 +02:00
Dirk WetterandGitHub 6f6eec25c1 Merge pull request #2025 from dcooper16/remove_extra_colon
Remove extra colon
2021-10-27 10:02:47 +02:00
Dirk WetterandGitHub dc074ebdf1 Merge pull request #2024 from dcooper16/improve_cipher_pref_check
Improve cipher_pref_check()
2021-10-26 20:40:58 +02:00
Dirk WetterandGitHub 1a66155c4a Merge pull request #2022 from dcooper16/fix_s_client_options
Fix s_client_options()
2021-10-25 19:02:07 +02:00
Dirk WetterandGitHub e36cfffb2c Merge pull request #2020 from drwetter/improve_precheck_curves
Improve precheck for curves
2021-10-23 23:02:21 +02:00
Dirk Wetter 31162d2320 typo / wording 2021-10-23 18:40:29 +02:00
Dirk Wetter a11bd1585e Improvement for testing curves with several openssl / libressl versions
As noted in #2016 the detection of curves in find_openssl_binary()
copuld be improved.

This commit removes another connect call. Also it corrects the port statement
for LibreSSL-like pre-checks as port 0 generally seems to me better suited.
Inline documentation was added.

It worked so far with openssl 1.0.2, 1.1.1 and 3.0 and LibreSSL 3.4.

This needs to be backported to 3.0.
2021-10-23 18:38:04 +02:00
Dirk WetterandGitHub 6251a6c1d6 Merge pull request #2016 from drwetter/fix_double_ports
Fix double ports statement
2021-10-23 16:02:04 +02:00
Dirk WetterandGitHub 82fc8e7431 Update feature_request.md 2021-10-21 11:01:13 +02:00
Dirk WetterandGitHub d5e761e9e9 Update bug_report.md 2021-10-21 11:00:44 +02:00
Dirk WetterandGitHub 93c1180f9d Update feature_request.md 2021-10-21 10:56:27 +02:00
Dirk WetterandGitHub ff919df2e0 Update bug_report.md 2021-10-21 10:52:34 +02:00
Dirk WetterandGitHub 489b63e9dd Merge pull request #2017 from drwetter/cab_is4browsers
Add browser requirement for the entropy of cert serial
2021-10-21 09:51:00 +02:00
Dirk Wetter 110d1aa73c Add browser requirement for the entropy of cert serial 2021-10-20 19:26:23 +02:00
Dirk Wetter 3140352b0c Fix double ports statement
In order to be in line with 3.0 this adds a statement to avoid double port
statements for WSL users in a precheck condition

   $OPENSSL s_client -groups $curve -connect 127.0.0.1:0:8443

This commit changes that to $OPENSSL s_client -groups $curve -connect 127.0.0.1:8443
which could cause a delay for WSL users and needs further investigation.

Not clear why port 8443 was chosen.
2021-10-20 09:01:09 +02:00
Dirk WetterandGitHub 79df758023 Merge pull request #2014 from drwetter/fix_len_certserialnum
Check cert serial len + fix output when too big
2021-10-20 08:58:46 +02:00
Dirk Wetter 2edfa57eaa Check cert serial len + fix output when too big
OpenSSL shows certificate serial numbers >35 with a LF (0A). Testssl.sh
just output that which makes JSON invalid and displays the LF in the terminal
too.

This commit fixes that (#2010) by adding filters so that the
serialnumber is not a multiline string.

Also this commit introduces a new function: a size check of the cert serial.
Below 8 bytes the CAB Forum's lower limit is hit which says the *entropy*
from a CSPRNG should be at least 64 bits. It is assumed that below 8 bytes
length this requirement isn't possible to meet (needs to be clarified with
Shannon, 8 bytes seems to low to me).
  The high threshold is according to RFC 5280, Section-4.1.2.2 .

See also #2013.

The output has changed, so that on the terminal the serial has one line,
SHA1 and SHA256 each one line. The new json key is "cert_serialNumberLen".
2021-10-19 19:42:12 +02:00
Dirk WetterandGitHub 9683af44a2 Merge pull request #1988 from drwetter/windows_dns_fix
Addressing lame DNS responses on WSL
2021-10-18 16:52:35 +02:00
Dirk WetterandGitHub d496c0d44b Merge pull request #2002 from smokris/1995-trusted-first
In determine_trust(), use the OpenSSL '-trusted_first' flag to ignore the now-expired DST Root CA X3 root certificate
2021-10-07 18:03:20 +02:00
Dirk WetterandGitHub d720720150 Merge pull request #2005 from drwetter/fix_1992_certificateIssuerName
Fix invalid JSON when certificate issuer contains non-ASCII chars
2021-10-03 19:52:35 +02:00
Dirk a5aa3a4bbf Fix invalid JSON when certificate issuer contains non-ASCII chars
Changed printf %s to printf %b which cause now to output
UTF-8 correctly.

See #1992
2021-10-03 18:19:24 +02:00
Dirk Wetter b6b5a67b92 Save # of connects / WSL uses 127.0.0.1:0 by default
In order to save time and to spare WSL users lame DNS lookups
I removed a couple of connect calls from 14 to 4:

$OPENSSL s_client -ssl2 -connect invalid.
-->
OPENSSL s_client -ssl2

NXCONNECT to localhost IP and port 0 is now the default when WSL
is detected. Not sure whether this is working under all circumstances,
so this needs some testing.
2021-10-02 15:25:42 +02:00
Dirk WetterandGitHub 068e07c52c Merge pull request #1997 from mig5/fix-letsencrypt-remove-dst-root-x3-ca-cert
Remove the expired DST Root CA X3 cert from all trust stores, and ensure Mozilla's is up to date (fixes ISRG X1 alternate path)
2021-10-02 08:38:34 +02:00
Dirk WetterandGitHub bab14124c1 Merge pull request #2001 from drwetter/revert-1998-1995-trusted-first
Revert "In determine_trust(), use the OpenSSL '-trusted_first' flag to ignore the now-expired DST Root CA X3 root certificate"
2021-10-02 08:34:07 +02:00
Dirk WetterandGitHub e874c1013b Revert "In determine_trust(), use the OpenSSL '-trusted_first' flag to ignore the now-expired DST Root CA X3 root certificate" 2021-10-02 08:33:39 +02:00
Dirk WetterandGitHub 624e934f77 Merge pull request #1998 from smokris/1995-trusted-first
In determine_trust(), use the OpenSSL '-trusted_first' flag to ignore the now-expired DST Root CA X3 root certificate
2021-10-02 08:33:03 +02:00
Dirk WetterandGitHub 667c6e698c Merge pull request #1996 from dcooper16/fix_md_formatting
Update testssl.1.md
2021-10-01 18:02:03 +02:00
Dirk WetterandGitHub b8bff805f7 Merge pull request #1991 from klaernie/contenttype
fix html output content type header
2021-09-24 14:21:04 +02:00
Dirk WetterandGitHub ae21ef7eab Merge pull request #1987 from drwetter/fix_1982_kali.cnf
Fix #1982: Newer openssl.cnf break openssl detection
2021-09-15 11:19:05 +02:00
Dirk Wetter fe6c22f7fd Addressing lame DNS responses on WSL (WIP)
This commit provides a global variable to the RFC 6761 use of "invalid."
which WSL clients doen't seem to handle very well, see #1738, #1812.

With this commit it e.g. is possible to use

     NXCONNECT=localhost:0 ./testssl.sh <TARGET>

to save some time.

This commit will be amended later.
2021-09-15 09:53:20 +02:00
Dirk Wetter 2405176a26 Fix #1982: Newer openssl.cnf break openssl detection
Newer configuration files from openssl may include statements
which aren't compatible with our supplied old openssl version.
This commit adds an autodetection of such a file and uses a
openssl.cnf provided by this project then.
2021-09-15 09:31:03 +02:00
Dirk WetterandGitHub 3207357e8c Merge pull request #1985 from DimitriPapadopoulos/codespell
Typos found by codespell
2021-09-14 13:37:59 +02:00
Dirk WetterandGitHub 3dddcbf445 Merge pull request #1983 from drwetter/drwetter-patch-1
Update bug_report.md
2021-09-10 18:37:43 +02:00
Dirk WetterandGitHub 611754165f Merge pull request #1984 from drwetter/drwetter-patch-2
Update feature_request.md
2021-09-10 18:37:17 +02:00
Dirk WetterandGitHub 5fc23932ac Update feature_request.md 2021-09-10 18:37:02 +02:00
Dirk WetterandGitHub 2f173de7e0 Update bug_report.md 2021-09-10 18:33:39 +02:00
Dirk WetterandGitHub 1d4acd9027 Merge pull request #1981 from drwetter/fix_1978
Fix minor inconsistency in description of cipher categories
2021-09-10 08:09:21 +02:00
Dirk 529e9da823 Fix GHA (starttls nntp)
using another IP
2021-09-09 23:17:09 +02:00
Dirk 15cfd849fe Replace --standard by --categories 2021-09-09 22:07:44 +02:00
Dirk 739f45015f Fix minor inconsistency in description of cipher categories
A longer while back the section ~ "Testing standard ciphers" was
renamed to "Testing cipher categories". However the internal help
didn't reflect that.

This fixes that, including an addtion to the documentation.

Note: the help still lists "-s --std, --standard" as a cmd line
switch.
2021-09-08 08:46:47 +02:00
Dirk WetterandGitHub 8f20d11830 Merge pull request #1976 from ap-wtioit/3.1dev-fix_dig_r_check
Fix dig -r check to only run if dig is available
2021-09-06 10:19:41 +02:00
Dirk WetterandGitHub 15e6fb4c9c Merge pull request #1975 from a1346054/fixes
WIP: Minor cleanup
2021-09-05 15:50:11 +02:00
Dirk WetterandGitHub 05ef9f91b6 Merge pull request #1972 from drwetter/fix_dig-r
Fix cases where dig -r wasn't working
2021-09-01 19:50:15 +02:00
Dirk bc742e0ea4 Amend previous commit
* add -q in grep statement to make sure the console stays clean
* redo check for noidnout by also using the help function of dig
2021-09-01 18:44:28 +02:00
Dirk f8a87315cf Fix cases where dig -r wasn't working
* the ignore ~/.digrc option from dig is now parsed from the builtin help
* there was a potential DNS call which is now avoided
* for +noidnout check however there's a call to invalid. added
* the OPENSSL_CONF="" in check_resolver_bins() was moved a few lines
  higher to avoid other errors in the terminal

Tested on (EOL) Ubuntu 14.04 which only has dig in an older version

See also #1950
2021-09-01 18:28:12 +02:00
Dirk WetterandGitHub ad3f7c3438 Merge pull request #1970 from drwetter/dependabot/github_actions/docker/build-push-action-2.7.0
Bump docker/build-push-action from 2.6.1 to 2.7.0
2021-08-30 10:19:39 +02:00
Dirk WetterandGitHub 9eaccee776 Merge pull request #1962 from dcooper16/fix1961
Fix #1961
2021-08-27 09:35:04 +02:00
Dirk WetterandGitHub be22ae2cf9 Merge pull request #1968 from jauderho/3.1dev
Add GH Action to build Docker images
2021-08-27 09:32:01 +02:00
Dirk WetterandGitHub f15da8d15d Merge pull request #1966 from drwetter/no_starttls
Add CVEs for No-STARTTLS vulnerability
2021-08-08 21:33:14 +02:00
Dirk aaf6409581 Add CVEs for No-STARTTLS vulnerability
In text output only the original one from Wietse Venema.
The other known so far in JSON/CSV
2021-08-08 21:30:35 +02:00
Dirk WetterandGitHub 89de30c867 Merge pull request #1965 from jauderho/gha_build_status
Update build status to reflect use of GHA
2021-08-08 14:00:14 +02:00
Dirk WetterandGitHub 77e47cadff Merge pull request #1963 from drwetter/fix_1956_3.1dev
Redirect debugme() outputs to stderr (3.1dev)
2021-08-07 16:18:43 +02:00
Dirk WetterandGitHub c1253f2cd0 Merge pull request #1953 from jauderho/3.1dev
Add Dependenbot checking for GitHub Actions
2021-08-07 16:17:33 +02:00
Dirk WetterandGitHub 7b0947c290 Merge pull request #1958 from dcooper16/use_all+
Use all+ in calls to tls_sockets()
2021-08-07 16:04:07 +02:00
Dirk 3f8c62dc41 Change debugme1 calls to include redirection from stderr back to stdout
The fact that debugme1() redirects to stderr and the calls to this functions
redo that is deliberately as in the future we might want to use debugme1
without redirection.
2021-08-07 15:26:51 +02:00
Dirk 4e01f86c99 Redirect debugme() outputs to stderr (3.1dev)
... to address #1956 and other places. Similar to #1957,
only for the 3.1dev rolling release branch.

Also it changes debugme1() back? to output debug
statements only when $DEBUG >= 1. Per default here
also stderr is used.
2021-08-07 15:20:09 +02:00
Dirk WetterandGitHub 1739ae1400 Merge pull request #1960 from dcooper16/certificate_compression
Check for RFC 8879 certificate compression
2021-08-05 16:51:03 +02:00
Dirk WetterandGitHub b603d57146 Merge pull request #1952 from drwetter/fix_1717
Look-ahead trick for -U --ids-friendly
2021-08-01 17:47:11 +02:00
Dirk WetterandGitHub a3ab6cd887 Merge pull request #1950 from drwetter/digrc
Ignore $HOME/.digrc
2021-07-31 18:49:57 +02:00
Dirk 6cf7521184 Look-ahead trick for -U --ids-friendly
If the order of the cmdline is '-U --ids-friendly' then we need to make sure we catch --ids-friendly. Normally we do not,
 see #1717. The following statement makes sure. In the do-while + case-esac loop  the check for --ids-friendly will be
executed again, but it does not hurt
2021-07-31 18:27:03 +02:00
Dirk 439aad1f22 Ignore $HOME/.digrc
Newer dig versions have an option to ignore $HOME/.digrc, older don't.

This commit adds a patch checking for the availability of such an option and
uses it by default. See #1894 .

If this option doesn't exist then still dig is used and can still lead to
wrong output. Unfortunately Debian-based distros are not very
good at this. Debian 10, Ubuntu 18.04 still use dig 9.11, whereas
Opensuse 15.2 has 9.16. Debian 11 and Ubuntu 20.04 use that too.
2021-07-31 15:14:22 +02:00
Dirk WetterandGitHub c40a3a7d02 Merge pull request #1946 from drwetter/noitalics4screen
Disable ANSI codes for italic when TERM == screen
2021-07-31 13:57:11 +02:00
Dirk 525a40a653 Disable ANSI codes for italic when TERM == screen
... otherwise it is being printed in reverse, see #1928.
2021-07-31 13:17:55 +02:00
Dirk WetterandGitHub 46862ecc84 Merge pull request #1945 from drwetter/alpine
Upgrade to alpine 3.13
2021-07-30 18:01:25 +02:00
Dirk WetterandGitHub 68c5acb556 Upgrade to alpine 3.13 2021-07-30 18:01:12 +02:00
Dirk WetterandGitHub 820b728bc4 Merge pull request #1943 from drwetter/email-contrib
E-Mail as a contribution possibility
2021-07-30 15:02:19 +02:00
Dirk WetterandGitHub 2b74e9f55d E-Mail as a contribution possibility
As some people may have a problem with the owner of github.
2021-07-30 15:01:39 +02:00
Dirk WetterandGitHub 2935ecc2e1 Merge pull request #1938 from drwetter/nmap_portdetection_1931
Improved SSL/TLS portdetection in nmap greppable files
2021-07-30 09:48:50 +02:00
Dirk WetterandGitHub 70d40b416b Merge pull request #1940 from dcooper16/print_spaces_faster
Print consecutive spaces faster
2021-07-30 09:21:50 +02:00
Dirk 59c0b38140 see previous commit 2021-07-25 17:14:12 +02:00
Dirk defed8705b Extend TLS/SSL port detection
As mentioned in #1931 the port detection for nmap greppable files
leaves space for improvements.

Ths PR adds a pattern detection of ssl and https in the forth or fifth
parameter of an open port, so those ports will be added to a scan when
a nmap greppable output file is as input to testssl.sh .

Also it does minor code adjustments to utils/gmap2testssl.sh .
2021-07-25 17:09:30 +02:00
Dirk WetterandGitHub 18dfa26e48 Merge pull request #1936 from drwetter/fix_1935
Fix problem when nmap file has .txt extension
2021-07-25 16:34:58 +02:00
Dirk b1c1d250cf Redo utils/gmap2testssl.sh
.. mainly copied from testssl.sh. Also it adds a detection for the
strings ssl and https. If those run at non-stanadard ports but nmap
detected it, it'll show up in the output file.

That will be backported to the main program, see #1931 .
2021-07-25 16:28:50 +02:00
Dirk 5a7b7d8b8e Fix problem when nmap file has .txt extension
This addresses a bug filed in #1935 in 3.1dev when the supplied file
has a .txt extension. In this scenario the input file was nulled
as from the input file in nmap format an internal input file was
generated which has a .txt extension, in the same directory.
The idea was to persist the file for the user.

Now, this internal input file is ephemeral and only written to $TEMPDIR.
2021-07-25 13:05:40 +02:00
Dirk WetterandGitHub 05d087a564 Merge pull request #1933 from drwetter/drwetter-patch-1
Update bug_report.md
2021-07-21 09:22:38 +02:00
Dirk WetterandGitHub 8203049154 Update bug_report.md 2021-07-21 09:22:01 +02:00
Dirk WetterandGitHub 56dcbcdc15 Merge pull request #1924 from drwetter/fix_1915
Fix redundant message (BREACH) when client certificate required
2021-06-22 08:25:29 +02:00
Dirk WetterandGitHub f4bb1a20e2 Merge pull request #1925 from PeterDaveHello/Add.dockerignore
Ignore FreeBSD & macOS OpenSSL binary in Dockerfile
2021-06-19 18:17:51 +02:00
Dirk 28d9bc483d Fix redundant message (BREACH) when client certificate required
same as #1916.

Fixes #1915
2021-06-19 15:27:03 +02:00
Dirk WetterandGitHub 9f0d0c0062 Merge pull request #1921 from drwetter/gha_denylist
Github actions modifications
2021-06-19 12:30:00 +02:00
Dirk 2af7860a3c Remove mac osx
... apt is probably not the right thing ;-)
2021-06-19 11:17:52 +02:00
Dirk 247d08882e GHA: Fix push + PR
see https://github.community/t/how-to-factor-paths-in-common-for-push-and-pull-request/115967/2

TL;DR:  There is no way to specify the common paths for two events
2021-06-19 11:12:00 +02:00
Dirk 5cd97ddcb9 Correct YAML error in GHA + add macOS
- yamllint to the rescue. Still shows an error though:
  4:3       error    syntax error: expected <block end>, but found '<block mapping start>' (syntax)

- added macos, see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
2021-06-19 10:45:08 +02:00
Dirk b8a9b9c6db Github actions modifications
- define deny list of files when modified not to run GHA
- specRitfy OS to be ubuntu-20.04 (is there a debian at all?)
- only use perl 5.26

While researching I stumbled over mac.osx as an OS one can specify. If anybody
knows whether this is really macosx (license?) please let me know. That
would be a great addition for CI. (Couldn't find BSD yet...)

See #1920
2021-06-19 09:20:48 +02:00
Dirk WetterandGitHub 2d3bd724fc Merge pull request #1912 from PeterDaveHello/MakeShellScriptShebangConsistent
Make Shell Scripts' Shebang more consistent
2021-06-18 08:59:22 +02:00
Dirk WetterandGitHub cb844557f8 Merge pull request #1913 from PeterDaveHello/CorrectExitUsage
Correct `exit` using, the exit status should be 0~255
2021-06-18 08:55:22 +02:00
Dirk WetterandGitHub 35c43719dd Merge pull request #1919 from drwetter/rm_travisCIhook
Remove travis CI hook
2021-06-18 08:47:52 +02:00
Dirk Wetter f91c0251be Rmeove travis CI hook
.. as we're using GHA now
2021-06-18 08:44:36 +02:00
Dirk WetterandGitHub 17b172229d Merge pull request #1909 from mikelolasagasti/gha
Add GitHub Actions testing
2021-06-07 09:16:31 +02:00
Dirk WetterandGitHub 7da45a81f8 Merge pull request #1905 from drwetter/tz_fix+
Display time as suggested in utc (3.1dev)
2021-06-03 20:19:29 +02:00
Dirk Wetter e1be4eabd2 Display time as suggested in utc (3.1dev)
See #1895
2021-06-03 19:24:50 +02:00
Dirk WetterandGitHub 0da8ce02cd Merge pull request #1904 from PeterDaveHello/AddBasicEditorConfig
Add a basic .editorconfig into project
2021-06-01 14:26:47 +02:00
Dirk WetterandGitHub 83909dec0c Merge pull request #1903 from PeterDaveHello/MakeVimModelineConsistent
Add missing vim modeline config in sh & perl files
2021-06-01 11:20:33 +02:00
Dirk WetterandGitHub 737ea1e7e5 Merge pull request #1902 from PeterDaveHello/MakeVimModelineConsistent
Make vim modeline config consistent
2021-06-01 08:34:23 +02:00
Dirk WetterandGitHub 1d306db062 Merge pull request #1900 from PeterDaveHello/ShebangConsistency
Make Shell Scripts' Shebang more consistent and portable
2021-05-31 10:17:47 +02:00