From a4953d6e22ad2d3420d40540ba6084aac0c46621 Mon Sep 17 00:00:00 2001 From: Dirk Wetter Date: Sat, 12 Jul 2025 20:59:50 +0200 Subject: [PATCH] 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. --- CHANGELOG.md | 1 + doc/testssl.1 | 5 + doc/testssl.1.html | 3 + doc/testssl.1.md | 8 +- t/32_isHTML_valid.t | 4 +- t/baseline_data/default_testssl.csvfile | 1 + testssl.sh | 185 +++++++++++++++++++----- 7 files changed, 166 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f5447b..02f5301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * QUIC protocol check * bump SSLlabs rating guide to 2009r +* Check for Opossum vulnerability ### Features implemented / improvements in 3.2 diff --git a/doc/testssl.1 b/doc/testssl.1 index d0fbdd9..3d23674 100644 --- a/doc/testssl.1 +++ b/doc/testssl.1 @@ -659,6 +659,9 @@ variable \f[CR]CCS_MAX_WAITSOCK\f[R]. \f[CR]\-T, \-\-ticketbleed\f[R] Checks for Ticketbleed memory leakage in BigIP loadbalancers. .PP +\f[CR]\-\-OP, \-\-opossum\f[R] Checks for HTTP to HTTPS upgrade +vulnerability named Opossum. +.PP \f[CR]\-\-BB, \-\-robot\f[R] Checks for vulnerability to ROBOT / (\f[I]Return Of Bleichenbacher\[cq]s Oracle Threat\f[R]) attack. .PP @@ -1312,6 +1315,8 @@ RFC 2246: The TLS Protocol Version 1.0 .IP \[bu] 2 RFC 2595: Using TLS with IMAP, POP3 and ACAP .IP \[bu] 2 +RFC 2817: Upgrading to TLS Within HTTP/1.1 +.IP \[bu] 2 RFC 2818: HTTP Over TLS .IP \[bu] 2 RFC 2830: Lightweight Directory Access Protocol (v3): Extension for diff --git a/doc/testssl.1.html b/doc/testssl.1.html index 42e17c2..589a305 100644 --- a/doc/testssl.1.html +++ b/doc/testssl.1.html @@ -590,6 +590,8 @@ CCS_MAX_WAITSOCK.

-T, --ticketbleed Checks for Ticketbleed memory leakage in BigIP loadbalancers.

+

--OP, --opossum Checks for HTTP to HTTPS upgrade + vulnerability named Opossum.

--BB, --robot Checks for vulnerability to ROBOT / (Return Of Bleichenbacher’s Oracle Threat) attack.

@@ -1131,6 +1133,7 @@