Skip to content

Commit 0abca6f

Browse files
committed
Mute socat killing & improve STARTTLS grading explanation
Fixes #2582 .
1 parent ba51ca7 commit 0abca6f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

testssl.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19322,7 +19322,7 @@ run_starttls_injection() {
1932219322
esac
1932319323

1932419324
uds="$TEMPDIR/uds"
19325-
$SOCAT FD:5 UNIX-LISTEN:$uds &
19325+
$SOCAT FD:5 UNIX-LISTEN:$uds 2>/dev/null &
1932619326
socat_pid=$!
1932719327

1932819328
if "$HAS_UDS"; then
@@ -22934,18 +22934,21 @@ run_rating() {
2293422934
pr_headlineln " Rating (experimental) "
2293522935
outln
2293622936

22937-
[[ -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"
22937+
[[ -n "$STARTTLS_PROTOCOL" ]] && set_grade_cap "T" "STARTTLS is prone to MITM downgrade attacks. A secure TLS upgrade can only be ensured client-side. As per RFC 8314 you should use implicit TLS rather than STARTTLS. For SMTP (port 25) and SIEVE this is not possible."
2293822938

2293922939
# TL;DR: STARTTLS connections are inherently insecure. A MITM can always intercept the connection, unless the client checks e.g. the
22940-
# 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)
22941-
# 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.
22940+
# certificate accordingly. A secure STARTTLS client is the key but we can't test for it. Especially e-mail transfer via port 25 is broken
22941+
# as message delivery is still more important than security. Amendments like DANE and MTA-STS are duct tape and depend on the client.
2294222942

2294322943
# Explanation: There are active MitM attacks possible when using STARTTLS like https://github.com/tintinweb/striptls or
2294422944
# https://github.com/libcrack/starttlsstrip. It depends on the client only whether it can detect such downgrade attack.
2294522945
# As some SMTP servers are still misconfigured with wrong certificates it's is still common practice for SMTP client MTAs to
2294622946
# accept those wrong certificates -- delivering e-mails is more important. There is an e-mail submission port 587 but a mail server
2294722947
# cannot just switch to it and continue to receive mail from everyone. Even if you advertise this via SRV record (RFC 6186).
2294822948
# TLSA Records/DANE and MTA-STS (RFC-8461) on the server side can help too,
22949+
#
22950+
# For other than SMTP on port 25 and port 587 and SIEVE (there's no implicit TLS port) you should use implicit TLS as per RFC 8314.
22951+
# Instead of port 587 (STARTTLS) implicit TLS on port 465 should be considered.
2294922952

2295022953
pr_bold " Rating specs"; out " (not complete) "; outln "SSL Labs's 'SSL Server Rating Guide' (version 2009q from 2020-01-30)"
2295122954
pr_bold " Specification documentation "; pr_url "https://github.com/ssllabs/research/wiki/SSL-Server-Rating-Guide"

0 commit comments

Comments
 (0)