PHP

When I was conceiving the current iteration of twoprops.net, I made a deliberate decision to move away from WordPress and other web content delivery systems that I felt were too complex to be safe. Specifically, I said of my WordPress sites “the software base itself was huge and horribly complex, and uses technologies (PHP, mySQL) that I don’t really like to expose to the net if I don’t have to”. Sadly, my paranoia proved prescient last night when an exploit was found in PHP which immediately rendered all PHP-using web sites (estimated to be about 70% of sites on the World Wide Web) vulnerable to unauthenticated remote code execution (meaning that an attacker could run just about any program they wanted to on any vulnerable server without even needing an account). If you found you couldn’t access some of your favorite sites today, that’s likely the reason.

TLS

In a vastly-oversimplified nutshell, TLS is the system that verifies that the site you’re connecting to is the site you’re trying to connect to. Otherwise, it’s not too difficult to re-direct internet traffic so that when you try to connect to, say, Wells Fargo Bank, you actually connect to a look-alike site that then steals your login credentials. TLS works by having each browser (or other internet-connecting software) maintain a list of trusted keys. Those keys can then sign other keys to make them trusted, and one of those keys can verify the identity of the site to which you’re connecting. If you’re thinking this is already getting a bit too complicated to work reliably, well, it does seem that way but it’s been working pretty reliably since the mid-1990s, except for one problem:

Three people can keep a secret, if two of them are dead.

So we have a couple of people with secret “root keys” that are trusted by browsers. That’s okay, right? Well, right now the Mozilla (Firefox) root store has about one hundred fifty root certificates. So unless 149 of those keyholders are dead…

And one of those 150 were, overnight, discovered to be using really weak keys to protect their master keys. How weak? Normally, such keys (which are kind of like passwords; you don’t want them to be guessable) would have hundreds of digits. One of the keys they were using was “4”. Not four digits, 4. Now every piece of software that has an embedded trust root is insecure until it’s updated. Windows. MacOS. Most Linux distros. All web browsers. Actually, by the time you read this, most of those kinds of things will have been taken care of (either by an update or because they check revocation lists, though the latter is exceptional). But what about all that internet-connecting software that’s buried in old, end-of-life software that isn’t going to get updated? What about your thermostat? Your “smart” television? Your robot vacuum? Your connected lightbulbs and switches? Your refrigerator?

The effects of this will be with us a while. There might be a silver lining, though. This flaw might create a backdoor that will allow owners of internet-of-things (IoT) devices that have been neglected or deliberately bricked by their sleazeball vendors to be back-doored and restored to service. Google Nest thermostat owners, rejoice!

Oh, but there’s a dark side too. Early reports, not yet verified, are that the bad keys were generated by a hardware security module (HSM). That’s security best practice. HSMs are computers, but computers that are stripped down to a “bare minimum” of code and sealed up so that they “can’t be compromised”. They go by other names, too. Windows calls them trusted platform modules (TPMs). Apple has their secure enclaves. Essentially, we’ve been asked to believe that HSMs are invulnerable and are written with auditable, bug-free code. But a modern HSM (by whatever name) probably has more lines of code than an entire working Macintosh computer from 1984, and nobody ever claimed such computers were simple enough that they could be made bug-free.

The next time somebody tries to sell you on the idea of using passkeys instead of a password, keep in mind that they’re asking you to trust, 100%, an HSM very like the one that might have generated a security key protected by the number 4. HSMs also are the only thing standing between “biometric unlock” on most devices and total compromise. Think about that when you’re giving your keys-to-the-kingdom over to a device that’s relying on facial or fingerprint scanning for security.

Update all your software that has trust stores. Since you can’t possibly know what that means, update everything. If you have a web site that uses WordPress or PHP, take it down until you know it’s updated.

And be very careful whom, or what, you trust.

—2p

← previous||about||random||next →