A Microsoft researcher has discovered what some believe could be an intentional backdoor in the popular Socan networking utility.
The vulnerability, whose existence was brought to light earlier this week, affects Socat 220.127.116.11 and 2.0.0-b8. The issue has been addressed with the release of versions 18.104.22.168 and 2.0.0-b9.
Socat can be used to transfer data through an encrypted channel to protect it from traffic interception attempts. According to Socat developer Gerhard Rieger, if the Diffie-Hellman (DH) key exchange is used for the secure channel, an attacker could eavesdrop on communications because the 1024-bit DH p parameter is not prime (i.e. a number that can only be divided by 1 and itself).
“The effective cryptographic strength of a key exchange using these parameters was weaker than the one one could get by using a prime p. Moreover, since there is no indication of how these parameters were chosen, the existence of a trapdoor that makes possible for an eavesdropper to recover the shared secret from a key exchange that uses them cannot be ruled out,” Rieger explained.
Experts have analyzed the vulnerability and determined that the non-prime parameter was introduced by a researcher named Zhigang Wang in January 2015 with a patch designed to address an issue where Socat did not work in FIPS mode because a 1024-bit DH prime was required instead of a 512-bit prime.
Some experts believe this could be an intentional backdoor considering that it shouldn’t have been difficult to verify if the parameter was a prime.
A new parameter that is 2048 bits long has been generated for the new versions released by Socat developers. As a workaround, users can disable DH ciphers.
The decision to use a 2048-bit prime is probably wise considering that the authors of the attack method dubbed “Logjam” estimated that it would cost roughly $100 million to crack a 1024-bit prime, which is well within the financial resources of an intelligence agency.