Commit Graph
100 Commits
Author SHA1 Message Date
Dirk 279bc4ad91 Fix additional parameter in shouldwedo_ipv6()
.... for connectivity_problem() which may block testssl.sh
2025-07-30 12:53:13 +02:00
Dirk WetterandGitHub f14e24533b Merge pull request #2867 from testssl/check_ipv6_in_background
Exec IPv6 check in background
2025-07-29 22:54:01 +02:00
Dirk 2ce0110eee Exec IPv6 check in background
... as it can get stuck.

Also reduce MAX_WAITSOCK to 5 instead of 10.
2025-07-29 15:36:23 +02:00
Dirk WetterandGitHub 8c1ade5e38 Merge pull request #2865 from testssl/drwetter-patch-3
Modify OS bullet point + badge param
2025-07-29 12:43:25 +02:00
Dirk WetterandGitHub f64cef8871 typo 2025-07-29 12:43:00 +02:00
Dirk WetterandGitHub 8ff61c4898 Modify OS bullet point + badge param 2025-07-29 12:40:29 +02:00
Dirk WetterandGitHub 9e09d2cd58 Merge pull request #2863 from testssl/reliability_quic
More reliability for QUIC test
2025-07-28 19:03:04 +02:00
Dirk WetterandGitHub 31804ac424 Merge pull request #2857 from testssl/reliable_ut_host
Pick another host for unit tests
2025-07-28 16:37:16 +02:00
Dirk 0225bc3604 typo fix 2025-07-28 15:44:58 +02:00
Dirk 9166fc7174 Fix typo in comment 2025-07-28 15:43:01 +02:00
Dirk f8d3df7747 Make QUIC protocol detction more reliable
The site from that billioniare who made nazi gestures delivers a UDP
response without proper TLS handshake. This led to a false positive
as if the site supports QUIC via h3.

This PR makes the detection of QUIC more robust by adding a certificate check
and also take better the return values from `wait_kill()` into account.

It also introduces a function to remove any non printable chars (depending
on the LC_ALL var): `filter_printable()`

Also `sanitze_http_header()` doesn't operate anymore on a global variable
which is kind of not best practise as it is easily to avoid here.
2025-07-28 15:37:35 +02:00
Dirk Wetter 56c1e58567 Mask IP addresses, change host, compression
... for t/32_isHTML_valid.t .

Github.com seems to be most reliable from the ones tested so far.

bahn.de has one IP to the outside however Session resumption seems
to come from different hosts behind that IP. Bad choice for this
test.
2025-07-28 15:03:51 +02:00
Dirk WetterandGitHub b375755161 Merge pull request #2862 from testssl/drwetter-patch-1
Test with badge referring to the correct branch
2025-07-25 10:21:35 +02:00
Dirk WetterandGitHub c23cb6435a Update Readme.md 2025-07-25 10:17:42 +02:00
Dirk Wetter faa190354e Pick different host + openssl
* host is bahn.de
* debug message said Your ./bin/openssl.Linux.x86_64 doesn't support X25519 --> use /usr/bin/openssl
* skip debug msg check for Mac
2025-07-23 14:45:34 +02:00
Dirk Wetter b7584ea93a correct comment, update vulnerablites to include IDS friendly ones 2025-07-23 14:43:41 +02:00
Dirk WetterandGitHub 30134b223c Merge pull request #2860 from testssl/fix_2854_ipv6
Fix also IPv6 addresses for --nodns etc....
2025-07-22 22:33:34 +02:00
Dirk Wetter 57689611bf Fix also IPv6 addresses for --nodns etc....
Seems the patch in #2856 wasn't complete. So that it was forgotten to add also manually specified IPv6 addresses to the IP addresses to show and to scan.
This makes sure it does, so this fixes #2854 finally.

Also statements were added to reset do_ipv4_only and do_ipv6_only correctly so that later the output "Testing all IP** addresses" is correct.
2025-07-22 14:38:42 +02:00
Dirk WetterandGitHub d638843cc1 Merge pull request #2858 from testssl/code2network_socksend_x
Slightly improved strings @ pre-socket handling
2025-07-21 17:32:09 +02:00
Dirk WetterandGitHub 6c045e05ab Merge pull request #2855 from testssl/fix_2847+
Doing a better guess for Opossum when tcp/80 is not a/v
2025-07-21 16:24:37 +02:00
Dirk eb75ac23b6 Slightly improved strings @ pre-socket handling
* `code2network()` was improved to just use internal bash functions, except sed
* `socksend()` was renamed to `socksend_x()` to clarify that the string passed contains already a leading x

We might want to try using in `code2network()` only bash internal functions like in `socksend_x()`.
And maybe decide for onee format of hexbytes in the code -- with x or without.
2025-07-21 16:15:13 +02:00
Dirk Wetter 2c871f9ffa Pick another host for unit tests
heise.de seems too often run into to timeouts when doing
this unit test. Thus it is being changed to web.de, hoping
it works better.
2025-07-21 11:49:03 +02:00
Dirk WetterandGitHub ba6891e64a Merge pull request #2856 from testssl/fix_2854
Fix bug when --nodns none --ip <IP> is supplied
2025-07-21 11:39:34 +02:00
Dirk Wetter 727f6c9fa6 Fix bug when --nodns none --ip <IP> is supplied
Due to rebasing determine_ip_addresses() in #2852 it was
forgotten to add any manually specified IP address to
the IP addresses to show and to scan.

This fixes #2854 .
2025-07-21 10:27:23 +02:00
Dirk Wetter cb971b5336 Doing a better guess for Opossum when tcp/80 is not a/v
This labels the result of a failed test for reaching
port 80 when no direct connection is possible as likely not
vulnerable.

This seems safe to say, as there's another check whether
a proxy is configured, like for corporate environments where
a connection is only allowed though the proxy.
2025-07-21 10:08:25 +02:00
Dirk WetterandGitHub a549acd86d Merge pull request #2852 from testssl/full_ipv6
Enable IPv6 automagically
2025-07-20 20:56:34 +02:00
Dirk Wetter 1fff5226af Scan policy explained wrt IPv4/v6 addresses 2025-07-20 18:24:17 +02:00
Dirk WetterandGitHub 274a9ca5d6 Merge pull request #2853 from testssl/quic_httpfix
only exec QUIC when SERVICE= HTTP
2025-07-20 18:06:14 +02:00
Dirk WetterandGitHub e62949d39d Merge pull request #2851 from testssl/fix_2847
Fix port and block problem for Opossum
2025-07-20 18:05:19 +02:00
Dirk Wetter e09d79aad9 Fix error message on UI when testing Opossum
As `wait_kill()` returns with 0 when a TCP reset is encountered
and the process is not killed, we need to open the socket again
in a sub shell. Which is safe in the foreground.

If then the subshell returns with 0 we can safely connect to
port 80.
2025-07-20 15:40:35 +02:00
Dirk Wetter 7a6c652de0 only exec QUIC when SERVICE= HTTP
... and document wait_kill better
2025-07-20 15:28:12 +02:00
Dirk Wetter a05e697fd1 UI improvements IPv6
* IPv6 addresses which won't be scanned will be put in round brackets to feedback th UI
* logic bug fixed which always said "Testing all IPv4 addresses (port $PORT):". Simplyfied the MULTIPLE_CHECKS output
2025-07-20 14:46:48 +02:00
Dirk Wetter d0505e5006 Reflect IPv6 changes 2025-07-20 13:06:23 +02:00
Dirk Wetter bfb84a9320 Add Ipv6 automagic 2025-07-19 16:26:21 +02:00
Dirk Wetter 433ab5118b fix typo 2025-07-19 16:19:42 +02:00
Dirk Wetter 4d1350ebf9 Enable IPv6 automagically
This PR will enable IPv6 fully if available.

It was not enabled before as users were confronted with an error message when
testssl.sh wanted (also) to scan IPv6 before but routing/configuration or
whatsoever issues prevented that. This has been solved by introducing the function
`shouldwedo_ipv6()` which checks whether we can reach the target via IPv6 --
tracked be the global IPv6_OK.

The change is in line with tools like wget or curl in a sense that if IPv6 works
it is just being used. Formally testssl.sh had to be instructed via -6 cmdline
option, like nmap.

* \-6 is now the switch to do IPv6 scans only
* \-4 is now the switch to do IPv4 scans only

The latter is a *breaking change*, as the cmdline option meant before to check
for RC4 ciphers.

Also HAS_IPv6, synonymous to -6 before, does not exist anymore.

As the command line option `--connect-timeout` seemed rather unspecific,
it has been replaced by `--socket-timeout, also all internal variables.

Todo:
* man pages
* dashed lines appear too long
2025-07-19 15:57:52 +02:00
Dirk ea3cc3789f handle UI output better when conn to port 80 failed 2025-07-19 13:40:03 +02:00
Dirk 0d63a56c80 Fix logic error and mind the sub shell (fd) 2025-07-18 20:17:12 +02:00
Dirk WetterandGitHub 35cb521ef2 Merge pull request #2848 from wfaulk/3.3dev
add support for MacOS's dscacheutil
2025-07-18 19:30:03 +02:00
Dirk 9e29b35e9e open socket error message, not stdout 2025-07-18 19:06:42 +02:00
Dirk 9743a96462 fix indentation 2025-07-18 18:30:08 +02:00
Dirk cd7a887878 Fix port problem for Opossum
This fixes #2847 .

It was falsely assumed that the http head command blocks when port 80 is not available but
actucally the exec for the socket is the culprit.

This PR changes that so that the exec is put in the background.

Another change is that $node is still used but the port is stripped of which
lead to the problem raised in #2847. We use $node instead of $NODE has we
can recycle the `http_head[er]_printf()` later.

`http_header_printf()`was renamed to `http_head_printf()` as there's also an `http_head()`
and an `http_get()`
2025-07-18 18:18:30 +02:00
Dirk WetterandGitHub a719c46bcb Merge pull request #2846 from testssl/find_autohomebrewssl
Try harder to find OPENSSL2
2025-07-16 09:52:50 +02:00
Dirk Wetter 88b7af8ad1 Try harder to find OPENSSL2
This commit adds an improvement so that e.g. under MacOS
/opt/homebrew/bin/openssl is automatically taken as
$OPENSSL so that also QUIC works out of the box for MacOS.

Formally for at least MacOS with silicon CPUs OPENSSL was
equal to OPENSSL2 and LibreSSL in /usr/bin/openssl doesn't
have QUIC support (up to version 15.5 of MacoOS at least).
2025-07-15 23:28:44 +02:00
Dirk WetterandGitHub 10af37029c Merge pull request #2844 from testssl/fix_misleading_ipv4_msg
Fix message when IPv6 needs to be tested too
2025-07-15 20:46:48 +02:00
Dirk Wetter f4ab559dbf Fix message when IPv6 needs to be tested too
"Testing all IPv4 addresses"
2025-07-15 17:29:28 +02:00
Dirk WetterandGitHub e2f08a019a Merge pull request #2842 from testssl/opossum
Redo PR for Opossum , see #2838
2025-07-12 22:41:20 +02:00
Dirk Wetter a4953d6e22 Redo PR for Opossum
Fixes #2833

This does a check for the opossum vulnerability, see https://opossum-attack.com/ .

It uses a separate function to send the payload and retrieve the result via `http_header_printf()`.  It doesn't use curl or wget. The latter wouldn't work anyway as according to the manpage as the HTTP header which needs to be sent must not contain LFs.  This function was introduced because `http_get_header()` -- which was renamed to `http_head()` -- could use wget if curl is not available. On the way to this PR `http_head()` was improved, so that timeouts were used for curl and wget for better maturity.

`http_header_printf()` now uses bach sockets , strips the URI so that a plaintext request is made. This will be done in the background because not every host will answer.

Done also:
- handling when PROXY is requested (try anyway directly as the payload is not "proxyable")
- print a message when no HTTP service is present
- try hard to use plaintext HTTP when auth is required for HTTPS and service HTTP would not be defined otherwise
- manpages
- help

Also when pwnedkeys are checked a not pwned certificate is labled not neutral but OK=green.
2025-07-12 20:59:50 +02:00
Dirk WetterandGitHub c467398a37 Merge pull request #2837 from testssl/12_diff_homebrew
For Mac: use homebrew's openssl
2025-07-10 15:41:44 +02:00
Dirk 1f9aa8008d For Mac: use homebrew's openssl
... so that we have a comparison between OpenSSL and LibreSSL. Otherwise this test would be completely futile for MacOS.
Also change the displayed text.

See #2832 (which was for 3.2)
2025-07-10 13:19:46 +02:00
Dirk WetterandGitHub 84bfb306a2 Merge pull request #2835 from testssl/drwetter-patch-1
Update CHANGELOG.md
2025-07-10 09:38:29 +02:00
Dirk WetterandGitHub bdb07d9cbe Update CHANGELOG.md
SSLlabs rating bump
2025-07-10 09:37:57 +02:00
Dirk WetterandGitHub fc3e7eca84 Merge pull request #2830 from magnuslarsen/3.1dev
feat: bump ssllabs rating guide to 2009r
2025-07-09 23:21:33 +02:00
Dirk WetterandGitHub 2fd80e7454 Merge pull request #2828 from digininja/3.3dev
Removed rogue space on QUIC output
2025-07-08 23:21:24 +02:00
Dirk WetterandGitHub cc5ab00548 Merge pull request #2827 from testssl/fix_2825_dev
Fix not working --disable-rating switch (3.3dev)
2025-07-07 14:02:06 +02:00
Dirk Wetter 85805ba8db Fix not working --disable-rating switch (3.3dev)
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 #2825 by querying ${SKIP_TESTS[@]} instead and then calling set_rating_state() when no --disable-rating was supplied .
2025-07-07 12:07:53 +02:00
Dirk WetterandGitHub a4d6f9ad55 Merge pull request #2822 from testssl/quic
First try for QUIC (OpenSSL only and only checking the protocol)
2025-07-05 13:24:25 +02:00
Dirk 89bd3c753d Add QUIC protocol check in help() 2025-07-04 14:55:48 +02:00
Dirk 4c65d678fb except man page n roff format for codespell 2025-07-04 14:50:49 +02:00
Dirk 3e0a1605b9 Update protocol section for QUIC to be included 2025-07-04 14:48:23 +02:00
Dirk 6e2bd0123c Build instruction for n00bs 2025-07-04 14:24:41 +02:00
Dirk 488de491a1 be more precise: only protocol 2025-07-04 14:21:48 +02:00
Dirk Wetter 48c0a89b98 add QUIC 2025-07-03 23:03:13 +02:00
Dirk Wetter d85c65e3b2 output missing proxy support if connect fails 2025-07-03 23:01:59 +02:00
Dirk Wetter 38a44ab89a 3.2 --> 3.3dev 2025-07-03 22:38:27 +02:00
Dirk Wetter d74c1bbaee add QUIC line for testssl.sh server 2025-07-03 22:34:43 +02:00
Dirk WetterandGitHub 6047f21a80 Merge pull request #2823 from testssl/fix_revocation_unittest
Fix 52_ocsp_revoked (OCSP --> CRL)
2025-07-03 18:14:17 +02:00
Dirk Wetter 8a665e9dce Fix 52_ocsp_revoked (OCSP --> CRL) 2025-07-03 16:56:28 +02:00
Dirk c4c89dbd40 Fix 52_ocsp_revoked (OCSP --> CRL) 2025-07-03 16:54:26 +02:00
Dirk Wetter c942283b34 Re-add correct version \# 2025-07-03 15:01:04 +02:00
Dirk 49dcd5b854 First try for QUIC (OpenSSL only)
This is an implementation for QUIC (RFC 9000, RFC 9114). It's purely
OpenSSL based for now. As some distros support newer (>= 3.2) versions
this works on some distros now and will work on more as time goes by.

It has been tested with MacOS and Linux. If there's an OpenSSL version
in /usr/bin/ it will automagically use that version.

A new short sub function named sub_quic() was introduced for handling this as
run_protocols() is already "full".

It appears below TLS 1.3. A check against HTTPS RR #2484 is planned but
not implemented yet. PR #2484 has to be worked on and merged before.

New variables were introduces (HAS_QUIC/ +HAS2_QUIC). Also there's
QUIC_WAIT as we run the connect in the background and we need a wait time.

HAS_UDS2 was renamed to HAS2_UDS as HAS2 should signal this is for OPENSSL2
and UDS2 doesn't make sense.

To clarify:
- check for a proxy and then don't do the check?
- short unit test (t/31_isJSON_valid.t cjecks cloudflare but ...)
2025-07-03 14:36:55 +02:00
Dirk Wetter 6173d80ca2 Merge branch '3.2' into 3.3dev 2025-07-03 09:00:16 +02:00
Dirk WetterandGitHub 4b5409122c Merge pull request #2820 from testssl/performance_hint
Performance hint for openssl
2025-07-02 17:37:21 +02:00
Dirk Wetter 6de18d3a22 was 2x first 2025-07-02 17:36:33 +02:00
Dirk Wetter 6083938a47 Performance hint for openssl 2025-07-02 17:34:29 +02:00
Dirk WetterandGitHub 2829827cc2 Merge pull request #2817 from testssl/errormsg_2807
Improve error message for sockets fail and Alpine
2025-06-29 17:06:01 +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 WetterandGitHub 9b1a7ae1f8 Merge pull request #2814 from testssl/revert-2813-revert_2772_for_testing
Revert "Revert lowercase conversion for repo"
2025-06-24 12:07:08 +02:00
Dirk 78a613dae3 Remove the scheudule part as it will not work anymore 2025-06-24 12:06:00 +02:00
Dirk WetterandGitHub b56302518b Revert "Revert lowercase conversion for repo" 2025-06-23 23:12:59 +02:00
Dirk WetterandGitHub 6dc26b09fe Merge pull request #2813 from testssl/revert_2772_for_testing
Revert lowercase conversion for repo
2025-06-23 21:38:32 +02:00
Dirk d44692331b Revert lowercase conversion for repo
... which was done in #2772 . This is done for testing as building the container doesn't
work anymore, see #2810 .

Action logs say it was build but it's unclear why it is still based on 3.2rc4 .
Hence this test.

The schedule was commented out as it would not apply either here as 3.3dev is
 now the default version.
2025-06-23 21:17:49 +02:00
Dirk WetterandGitHub bed43df2df Merge pull request #2812 from testssl/ghcr_workflow_no_unittest
YAML file doesn't need the unit tests
2025-06-23 21:04:43 +02:00
Dirk Wetter 58719e4492 YAML file doesn't need the unit tests 2025-06-23 21:00:33 +02:00
Dirk WetterandGitHub 4b71d0e2ce Merge pull request #2811 from testssl/docker_action_rename
Change action docker file to 3.3dev
2025-06-23 20:54:24 +02:00
Dirk Wetter d2eaae79cb rename docker ghcr.io action 2025-06-23 20:52:14 +02:00
Dirk Wetter 5e571b4463 no unit test for yml file changes 2025-06-23 20:51:03 +02:00
Dirk Wetter f1621600f4 Change file to 3.3dev 2025-06-23 20:40:54 +02:00
Dirk Wetter da6ec2f695 Merge branch '3.2' into 3.3dev 2025-06-23 20:31:40 +02:00
Dirk WetterandGitHub 5fe854b830 Merge pull request #2809 from testssl/improve_2798
Minor improvements to #2798
2025-06-23 20:29:27 +02:00
Dirk WetterandGitHub 4d75527a4b Merge pull request #2808 from testssl/fix_sectigo_x46.forLinux
Add sectigo CA E46 and R46 for Linux.pem
2025-06-23 20:29:07 +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
Dirk WetterandGitHub 71f0f32cf5 Merge pull request #2798 from secinto/3.2
Modify grading for incomplete chain. 

suggested corrections will be done after merge
2025-06-23 18:41:00 +02:00
Dirk Wetter b4f9e51865 Add lf so that gh action doesn't complain 2025-06-23 18:21:44 +02:00
Dirk Wetter 1403503077 Add Sectigo x46 CAs from recent Debian update 2025-06-23 18:20:14 +02:00
Dirk WetterandGitHub 81471c3a22 Merge pull request #2805 from testssl/readme_3.3dev
Reflect that this is 3.3dev
2025-06-15 09:48:31 +02:00
Dirk Wetter aa7d0f4311 typo 2025-06-15 09:47:23 +02:00
Dirk Wetter 7cc605aeaf Reflect that this is 3.3dev
A branch at Docker.io needs to be created, thus that section is commented out.
2025-06-15 09:42:07 +02:00
Dirk WetterandGitHub a209f92d4f Merge pull request #2804 from testssl/readiness_for_new_stuff
Reflect version 3.0.10 version is EOL
2025-06-15 09:28:24 +02:00
Dirk WetterandGitHub 99a05cb261 Merge pull request #2801 from HarrisonTCodes/fix-readme-deepwiki-link
Fix README DeepWiki Link
2025-06-14 17:14:37 +02:00