NSA explains how to avoid dangers of Wildcard TLS Certificates and ALPACA attacks

The NSA issued a technical advisory to warn organizations against the use of wildcard TLS certificates and the new ALPACA TLS attack.

The National Security Agency (NSA) is warning organizations against the use of wildcard TLS certificates and the new ALPACA TLS attack.

A wildcard certificate is a public key certificate that can be used to secure all first-level subdomains of single domain name.

“On the surface, wildcard certificates appear to be a great way to quickly and easily deploy HTTPS quickly and easily across subdomains. You buy one certificate and you’re good to go for unlimited subdomains. Indeed, wildcard certificates are cheaper and easier to extend. But they are not necessarily easier to manage.” states the post published by Venafi.

A wildcard certificate allows administrators to use a single wildcard certificate to protect each of subdomains, anyway, researchers warn that the use of wildcard TLS certificates could be exploited by attackers to decrypt TLS-encrypted traffic.

“The well-known risks from using wildcard certificates are based on the compromise of any single server that uses the certificate or a downgrade exploit of a connection to any single server, putting all other servers that can be represented by that certificate at risk. A malicious cyber actor who gains control of the private key associated with a wildcard certificate will provide them the ability to impersonate any of the sites represented, and gain access to valid user credentials and protected information.” reads the Cybersecurity Information Sheet released by NSA. “In addition to the well-known risks, cybersecurity researchers have recently shown that using wildcard or other certificates that represent both HTTPS and non-HTTPS servers can lead to exploitable web vulnerabilities that don’t depend on TLS weaknesses or private key compromises”

NSA released the guidance to help secure the Department of Defense (DoD), National Security Systems (NSS) and Defense Industrial Base (DIB).

The agency urges administrators to assess the use a wildcard certificate inside their organizations, it also outlines the risks of falling victim to a web application exploitation method called Application Layer Protocols Allowing Cross-Protocol Attacks (ALPACA), which can allow attackers to access sensitive information.

Under certain conditions, the ALPACA technique allows attackers to exploit fault tolerance features of web browsers and servers combined with protocol confusion between HTTP and other text-based protocols protected by TLS to perform malicious actions and view sensitive data.

Threat actors could use the technique to steal session cookies and other private user data or execute arbitrary JavaScript in the context of the vulnerable web server.

The Cybersecurity Information Sheet provides other mitigations for poorly implemented certificates and ALPACA, including:

  • Understanding the scope of each wildcard certificate used in your organization
  • Using an application gateway or web application firewall in front of servers, including non-HTTP servers
  • Using encrypted DNS and validating DNS security extensions to prevent DNS redirection
  • Enabling Application-Layer Protocol Negotiation (APLN), a TLS extension that allows the server/application to specify permitted protocols where possible
  • Maintaining web browsers at the latest version with current updates

Follow me on Twitter: @securityaffairs and Facebook

Pierluigi Paganini AuthorPierluigi Paganini
International Editor-in-Chief
Cyber Defense Magazine

Global InfoSec Awards 2021

We are in our 9th year, and these awards are incredibly well received – helping build buzz, customer awareness, sales and marketing growth opportunities, investment opportunities and so much more.

APPLY NOW