Commit Graph

2817 Commits

Author SHA1 Message Date
Dirk Wetter
06fd88f67a Add missing counter to ROBOT (3.2)
We missed somehow to add in the big while loop to add the fact that ROBOT is a vulnerability which became
apparent with #2967 (3.3dev).

This PR adds that for 3.2 also. See #2968.
2025-12-15 14:54:20 +01:00
David
7e43eb6e0c Fix #2959
This commit fixes #2959 by modifying TLS12_CIPHER, TLS12_CIPHER_2ND_TRY, and TLS12_CIPHER_3RD_TRY so that they each have 118 ciphers (including "00,ff"). It also modifies run_cipherlists(), run_server_defaults(), and run_beast() so that, when $SERVER_SIZE_LIMIT_BUG is true, no more than 125 ciphers are sent.
2025-12-13 08:53:53 -08:00
Dirk Wetter
5a7b534c8e Label missing KEMs as LOW severity (3.2)
see #2960.

As 3.2 is used for distributions it seems consistent if we scan for KEMs
to backport this feature.
2025-12-09 14:16:44 +01:00
Dirk Wetter
a5c13a57cf Fix pattern for matching /etc/hosts entries (3.2)
`grep -w` matches also `string1-whatsoever` so that entries like

```
192.168.0.10 anystring anystring-apache
192.168.0.11 anystring-tomcat
```

matched 3 entries over 2 lines.

This PR fixes #2937 for 3.2 by improving the pattern, so that `string1` needs a trailing whitespace or an EOL -- besides a leading whitespace..
2025-11-04 09:17:08 +01:00
Dirk
e024f0daaa Fix date parsing bc of locale problem
The new block making sure that rust coreutils work properly (PR #2913)
introduced a new check in order to determine which date functions
to use.

The function however parsed only for English error messages ("No such file").
This PR fixes #2929 that for 3.2  by setting LC_ALL to C.
2025-10-30 13:49:45 +01:00
Dirk
9bcede1a6c Update "sneaky" user agent (3.2)
fixes #2926 for branch 3.2
2025-10-28 15:19:57 +01:00
Dirk Wetter
df652c05cd Fix date for Ubuntu >= 25.10 (3.2)
Ubuntu 25.10 has transitionned from GNU Core-utils to Rust Core-utils. That changes the testing
results which date version to use for displaying / conversion of dates like in certificates.
Probably more Linux distriutions will follow. See also #2909 .

For maintenance reasons it is advised also the stable version will get this patched. For
3.3dev, see #2913 .
2025-10-12 12:20:29 +02:00
Dirk Wetter
a3372ed1a4 Merge pull request #2907 from testssl/fix_file_naming_3.2
Fix file time stamp issue
2025-09-30 20:42:23 +02:00
Dirk
ceb24740a3 Fix file time stamp issue
Backport from #2904  (3.3dev). Time stamps for file outputs are now consistent.

Kudos @jdvorak001. Fixes #2901
2025-09-30 17:37:11 +02:00
Dirk Wetter
6b7aa7a9e6 Merge pull request #2906 from testssl/fix_2884_3.2
Consistency for function ciphers_by_strength() (3.2)
2025-09-30 17:30:46 +02:00
Dirk
43a71b0611 Consistency for function ciphers_by_strength()
This PR ist similar to #2905 for 3.3dev . However for the stable brnach it's
important to note that this is a breaking change as it modifies the output.
That happens only tough when `ciphers_by_strength()` is being used --equivalent
to the command line `./testssl.sh -E` =  `./testssl.sh --cipher-per-proto`. As
this is seldom used and was basically succeeded by `-P, --server-preference`
this looks acceptable as it provides consistency which was overdue.

Details:

* keys now always with `v`, like `supportedciphers_TLSv1_2` and also ciphers
  (e.g. `TLSv1.2   x35     AES256-SHA`)
*  add word "server" to file output so that it reads "NOT a server cipher order configured"

Fixes #2884 for 3.2 .
2025-09-30 16:07:56 +02:00
David Cooper
f1a9f2198b Fix #2896
This commit fixes #2896. This commit avoids modifying the ADDTL_CA_FILES environment variable, and instead substitutes spaces for commas whenever the variable is used.
2025-09-22 08:35:33 -07:00
Dirk Wetter
c4856bef72 Merge pull request #2890 from testssl/bump_version_3.2
Bump version (3.2)
2025-09-18 11:31:56 +02:00
Dirk Wetter
71f60a1317 Merge pull request #2892 from testssl/lucky_phrasing_3.2
Lucky13: improve phrasing for 3.2
2025-09-18 10:24:53 +02:00
Dirk Wetter
892e95a6ca Rephrase Lucky13 finding for 3.2
see also #2537 .
2025-09-16 14:11:39 +02:00
Dirk Wetter
1504961a8e Bump version (3.2) 2025-09-16 12:58:58 +02:00
Dirk Wetter
0d0fbe4483 Fix indentation @ Intermediate cert validity (3.2)
... when there were two server and >1 intermediate CA certificates.
2025-09-16 12:54:41 +02:00
Dirk
7aa9d30a72 Typos fixed which led to wrong file name
... which was catched in unit tests t/{baseline_ipv4_http.t,23_client_simulation}
2025-09-15 22:43:07 +02:00
Dirk
7bb7ac8f08 Fix garbled screen when HTTP Age is not a non-negative int (3.2)
As suggested in #2885 parsing of the server determined HTTP age var wasn't strict enough, this is a backport for 3.2.

https://www.rfc-editor.org/rfc/rfc7234#section-1.2.1 requires the variable to be a non-negative integer but testssl.sh assumed it was like that but did't check whether that really was the case. This was labled as a (potential) security problem. Potential as it didn't look exploitable after review -- the header as a whole was already sanitized.

This PR fixes the typs confusion and the garbled screen by checking the variable early in run_http_header() and reset it to NaN. That will be used later in run_http_date() to raise a low severity finding.  Kudos to @Tristanhx for catching this and for the suggested PR.

Also, only when running in debug mode, this PR fixes that during service_detection() parts of the not-yet-sanitized header ended up on the screen. The fix just calls sanitze_http_header() for the temporary variable $TMPFILE.

For 3.2 sanitze_http_header() had to be modified to accept an argument and the callers needed to be changed.
2025-09-15 18:57:59 +02:00
Dirk Wetter
853cea8530 Fix displayed message when IPv6 needs to be tested too (3.2)
message: "Testing all IPv4 addresses"

related to #2843.
2025-07-15 20:49:07 +02:00
Dirk Wetter
8d905054f3 fix typos 2025-07-12 18:51:24 +02:00
Dirk Wetter
3812554987 Backport readability and more improvements from 3.3dev
The opossum patch improved http_get() , http_get_header/http_head()
in terms of readability. This was backported to improve maintainability.

Also in pwned keys if not pwned appear now in green/OK and not just
info level.

HAS_UDS2 was renamed to HAS2_UDS.
2025-07-12 18:45:45 +02:00
Magnus Larsen
826adbd6d7 feat: bump ssllabs rating guide to 2009r 2025-07-10 08:20:01 +02:00
Dirk Wetter
0b79356357 Fix not working --disable-rating switch
The logic was wrong when calling set_rating_state() in parse_cmd_line()
as do_rating was set before to true through set_scanning_defaults().

This PR fixes that by querying ${SKIP_TESTS[@]} instead and then calling
set_rating_state() when no --disable-rating was supplied .
2025-07-07 12:01:43 +02:00
Dirk Wetter
8cb32a3db9 Merge pull request #2819 from testssl/perf_improvements
Make code2network() faster by using bash instead of tr
2025-07-03 18:14:54 +02:00
Dirk
3792bceeda Improve error message for sockets fail and Alpine
See $2807 .

Also some prln_magenta were modified (see #2816) to pr_warning.
2025-06-29 15:24:44 +02:00
Dirk Wetter
d80e0e9f95 Make code2network() faster by using bash only 2025-06-27 19:09:01 +02:00
Dirk Wetter
c9a11a9fb0 Minor improvements to #2798
see https://github.com/testssl/testssl.sh/pull/2798#issuecomment-2972834180
2025-06-23 18:43:34 +02:00
secinto
529a373b2e Update testssl.sh
Modified grading for incomplete chain
2025-06-13 10:54:13 +02:00
Dirk
f2aa87ba66 Bump version
"just" bugfix release.
2025-06-12 17:26:06 +02:00
Dirk
235a6a0f88 add another OPENSSL_CONF='' 2025-06-11 19:02:06 +02:00
Dirk
91a35026b6 Fix OPENSSL_CONF problem for OPENSSL2
In #2727 there were workarounds introduced which sped up processing decryption of
ChaCha20 and and AES-GCM by using OPENSSL2 when it is supporting such functions.

However when OPENSSL2 is called and OPENSSL_CONF still points to the autogenerated
file which works for `~/bin/openssl.$(uname -s).$(uname -m)` the decryption `$plaintext`
will be empty which later on caused a negative value, see #2780 .

This fixes #2780 by prepending `OPENSSL_CONF=''` to each OPENSSL2 instance. Also it
makes `chacha20()` and `gcm-decrypt()` more robust. It is now more readable now.

At other places $OPENSSL2 were prepended by `OPENSSL_CONF=''` also if there weren't
any obvious errors noticed.

Also now all OPENSSL2 vars will appear in /tmp/testssl.XXXXXX/environment.txt when
debugging.

It was also noticed that the `find_socat()` function had room for improvements, it was
not set in any case when `socat was in $PATH or supplied via env SOCAT.
2025-06-11 18:47:14 +02:00
Dirk Wetter
735cc668c0 Merge pull request #2792 from testssl/fix_issuerCN
Fix missing issuer CN
2025-06-11 11:13:21 +02:00
Dirk Wetter
0a89d5c94f Some cert need 5 lines to reach the CN 2025-06-11 09:06:41 +02:00
Dirk Wetter
39029e9995 fix orthographic error 2025-06-10 23:13:00 +02:00
Dirk Wetter
61947405e0 Fix missing issuer CN
This fixes a problem which was introduced @ 8d8f83ace5.
It caused for some hosts not to parse / display the issuer CN correctly.

Also it adds some code in testssl.sh and in a unit test to detect
this earlier. In general an output string FIXME will now cause a
unit test to fail. This can + should be used at other places too!

Fixes #2789
2025-06-10 22:54:11 +02:00
Dirk Wetter
889aedc0e4 Fix parser for server header
Do word match and exclude minus sign

This fixes #2787 for 3.2.
2025-06-10 21:59:40 +02:00
Dirk
0daf83cf76 fix typo 2025-05-21 14:22:13 +02:00
Dirk
cd575526a7 Fix CCS injection regression
The rhs of the pattern was off by one byte and it worked in practise until recent PR #2657.

This fixes #2691 for 3.2 .
2025-05-21 14:17:54 +02:00
Dirk Wetter
85d8d44fbe Try to fix the renegotiation problem
as suggested, see https://github.com/testssl/testssl.sh/issues/2765#issuecomment-2891140503
2025-05-19 16:24:46 +02:00
Dirk Wetter
c109cafa17 Merge branch '3.2' into mac_runner 2025-05-16 18:16:58 +02:00
Dirk Wetter
0aad0a0fac Try /usr/bin/echo for testing
.. although it seems not an option to include this in prod.
RSsee https://github.com/testssl/testssl.sh/issues/2765

Omitting redirecting stderr
2025-05-12 10:43:43 +02:00
vinny-pereira
bce1083df8 fix run_breach error output 2025-05-08 07:48:20 -06:00
ssupdoc
aa2ebf3c21 Uses tolower() utility for hostname conversion 2025-05-08 17:03:04 +12:00
Sullo
6678d2dedc Lowercase URL to match 'HTTPS://<server>/' 2025-05-05 14:42:13 -04:00
Dirk Wetter
06ba579475 Merge pull request #2742 from testssl/bump_version
Prepare for upcoming release
2025-04-23 11:33:39 +02:00
Dirk Wetter
58da779a8e Merge pull request #2721 from testssl/fix_some_ipv6proxy_issues
Fix some ipv6proxy issues
2025-04-22 15:05:05 +02:00
Dirk
ffe5dea844 remove misleading command 2025-04-22 12:55:42 +02:00
Dirk
b4cdc37f9e trailing zero sounds better / is more distinguishable 2025-04-22 12:47:48 +02:00
Dirk
295a68e7ab Just bump version for upcoming release 2025-04-18 13:32:53 +02:00