ALPACA

lore

cryptographysecurity

A 2021 cross-protocol attack that confuses TLS services sharing a certificate.

Application Layer Protocol Confusion Analyzing Cross-protocol Attacks redirected a TLS connection meant for one service to another that shared the certificate, exploiting mismatched application-layer expectations. Strict SNI and ALPN checking mitigate it.

ALPACA is a cross-protocol attack on TLS. A certificate valid for a hostname can be presented by any service on that host, so an attacker who can redirect a connection may deliver a browser's HTTPS request to a different TLS service entirely, such as an FTP or mail server sharing the same certificate.

The confusion that results is the exploit. The second service does not speak HTTP, but it may echo parts of the request in an error message, and a browser interpreting that response as HTML can be made to execute content in the origin's context. The TLS layer is not broken at any point: both endpoints authenticate correctly, and the mismatch is entirely about which application protocol was expected.

The defence is application layer protocol negotiation, enforced strictly, so that a server refuses a connection whose negotiated protocol it does not implement. The broader lesson is about certificate scope: a wildcard certificate shared across many services means those services can be substituted for one another, and the convenience of one certificate everywhere is exactly the property being exploited.

Also known as: ALPACA, Application Layer Protocol Confusion Analyzing Cross-protocol Attacks

Sources

  • ALPACA attack (2021)

All glossary entries