1. Home
  2. Network Vulnerabilities
  3. How to remediate – Anonymous Key Exchanges Supported (PCI DSS)

How to remediate – Anonymous Key Exchanges Supported (PCI DSS)

1. Introduction

Anonymous Key Exchanges Supported refers to a vulnerability where a service allows unauthenticated SSL/TLS key exchanges. This means an attacker could intercept and modify encrypted traffic without being detected, compromising confidentiality and integrity of data in transit. Systems using SSL/TLS for communication, such as web servers, email servers, and VPN gateways are typically affected. Impact on confidentiality is high, with potential for complete data compromise; impact on integrity is medium, allowing modification of data; availability may be impacted if the service becomes unstable due to mitigation efforts.

2. Technical Explanation

The vulnerability occurs when a server is configured to accept SSL/TLS cipher suites that use anonymous Diffie-Hellman (DH) or anonymous Elliptic Curve Diffie-Hellman (ECDH). These ciphers do not require the client to present a certificate for authentication, leaving the connection open to man-in-the-middle attacks. An attacker can exploit this by intercepting traffic between the client and server and decrypting/modifying it without proper authorization.

  • Root cause: The SSL/TLS service is configured with cipher suites that allow anonymous key exchanges.
  • Exploit mechanism: An attacker uses a man-in-the-middle proxy (e.g., mitmproxy) to intercept the connection and negotiate an anonymous cipher suite, allowing them to decrypt and modify traffic.
  • Scope: Affected platforms include servers running OpenSSL, GnuTLS, or other SSL/TLS libraries with vulnerable configurations. Specific versions depend on library implementations and default settings.

3. Detection and Assessment

Confirming the vulnerability involves checking the server’s SSL/TLS configuration for anonymous cipher suites. A quick check can be done using `openssl s_client`. A thorough method is to use an online SSL test tool or a dedicated scanner.

  • Quick checks: Use `openssl s_client -connect :` and look for “Anonymous” in the cipher suite list.
  • Scanning: Qualys SSL Labs’ SSL Server Test (https://www.ssllabs.com/ssltest/) can identify vulnerable ciphers. Nessus plugin ID 10384 also detects this issue.
  • Logs and evidence: Check SSL/TLS logs for cipher suite negotiation details, looking for anonymous DH or ECDH suites being used. Log locations vary depending on the server software (e.g., Apache access logs, Nginx error logs).
openssl s_client -connect example.com:443

4. Solution / Remediation Steps

The solution involves reconfiguring the SSL/TLS service to disable support for anonymous key exchanges by removing vulnerable cipher suites from its configuration.

4.1 Preparation

  • Ensure you have access to modify the server’s configuration files and restart the service. A roll back plan is to restore the original configuration file.
  • A change window may be required depending on the criticality of the service, with approval from the system owner.

4.2 Implementation

  1. Step 1: Edit the SSL/TLS configuration file (e.g., Apache’s httpd.conf or Nginx’s nginx.conf).
  2. Step 2: Remove any lines containing “ADH” or “aDH” from the cipher suite list.
  3. Step 3: Restart the web server or affected service to apply the changes.

4.3 Config or Code Example

Before

SSLCipherSuite ALL -ADH +HIGH

After

SSLCipherSuite HIGH

4.4 Security Practices Relevant to This Vulnerability

Several security practices can help prevent this issue. Least privilege reduces the impact if exploited, while secure defaults ensure safer configurations out-of-the-box. A regular patch cadence keeps systems up-to-date with the latest security fixes.

  • Practice 1: Implement least privilege to limit the potential damage from a compromised service.
  • Practice 2: Use secure defaults when configuring SSL/TLS services, avoiding weak or vulnerable cipher suites.

4.5 Automation (Optional)

Ansible can be used to automate configuration changes across multiple servers.

---
- hosts: webservers
  tasks:
    - lineinfile:
        path: /etc/httpd/conf/httpd.conf
        regexp: 'SSLCipherSuite ALL -ADH +HIGH'
        line: 'SSLCipherSuite HIGH'
      notify: restart apache
  handlers:
    - name: restart apache
      service:
        name: httpd
        state: restarted

5. Verification / Validation

Confirm the fix by checking the SSL/TLS configuration again using `openssl s_client`. Ensure that anonymous cipher suites are no longer supported. Perform a service smoke test to verify functionality.

  • Post-fix check: Run `openssl s_client -connect :` and confirm “Anonymous” is not present in the cipher suite list.
  • Re-test: Re-run the Qualys SSL Labs’ SSL Server Test to verify that vulnerable ciphers are no longer reported.
  • Smoke test: Verify that users can still access HTTPS websites or services using a standard web browser.
  • Monitoring: Monitor SSL/TLS logs for any errors related to cipher suite negotiation, which could indicate an issue with the configuration.
openssl s_client -connect example.com:443 | grep "Cipher Suite"

6. Preventive Measures and Monitoring

  • Baselines: Update your security baseline (e.g., CIS Benchmark) to require disabling anonymous cipher suites.
  • Pipelines: Add SAST/SCA checks in CI pipelines to detect insecure SSL/TLS configurations during development.

7. Risks, Side Effects, and Roll Back

Removing anonymous cipher suites may cause compatibility issues with older clients that do not support modern TLS versions. If this occurs, consider adding a limited set of compatible ciphers while prioritizing security. To roll back, restore the original SSL/TLS configuration file and restart the service.

  • Risk or side effect 2: Service interruption if the configuration is incorrect; mitigate by having a roll back plan in place.
  • Roll back: Restore the original SSL/TLS configuration file and restart the service.

8. References and Resources

Related Articles