testssl.sh icon indicating copy to clipboard operation
testssl.sh copied to clipboard

ALPACA

Open noraj opened this issue 4 years ago • 3 comments

Which version are you referring to 3.1dev

Describe your feauture request (if it's a technical feature)

ALPACA

Application Layer Protocol Confusion -Analyzing and Mitigating Cracks in TLS Authentication

Abstract

TLS is widely used to add confidentiality, authenticity andintegrity to application layer protocols such as HTTP, SMTP,IMAP, POP3, and FTP. However, TLS does not bind a TCPconnection to the intended application layer protocol. Thisallows a man-in-the-middle attacker to redirect TLS trafficto a different TLS service endpoint on another IP addressand/or port. For example, if subdomains share a wildcardcertificate, an attacker can redirect traffic from one subdomainto another, resulting in a valid TLS session. This breaksthe authentication of TLS andcross-protocol attacksmay bepossible where the behavior of one service may compromisethe security of the other at the application layer.In this paper, we investigate cross-protocol attacks on TLSin general and conduct a systematic case study on web servers,redirecting HTTPS requests from a victim’s web browser toSMTP, IMAP, POP3, and FTP servers. We show that inrealistic scenarios, the attacker can extract session cookiesand other private user data or execute arbitrary JavaScript inthe context of the vulnerable web server, therefore bypassingTLS and web application security.We evaluate the real-world attack surface of web browsersand widely-deployed email and FTP servers in lab experi-ments and with internet-wide scans. We find that 1.4M webservers are generally vulnerable to cross-protocol attacks, i.e.,TLS application data confusion is possible. Of these, 114kweb servers can be attacked using an exploitable applicationserver. Finally, we discuss the effectiveness of TLS exten-sions such as Application Layer Protocol Negotiation (ALPN)and Server Name Indiciation (SNI) in mitigating these andother cross-protocol attacks.

Describe the solution you'd like

Implement an ALPACA vulnerability check

noraj avatar Jun 14 '21 07:06 noraj

Could you please explain what you mean by "Implement an ALPACA vulnerability check"? What specific check(s) are you proposing that testssl.sh should implement?

dcooper16 avatar Jun 14 '21 16:06 dcooper16

Searching if the same certificate is re-used for different services on the same host eg HTTPS and SMTPS.

noraj avatar Jun 14 '21 18:06 noraj

The trick is to get aware of the other service. testssl.sh is not a portscanner. ALPN might be labeled as a mitigation supposed the server side cares.

drwetter avatar Jun 14 '21 18:06 drwetter