Skip to content

Commit 83295d6

Browse files
committed
regex fix+ try http harder
- fix bash regex which resulted in cases with https:// in URI in a mangeld curl call - try also plain text curl test when client auth is requested via HTTPS and SERVICE is empty
1 parent 98d1702 commit 83295d6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

testssl.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17345,6 +17345,7 @@ run_ccs_injection(){
1734517345

1734617346

1734717347
# see https://blog.filippo.io/finding-ticketbleed/ | https://filippo.io/ticketbleed/
17348+
#
1734817349
run_ticketbleed() {
1734917350
local tls_hexcode tls_proto=""
1735017351
local sessticket_tls="" session_tckt_tls=""
@@ -17639,16 +17640,17 @@ run_opossum() {
1763917640
local cwe="CWE-74"
1764017641
local -i ret=0
1764117642
# we need to talk http here!
17642-
local uri=${URI/https/http/}
17643+
local uri=${URI/https/http}
1764317644
local service="$SERVICE"
1764417645

1764517646
[[ -n "$STARTTLS" ]] && return 0
1764617647
[[ $VULN_COUNT -le $VULN_THRESHLD ]] && outln && pr_headlineln " Testing for Opossum vulnerability " && outln
1764717648
pr_bold " Opossum"; out " ($cve) "
1764817649

17649-
# we're trying to connect also if ASSUME_HTTP is not set. Requirement is though HTTP/HTTPS in target
17650-
if [[ -z $service ]] && [[ $uri =~ ^http ]]; then
17651-
service=HTTP
17650+
# we're trying to connect also if ASSUME_HTTP is not set, there should be either one of following hints though
17651+
if [[ -z $service ]]; then
17652+
[[ $uri =~ ^http ]] && service=HTTP # https provided as target/URL
17653+
[[ "$CLIENT_AUTH" == required ]] && service=HTTP # also try when client auth is requested (we dont use it over cleartext)
1765217654
fi
1765317655

1765417656
case $service in

0 commit comments

Comments
 (0)