Skip to content

Commit 98d1702

Browse files
committed
HTTP/HTTPS & URI for Oposssum
- use http instead of https - use URI of NODE - handle not HTTP services (based on what's written on https://opossum-attack.com/) - make sure it works in case where certificate-based authentication is requested on HTTP thus setting SERVICE to ""
1 parent e5ec7ac commit 98d1702

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

testssl.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17369,7 +17369,7 @@ run_ticketbleed() {
1736917369
pr_bold " Ticketbleed"; out " ($cve), experiment. "
1737017370

1737117371
if [[ "$SERVICE" != HTTP ]] && [[ "$CLIENT_AUTH" != required ]]; then
17372-
outln "(applicable only for HTTPS)"
17372+
outln "(applicable only for HTTP service)"
1737317373
fileout "$jsonID" "INFO" "not applicable, not HTTP" "$cve" "$cwe"
1737417374
return 0
1737517375
fi
@@ -17638,14 +17638,22 @@ run_opossum() {
1763817638
local jsonID="opossum"
1763917639
local cwe="CWE-74"
1764017640
local -i ret=0
17641+
# we need to talk http here!
17642+
local uri=${URI/https/http/}
17643+
local service="$SERVICE"
1764117644

1764217645
[[ -n "$STARTTLS" ]] && return 0
1764317646
[[ $VULN_COUNT -le $VULN_THRESHLD ]] && outln && pr_headlineln " Testing for Opossum vulnerability " && outln
1764417647
pr_bold " Opossum"; out " ($cve) "
1764517648

17646-
case $SERVICE in
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
17652+
fi
17653+
17654+
case $service in
1764717655
HTTP)
17648-
response=$(http_get_header $NODE 'Upgrade: TLS/1.0\r\n\r\nClose\r\n')
17656+
response=$(http_get_header $uri 'Upgrade: TLS/1.0\r\n\r\nClose\r\n')
1764917657
case $? in
1765017658
0) ret=0 ;;
1765117659
*) ret=7 ;;
@@ -17658,10 +17666,15 @@ run_opossum() {
1765817666
fileout "$jsonID" "OK" "not vulnerable $append" "$cve" "$cwe"
1765917667
fi
1766017668
;;
17661-
*) [[ $DEBUG -ge 1 ]] && echo "not implemented yet"
17662-
;;
17669+
IMAP|FTP|POP3|SMTP|LMTP|NNTP)
17670+
outln "(implemented currently for HTTP only)"
17671+
fileout "$jsonID" "INFO" "not yet implemented" "$cve" "$cwe"
17672+
;;
17673+
*) outln "(applicable only for HTTP service)"
17674+
fileout "$jsonID" "INFO" "not applicable, not HTTP" "$cve" "$cwe"
17675+
;;
1766317676
esac
17664-
return 0
17677+
return $ret
1766517678
}
1766617679

1766717680

0 commit comments

Comments
 (0)