SSL/TLS: Diffie-Hellman Key Exchange Insufficient DH Group Strength Vulnerability

Hello everyone.

I’m encountering an issue regarding the weak strength of the certificate key. The OVasp vulnerability scanner indicates that the Diffie-Hellman (DF) groups are weak on the service at port 423, which is where I run Tor relay. This service is running on an Ubuntu 22.04.4 LTS VPS server. Tor version 0.4.8.10.

Here are more details:

PORT    STATE SERVICE
423/tcp open  snpp
| ssl-enum-ciphers: 
|   TLSv1.2: 
|     ciphers: 
|       TLS_DHE_RSA_WITH_AES_128_CBC_SHA (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_128_CCM (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_256_CBC_SHA (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_256_CCM (dh 1024) - A
|       TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (dh 1024) - A
|       TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (dh 1024) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (secp256r1) - A
|     compressors: 
| 
|     cipher preference error: Error when comparing TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 and TLS_DHE_RSA_WITH_AES_128_CCM
|     warnings: 
|       Key exchange (dh 1024) of lower strength than certificate key
|_  least strength: A

Nmap done: 1 IP address (1 host up) scanned in 9.82 seconds

I’ve been attempting to determine whether it’s possible to change the DH group inside the Tor, but I haven’t been able to find it anywhere. Additionally, I haven’t found other people reporting this issue, so I’m unsure if it’s directly related to Tor or if it’s a problem elsewhere in my system configuration.

I’ve read the mitigation details on Logjam: PFS Deployment Guide , but none of the services they describe in the text are related to Tor.

How can I increase this key size to mitigate the issue?

Thank you for any pointers or ideas on how to resolve this.

2 Likes

Here is more details are reported by OpenVas:

Summary

The SSL/TLS service uses Diffie-Hellman groups with insufficient strength (key size < 2048).

Detection Result

Server Temporary Key Size: 1024 bits

Insight

The Diffie-Hellman group are some big numbers that are used as base for the DH computations. They can be, and often are, fixed. The security of the final secret depends on the size of these parameters. It was found that 512 and 768 bits to be weak, 1024 bits to be breakable by really powerful attackers like governments.

Detection Method

Checks the DHE temporary public key size.

Impact

An attacker might be able to decrypt the SSL/TLS communication offline.

Solution

Solution Type:

Workaround

Deploy (Ephemeral) Elliptic-Curve Diffie-Hellman (ECDHE) or use a 2048-bit or stronger Diffie-Hellman group (see the references). For Apache Web Servers: Beginning with version 2.4.7, mod_ssl will use DH parameters which include primes with lengths of more than 1024 bits.

References

Other https://weakdh.org/https://weakdh.org/sysadmin.html

1 Like

Any updates?