A setup mistake has apparently left hundreds of thousands of home routers running the SSH (Secure Shell) remote access tool with identical private and public keys.
John Matherly used Shodan, a specialized search engine for querying Internet-connected devices, and found more than 250,000 devices that appear to be deployed by Telefónica de España sharing the same public SSH key.
Matherly, who founded Shodan, performed the search after someone posted a shorter version of a public key -- called a fingerprint -- for their device.
He was surprised to find more than 250,000 other devices, mostly in Spain, that shared the same public key fingerprint. It means the devices -- which are likely home routers -- also have the same private key, which could pose a security risk.
A different search found another 150,000 devices, mostly in China and Taiwan, that have the same problem.
Matherly said in a phone interview on Wednesday it is possible the manufacturers copied the same operating system image to all of the routers.
Another explanation is that an ISP reflashed the devices with custom settings, but did so insecurely, Matherly said. Newly imaged devices running SSH should be configured to generate their own unique key pairs.
But it is questionable whether SSH should be running on a home router anyway. It is used by administrators to enable encrypted, remote access to a system, but that capability isn't usually needed for home routers. All of the Telefónica de España routers were running a version of SSH called Dropbear.
"It's kind of weird that [SSH] is there in the first place," said Matherly, who also blogged about his findings. "You don't need to change your Wi-Fi password when you're away from home. It's very unusual."
The settings for a home router can usually be accessed by those on its local network through a password-protected Web interface.
Matherly said another problem of thousands of devices sharing the same key pair is that there is no way to verify a specific device. The public key fingerprint is a way to verify that a device is who it says it is, but if many devices share the fingerprint, it's impossible to tell, Matherly said.
It's hard to say if the key errors means that a remote attacker could log into all of the devices, as it would depend on how the routers are configured for remote authentication.
But "the biggest issue I see is that if you compromise one of them, you know that every other device is going to be exactly the same," Matherly said.
Matherly said he didn't take it that far and that he only queried the devices with Shodan, which goes through the motions of setting up a connection with a router, including collecting its public fingerprint, but doesn't try to login.
It would be near impossible for consumers to figure out how to generate new SSH keys or turn SSH off in the routers, Matherly said.
The problem is not unique to home routers. Cloud computing providers have occasionally made mistakes by not generating fresh SSH keys with new instances of virtual machines, Matherly said.
"This kind of issue actually happens all over the cloud," he said.
Send news tips and comments to email@example.com. Follow me on Twitter: @jeremy_kirk
Join the CIO New Zealand group on LinkedIn. The group is open to CIOs, IT Directors, COOs, CTOs and senior IT managers.