Commit Graph
100 Commits
Author SHA1 Message Date
Dirk WetterandGitHub 88cf7e657b Merge pull request #2120 from dcooper16/supported_groups
Add FFDHE groups to supported_groups
2022-03-09 20:16:24 +01:00
Dirk WetterandGitHub b3e4ac8934 Merge pull request #2117 from dcooper16/fix_sclient_auth
Fix sclient_auth
2022-03-09 11:17:45 +01:00
Dirk WetterandGitHub 55b654cbee Merge pull request #2118 from dcooper16/rsapss
Include RSA-PSS in ClientHello
2022-03-08 20:07:29 +01:00
Dirk WetterandGitHub f73bc446ba Merge pull request #2115 from enxio/3.1dev
Update docs for #2114
2022-03-02 17:13:41 +01:00
Dirk WetterandGitHub dc0a4c87bf Merge pull request #2114 from enxio/3.1dev
Add support for TN3270/telnet STARTTLS.
2022-03-02 14:07:02 +01:00
Dirk WetterandGitHub 22ec6de58c Merge pull request #2112 from drwetter/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-02 08:25:12 +01:00
Dirk WetterandGitHub 560424de36 Merge pull request #2113 from drwetter/dependabot/github_actions/docker/login-action-1.14.1
Bump docker/login-action from 1.13.0 to 1.14.1
2022-03-02 08:24:25 +01:00
Dirk WetterandGitHub 740756b55f Merge pull request #2108 from drwetter/dependabot/github_actions/docker/login-action-1.13.0
Bump docker/login-action from 1.12.0 to 1.13.0
2022-02-26 14:18:56 +01:00
Dirk WetterandGitHub 7b38198ced Merge pull request #2106 from drwetter/fix_2096
Fix "ID resumption test failed" under Darwin
2022-02-17 09:04:23 +01:00
Dirk Wetter e1711a7ccb Fix "ID resumption test failed" under Darwin
Under Darwin using LibreSSL it was not possible to test for session
resumption by session ID.

This fixes #2096 by checking not only the return value of the s_client
hello but also whether a probable certificate is being returned.
2022-02-16 23:09:11 +01:00
Dirk WetterandGitHub ccef30ae8b Merge pull request #2105 from drwetter/fix_2103_3.1dev
Fix JSON output bc of missing locale in alpine (3.1dev)
2022-02-16 13:30:58 +01:00
Dirk Wetter 27dc0589ae Fix JSON output bc of missing locale in alpine (3.1dev)
It is now being tested whether the binary locale exists and
there's a global introduced for that.

Also there's no fileout warning at this early stage anymore
as it leads to non-valid JSON.

This fixes #2103 in 3.1dev.
2022-02-16 12:16:11 +01:00
Dirk WetterandGitHub dd247faf25 Merge pull request #2101 from drwetter/fix_2100
Fix locale error message when en_US.UTF-8 isn't available
2022-02-14 19:49:24 +01:00
Dirk Wetter bfb78628da Fix locale error message when en_US.UTF-8 isn't available
Therefore a new global function was declared checking whether any of
the known locales work on the client without seeting them.
C / POSIX should work as well for LC_COLLATE.

This fixes #2100 for 3.1dev.
2022-02-14 18:07:57 +01:00
Dirk WetterandGitHub 13f0388539 Merge pull request #2094 from drwetter/fix_2052.Darwin
Fix Darwin / LibreSSL startup problem
2022-02-02 13:34:23 +01:00
Dirk Wetter 9b98c9e73e correct English in comment 2022-02-02 12:28:09 +01:00
Dirk Wetter 8cc3130e0d Fix Darwin / LibreSSL startup problem
This PR addresses a bug where a user encountered the question "The results
might look ok but they could be nonsense. Really proceed".

That happened under Darwin and probably some LibreSSL versions when
checking some hosts. sclient_auth() returned 1 indicating no SSL/TLS
handshake could be established.

This PR modifies sclient_auth() so that in those cases 0 is returned by
skipping the check for the session ID. As NO_SSL_SESSIONID needs to
be set when there's no session ID, this is done separately.
2022-02-02 11:38:33 +01:00
Dirk WetterandGitHub 02ec0607a8 Merge pull request #2093 from drwetter/dependabot/github_actions/docker/build-push-action-2.9.0
Bump docker/build-push-action from 2.8.0 to 2.9.0
2022-02-02 11:32:41 +01:00
Dirk WetterandGitHub 0d97b93131 Merge pull request #2088 from drwetter/starttls_ldap
Add prototype for STARTTLS+ LDAP via sockets
2022-02-01 11:28:17 +01:00
Dirk Wetter ce746cd8b7 Add CI check
* for STARTTLS + LDAP
* for STARTTLS + POP3 reenable check with openssl as GH has not the time limits which Travis had
2022-02-01 10:02:35 +01:00
Dirk Wetter da3520f8b2 Update documentation
* remove hint that LDAP only works with STARTTLS
* Add the relevant LDAP RFC for STARTTLS
* Amend with sieve RFC
* Correct numbering order of RFC section
2022-01-31 11:05:52 +01:00
Dirk Wetter 4639e996db Remove ldap protocol early returns
Partly revert bb5450e3f5
2022-01-31 10:36:51 +01:00
Dirk Wetter 9447c8c866 Amends LDAP + STARTTLS / rename sockread_serverhello()
This commit adds parsing the success value of the STARTTLS upgrade
in LDAP. Only possible values whould be 0 or one according to RFC 2380.
All values not equal to zero will terminate the check.

Also, this PR renames sockread_serverhello() to sockread() as the word
serverhello is pretty misleading. It just reads from ANY socket. (sorry
to confuse people here, that should have gone into a separate PR).
  Also sockread() and sockread_fast() are better documented.
2022-01-27 18:35:40 +01:00
Dirk WetterandGitHub 93e3b49619 Merge pull request #2086 from drwetter/dependabot/github_actions/docker/build-push-action-2.8.0
Bump docker/build-push-action from 2.7.0 to 2.8.0
2022-01-24 18:05:12 +01:00
Dirk Wetter 601ff16a0a Add prototype for STARTTLS+ LDAP via sockets
See #1258

To do:
* more robustness. At least the success value from the response need to be retrieved and checked via starttls_io().
* double check the pre-handshake before the OID whether it's correct for every case
* documentation
* inline help

It seems to work though against db.debian.org
2022-01-24 16:49:03 +01:00
Dirk WetterandGitHub 06890d4506 Merge pull request #1990 from dcooper16/improve_client_auth
Improve check for client authentication
2022-01-10 11:19:10 +01:00
Dirk WetterandGitHub 4a358e0489 Merge pull request #2081 from dcooper16/sclient_dev_null
Send /dev/null to s_client
2022-01-06 21:17:40 +01:00
Dirk WetterandGitHub e35f0e8ed7 Merge pull request #2078 from drwetter/feature_dig_2077
Add +search to dig
2022-01-03 17:50:21 +01:00
Dirk Wetter c573984340 Add +search to dig
... for all forward + non-mdns lookups.

This might help to avoid supplying domain names to local hosts (they would need
to have a valid certificate for the short DNS name then).

Fixes #2077
2022-01-03 16:44:09 +01:00
Dirk WetterandGitHub 3827521698 Merge pull request #2075 from drwetter/drwetter-patch-1
again wide screen mode for HTML
2021-12-27 17:11:36 +01:00
Dirk WetterandGitHub 1012a28958 again wide screen mode for HTML
see discussion on #2072
2021-12-27 17:09:59 +01:00
Dirk WetterandGitHub 9d37365a0d Merge pull request #2072 from k0lter/3.1dev
Add sieve protocol support when using STARTTLS
2021-12-27 17:07:10 +01:00
Dirk WetterandGitHub 35ddd91813 Merge pull request #2073 from drwetter/dependabot/github_actions/docker/login-action-1.12.0
Bump docker/login-action from 1.10.0 to 1.12.0
2021-12-21 10:54:58 +01:00
Dirk WetterandGitHub 2201a28070 Merge pull request #2069 from h3xx/refactor-strip_quote
Refactor strip_quote to use bash replacements instead of sed
2021-12-13 18:24:34 +01:00
Dirk WetterandGitHub c1e5ad82c1 Merge pull request #2070 from drwetter/gha_actions_improve
Also run GHA for PRs
2021-12-13 18:19:49 +01:00
Dirk WetterandGitHub 6da72bcfd7 Merge pull request #2067 from drwetter/polish_fixhttpclockskew
Consider HTTP 'Age' header field when calculating HTTP clock skew
2021-12-10 20:16:28 +01:00
Dirk Wetter fc06fcee56 fix travis 2021-12-10 18:26:03 +01:00
Dirk Wetter 7974e57688 add extra line for Age 2021-12-10 16:06:26 +01:00
Dirk Wetter 18f3ad7c31 fix travis 2021-12-10 15:58:10 +01:00
Dirk Wetter e871bd0911 Polish PR #2032 + Additions
* address my comments
* add json fields HTTP_headerTime + HTTP_headerAge if they exists
* output HTTP_AGE if it was detected
* do stripping of line feeds closer to where variables were set
2021-12-10 14:27:30 +01:00
Dirk Wetter d6398c3167 Merge branch 'fixhttpclockskew' of https://github.com/Wahnes/testssl.sh into Wahnes-fixhttpclockskew 2021-12-10 12:06:19 +01:00
Dirk WetterandGitHub 2dce751bfa Merge pull request #2055 from dcooper16/fix2053
Fix #2053
2021-12-09 17:03:57 +01:00
Dirk WetterandGitHub 0118603401 Merge pull request #2064 from dcooper16/fix_json_headers
Fix JSON section headers
2021-12-09 13:16:50 +01:00
Dirk WetterandGitHub beac382673 Merge pull request #2063 from dcooper16/keyopts
Document $keyopts
2021-12-08 19:29:40 +01:00
Dirk WetterandGitHub dc782a895c Merge pull request #2059 from dcooper16/simplify_git_rel
Simplify extracting Git information
2021-12-08 11:50:55 +01:00
Dirk WetterandGitHub 187854bd60 Merge pull request #2061 from dcooper16/update_reset_hostdepended_vars
Update reset_hostdepended_vars()
2021-12-08 11:49:10 +01:00
Dirk WetterandGitHub 04b7e1e7c3 Merge pull request #2060 from dcooper16/shellcheck
Fix some Shellcheck issues
2021-12-07 20:26:00 +01:00
Dirk WetterandGitHub 0eb73d949a Merge pull request #2056 from drwetter/update_ua_sneaky
Update Firefox UA used in sneaky mode
2021-12-07 08:55:54 +01:00
Dirk WetterandGitHub 22272105c4 Merge pull request #2057 from mspncp/git-simplify-worktree-check
Simplify check for git working tree
2021-12-06 18:35:24 +01:00
Dirk Wetter 914dde501a Update Firefox UA used in sneaky mode
From FF 52 to FF 94.

Also one double quote was removed
2021-12-03 13:15:13 +01:00
Dirk WetterandGitHub f6571c7c76 Merge pull request #2050 from dcooper16/fix2049
Fix #2049
2021-11-30 11:19:44 +01:00
Dirk WetterandGitHub b40d38fc37 Merge pull request #2047 from drwetter/fix_badFileDescriptor
Fix for "Bad file descriptor" with --connect-timeout option
2021-11-28 18:11:36 +01:00
Dirk aca75822c1 Fix for "Bad file descriptor" with --connect-timeout option
This fixes #1834 and #1435.

The --connect-timeout option had the problem that under certain circumstances
like parallel mass scanning it didn't work. The culprit was that a subshell command
was used to connect to the target but the file descriptor wasn't exported.

The commit changes tha logic so that this connect is still done in a subshell
as a pre-check if it's possible to connect. If this fails it proceeds with
error handling if NR_SOCKET_FAIL is above threshold. Otherwsie it just connects
again.

When testing of the alexa 500 it worked for me(tm). It would be great if others
can give it a try.
2021-11-26 17:24:02 +01:00
Dirk WetterandGitHub f253920e92 Merge pull request #2044 from dcooper16/fix_sub_cipherlists
Fix sub_cipherlists()
2021-11-23 09:59:41 +01:00
Dirk WetterandGitHub 7e7458bff0 Merge pull request #2043 from dcooper16/shellcheck
Fix some Shellcheck issues
2021-11-16 17:28:14 +01:00
Dirk WetterandGitHub 92a0da1d75 Merge pull request #2042 from dcooper16/check_file_permissions
Check file permissions on ./testssl.sh
2021-11-16 17:25:38 +01:00
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