Commit Graph

5138 Commits

Author SHA1 Message Date
64323764f0 Merge branch '3.3dev' into https_rr-3.3dev 2025-07-30 22:35:01 +02:00
c0b5735bba Merge branch '3.3dev' into https_rr-3.3dev 2025-07-30 22:33:29 +02:00
de222f1241 Merge pull request #2870 from testssl/fraction_sleep
wait_kill() is now 0.1 seconds
2025-07-30 22:29:04 +02:00
59a7bf8aaa Merge branch 'https_rr-3.3dev' of github.com:testssl/testssl.sh into https_rr-3.3dev 2025-07-30 19:09:58 +02:00
b64c3eabdc Rename variables 2025-07-30 19:09:23 +02:00
881ce7723e wait_kill() is now 0.1 seconds
... which leads to a performance gain., most noteably on Macs.

All times when calling were re-adjusted.

Also:
* PROXY_WAIT was decrease to 10 seconds. 20 seemed just too much
* passed var to `starttls_just_read()` was simplyfied
2025-07-30 18:34:37 +02:00
8f036729ba Merge pull request #2868 from testssl/fix_MAX_SOCKET_FAIL
Fix additional parameter in shouldwedo_ipv6()
2025-07-30 15:14:53 +02:00
04ffe42f17 Remove QUIC as there are different outputs for Mac+Ubuntu 2025-07-30 15:13:44 +02:00
3ccce3cae9 Merge remote-tracking branch 'origin/fix_MAX_SOCKET_FAIL' into https_rr-3.3dev 2025-07-30 14:00:07 +02:00
e9f20729cb Ensure raw parser works for GH CI 2025-07-30 13:58:30 +02:00
bd2312ec0d Merge pull request #2869 from testssl/drwetter-patch-1
Try badge for correct branch
2025-07-30 12:58:14 +02:00
ca8fdcca0e Try badge for correct branch 2025-07-30 12:57:19 +02:00
279bc4ad91 Fix additional parameter in shouldwedo_ipv6()
.... for connectivity_problem() which may block testssl.sh
2025-07-30 12:53:13 +02:00
f14e24533b Merge pull request #2867 from testssl/check_ipv6_in_background
Exec IPv6 check in background
2025-07-29 22:54:01 +02:00
250f30819c Formatting, early exit when HTTPS RR retruned in clear text 2025-07-29 16:07:31 +02:00
d0d49e2869 Fix CI run 2025-07-29 16:07:06 +02:00
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
66218105d8 Add DNS HTTPS RR (RFC 9460) 2025-07-29 14:14:21 +02:00
dd2409527c Start working on DNS HTTPS RR (RFC 9460) for 3.3dev
This is a fresh start for #2484 as the PR wasn't ready yet for 3.2
by the time it was released.

The info for the HTTPS RR shows up in the very beginning, i.e. in the
service_detection(). All keys are listed now in bold, values in
a regular font.

`get_https_rrecord()` was introduced by copying and modifying `get_caa_rr_record()`.

There's a similar obstacle as with CAA RRs: older binaries show the
resource records binary encoded. Thus a new set of global vars is introduced
HAS_*_HTTPS which check whether the binaries support decoding the RR
directly.

For CAA there was a minor bug fixed when records were queried also when it was
instructed to minimize/skip or use proxy only.

Todo:
- Add logic in QUIC
  - if RR is detected and not QUIC is possible
  - add time for QUIC detection when RR is retrieved
- show full HTTPS RR record, at least when having a new DNS client
- shorten the comments in `get_https_rrecord()`
- Man page
- when ASSUME_HTTP is set and no services was detected: this needs to be handled
2025-07-29 13:37:18 +02:00
4252ec7371 Changes for HTTPS RR patch 2025-07-29 13:36:54 +02:00
8c1ade5e38 Merge pull request #2865 from testssl/drwetter-patch-3
Modify OS bullet point + badge param
2025-07-29 12:43:25 +02:00
f64cef8871 typo 2025-07-29 12:43:00 +02:00
8ff61c4898 Modify OS bullet point + badge param 2025-07-29 12:40:29 +02:00
9e09d2cd58 Merge pull request #2863 from testssl/reliability_quic
More reliability for QUIC test
2025-07-28 19:03:04 +02:00
31804ac424 Merge pull request #2857 from testssl/reliable_ut_host
Pick another host for unit tests
2025-07-28 16:37:16 +02:00
0225bc3604 typo fix 2025-07-28 15:44:58 +02:00
9166fc7174 Fix typo in comment 2025-07-28 15:43:01 +02:00
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
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
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
c23cb6435a Update Readme.md 2025-07-25 10:17:42 +02:00
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
b7584ea93a correct comment, update vulnerablites to include IDS friendly ones 2025-07-23 14:43:41 +02:00
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
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
d638843cc1 Merge pull request #2858 from testssl/code2network_socksend_x
Slightly improved strings @ pre-socket handling
2025-07-21 17:32:09 +02:00
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
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
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
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
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
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
a549acd86d Merge pull request #2852 from testssl/full_ipv6
Enable IPv6 automagically
2025-07-20 20:56:34 +02:00
1fff5226af Scan policy explained wrt IPv4/v6 addresses 2025-07-20 18:24:17 +02:00
274a9ca5d6 Merge pull request #2853 from testssl/quic_httpfix
only exec QUIC when SERVICE= HTTP
2025-07-20 18:06:14 +02:00
e62949d39d Merge pull request #2851 from testssl/fix_2847
Fix port and block problem for Opossum
2025-07-20 18:05:19 +02:00
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
7a6c652de0 only exec QUIC when SERVICE= HTTP
... and document wait_kill better
2025-07-20 15:28:12 +02:00
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
d0505e5006 Reflect IPv6 changes 2025-07-20 13:06:23 +02:00