News for hackers. Stuff that matters.
Re:TPM Sniffing by ohazi on Wednesday November 17, 2021 @09:25PM (#29261383)
Does anyone make a "glass house" TPM? As in, a device that you can plug in to your motherboard's TPM port that implements the complete TPM 2.0 protocol, that looks/acts/feels like a real TPM, but then deliberately includes a side-channel like a USB port or something that gives a user full access to the TPM internals (keys, registers, etc.).

Obviously you'd never use something like this for trusted boot, but with Windows 11 requiring a TPM, and applications moving in the direction of "we refuse to run unless the environment is pristine" (e.g. video games with anti-cheat features, banking apps), it seems that something like this might eventually be useful for getting around DRM and restoring our ability to run whatever we want on machines that we own.

Re:TPM Sniffing by userbinator on Wednesday November 17, 2021 @11:46PM (#29262064)
I think emulators have virtual TPMs which you can definitely inspect and manipulate the internal state of, and the specs are freely available so presumably anyone with some microcontroller/embedded experience can make one. The problem is that software is able to determine whether that TPM is an "approved" one, and that process being cryptographic, is going to be pretty hard to get past: https://en.wikipedia.org/wiki/Trusted_Platform_Module#Endors...

Ever since the beginning I have maintained the strong and unchanging opinion that everything TPM and "trusted computing" related is ultimately user-hostile and a threat to freedom, and it's disturbing to see that the worst nightmares are slowing becoming reality. It used to be drugs and terrorism. Now it's "security".

Re:TPM Sniffing by endianswap on Thursday November 18, 2021 @01:09AM (#29262449)
Yes, see libtpms for the most prominent software TPM implementation for emulators: https://github.com/stefanberger/libtpms
Re:TPM Sniffing by ohazi on Thursday November 18, 2021 @02:29AM (#29262986)
Wow, I didn't realize they still relied on a golden-key style root of trust... I assumed they were trust on first use. That seems pretty bad!
Re:TPM Sniffing by cryptonector on Thursday November 18, 2021 @03:08AM (#29263230)
You can do trust on first use. Just... throw away the EK certificate and just trust the EK's public key. After all, you have physical access to the chip and... you trust your supply chain, right?
Re:TPM Sniffing by no_time on Thursday November 18, 2021 @01:49AM (#29262717)
A TPM is useless without a keypair that the manufacturer signs for you. If any particular manufacturer would give you the option to just buy the keypair or make it possible to dump it somehow, they would surely get blacklisted.

This whole "trusted computing" thing is treachery to the highest degree.

Re:TPM Sniffing by cryptonector on Thursday November 18, 2021 @02:00AM (#29262798)
TPMs come with factory "seeds" that can deterministically generate "primary keys" (which are RSA decryption keys, or ECDH key agreement keys).

One of those primary keys is the Endorsement Key (EK). The EK is generally certified by the TPM vendor, and they include that certificate in the TPM.

You can generate your own EKs and certify them. All you need to trust them is: a computer, a TPM chip you trust is legit (probably because you validated its factory EKcert), and physical security while extracting the public key of your EK'.

> If any particular manufacturer would give you the option to just buy the keypair or make it possible to dump it somehow, they would surely get blacklisted.

Yes, well, Internet-scale security (e.g., TLS) relies on the reputation of trusted third parties. The problem is that the too-big-to-fail phenomenon applies here too: what are you gonna do, stop using the one CA everyone uses, the three or four browsers everyone uses, the three OSes everyone uses?

> This whole "trusted computing" thing is treachery to the highest degree.

Oh, it's hard.

The lack of end-to-end security between the CPU and the TPM is pretty nasty. The solution is to use an on-CPU/ME firmware TPM that runs in the ME or in a secure enclave like solution -- no bus to tap there!

But even then, there's just no way to attest to the security of a long-running host. Yes, there's things like dynamic root of trust measurement, but by and large it's hard even to establish what would be a trusted state since, among other things, there's no authoritative list of trusted firmware ROMs or anything like that.

And, oh, right, you meant far beyond the realm of TPMs. Yes, "trust" is really weak.

Re:TPM Sniffing by omegalulw on Friday November 19, 2021 @03:45AM (#29275112)
> which are RSA decryption keys

Is RSA "decryption" key a thing? It should be a key pair that allows for both encryption and decryption (though you may just care about one use case).

Re:TPM Sniffing by cryptonector on Friday November 19, 2021 @05:00PM (#29283144)
You can encrypt to a RSA public key, then decrypt with the private key.

You can sign with an RSA private key, then validate the signature with the public key.

The two pairs of operations are very similar, but not quite the same due to differences in how padding is handled.

Re:TPM Sniffing by aplanas on Friday November 19, 2021 @08:40AM (#29276997)
RSA is very slow for decryption. The general approach is tp use RSA to encrypt / decrypt the key of a symmetric encryption algorithm, that is much faster.
Re:TPM Sniffing by Mindwipe on Thursday November 18, 2021 @07:06AM (#29264512)
> Obviously you'd never use something like this for trusted boot, but with Windows 11 requiring a TPM, and applications moving in the direction of "we refuse to run unless the environment is pristine" (e.g. video games with anti-cheat features, banking apps), it seems that something like this might eventually be useful for getting around DRM and restoring our ability to run whatever we want on machines that we own.

Nobody uses TPMs for DRM and nobody will start to, because TPM modules have a terrible security record for getting breached, and your GPU already does anything a DRM vendor would want with more widespead support and a better track record for hiding the keys and integrating it with control of the display path.