Skip to content

Commit fee04f2

Browse files
authored
Merge pull request #2579 from drwetter/merge_2568
Merge 2568
2 parents ddb84c2 + fa5664f commit fee04f2

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

testssl.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22933,15 +22933,18 @@ run_rating() {
2293322933
pr_headlineln " Rating (experimental) "
2293422934
outln
2293522935

22936-
[[ -n "$STARTTLS_PROTOCOL" ]] && set_grade_cap "T" "STARTTLS encryption is not mandatory for clients. STARTTLS can only be secured client-side"
22936+
[[ -n "$STARTTLS_PROTOCOL" ]] && set_grade_cap "T" "STARTTLS is prone to MITM downgrade attacks. A secure TLS upgrade can only be ensured client-side. You should use TLS only (=implicit TLS) rather than STARTTLS as per RFC 8314, for other than SMTP and SIEVE"
2293722937

22938-
# TL;DR: E-mail transfer via port 25 is broken and the amendments suggested so far are duct tape. So please do not expect testssl.sh to shut up.
22938+
# TL;DR: STARTTLS connections are inherently insecure. A MITM can always intercept the connection, unless the client checks e.g. the
22939+
# certificate accordingly. A secure STARTTLS client is the key but we can't test for it. For other than SMTP and SIEVE (there's no implicit TLS port)
22940+
# you should use implicit TLS as per RFC 8314. Especially e-mail transfer via port 25 is broken and amendments so far are duct tape.
2293922941

22940-
# Explanation: For other than SMTP you should use TLS as per RFC 8314 . For SMTP however there's this thing named reality: A mail server cannot
22941-
# just switch to the mail submission port 587 only and continue to receive mail from everyone. Even if you advertise this via SRV record (RFC 6186).
22942-
# For STARTTLS there's no way to tell for testssl.sh whether it is secure. A MitM can always intercept the connection, unless the client checks
22943-
# the certificate accordingly (it's getting better but some just don't). TLSA Records/DANE and MTA-STS (RFC-8461) on the server side can help too.
22944-
# But as said, it's useless unless the client MTA checks all that which no tool can check.
22942+
# Explanation: There are active MitM attacks possible when using STARTTLS like https://github.com/tintinweb/striptls or
22943+
# https://github.com/libcrack/starttlsstrip. It depends on the client only whether it can detect such downgrade attack.
22944+
# As some SMTP servers are still misconfigured with wrong certificates it's is still common practice for SMTP client MTAs to
22945+
# accept those wrong certificates -- delivering e-mails is more important. There is an e-mail submission port 587 but a mail server
22946+
# cannot just switch to it and continue to receive mail from everyone. Even if you advertise this via SRV record (RFC 6186).
22947+
# TLSA Records/DANE and MTA-STS (RFC-8461) on the server side can help too,
2294522948

2294622949
pr_bold " Rating specs"; out " (not complete) "; outln "SSL Labs's 'SSL Server Rating Guide' (version 2009q from 2020-01-30)"
2294722950
pr_bold " Specification documentation "; pr_url "https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide"
@@ -23127,9 +23130,11 @@ run_rating() {
2312723130
# Pretty print - again, it's just nicer to read
2312823131
for reason in "${sorted_reasons[@]}"; do
2312923132
if [[ $reason_nr -eq 0 ]]; then
23130-
pr_bold " Grade cap reasons "; outln "$reason"
23133+
pr_bold " Grade cap reasons "
23134+
outln "$(out_row_aligned_max_width "$reason" " " $TERM_WIDTH)"
2313123135
else
23132-
outln " $reason"
23136+
outln "$(out_row_aligned_max_width " $reason" " " $TERM_WIDTH)"
23137+
2313323138
fi
2313423139
((reason_nr++))
2313523140
fileout "grade_cap_reason_${reason_nr}" "INFO" "$reason"

0 commit comments

Comments
 (0)