Another crypto blunder-bug! Embedded web server GoAhead from EmbedThis chops 204...
Paul Ducklin @pducklin@infosec.exchange
Another crypto blunder-bug! Embedded web server GoAhead from EmbedThis chops 2048-bit DHM keys to just 8 bits!
Classic Diffie Hellman Merkle (DHM) key agreement involves each end exchanging cryptographic public keys; each side then combines the other end’s public key with their own private key, and - hey, presto, through the magic of modular exponentiation - they arrive at the same shared secret… but any eavesdropper who sniffs out their traffic only gets the two public keys, which are public anyway and no use on their own.
Classic DHM isn’t that popular any more because the keys have to be quite large (2048 bits or more) to ensure they can’t be cracked by a well-heeled adversary - elliptic curves provide the mathematics to do something computationally similar with public keys of just 256 bits (or 256x2 = 512 bits for some versions, compressible to 257 bits). But many web servers still accept old-school DHM if the client says they would prefer to use it anyway.
And it seems that due to this bug, a client can talk a vulnerable embedded web server into using a 2048-bit key that gets truncated due to a programming typo into an 8-bit key, which results in just five different “shared secrets” emerging from the algorithm instead of gazillions of possibilities. So an attacker can quickly get in by simple brute force, because there’s no real brutishness (or force) needed. It’s like guessing a one-digit lock code, only easier.
A patch is available (there are two other bugs involved as well), but the burning question is… do you know which of your embedded devices (think IoT stuff such as webcams, or industrial stuff such as, ahem, French supermarket freezers) use the GoAhead server code? And do you know what and where all your embedded devices are? And will your vendor be providing an update?
If in doubt, because you bought a commercial device that you can’t patch yourself, ask your vendor…