Skip to contentSkip to conversation

A _good_ and valid use for TPM

DISCUSSION Alex Besogonov 2 participants 5 messages Feb 18, 2009 – Feb 19, 2009

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

I don't know much about TPM but from example that I read at TreacherousGrub website actual verification is done by TreachorousGrub. I don't see how such a verification can protect against anything.

Wrong. The main concept in TPM is "chain of trust".

First, BIOS attests that the first stage of GRUB is not tampered with. If it's somehow modified then the chain of trust is broken and keys in the TPM are locked. Then the first stage (which is by now checked to be real and unmodified) loads and checks the second stage. And so on...

There's no way to break this chain of trust without hacking TPM (which I consider very unlikely), doing uber-dirty hardware tricks (like modifying RAM on-the-fly using DMA from rogue PCI devices) or exploiting some local vulnerability (which is rather unlikely).

Quoted 5 lines

If you suppose that your attacker is unable to tamper the hardware then bios and grub password is all you need. If you suppose that he can then you can't even trust your ram modules. It can be tampered in many ways like serving hacked bootloader or just being non-volatile then an attacker can read the key from memory.

I'm trying to guard against attacker who can _steal_ the server itself and/or tamper with the hardware.

PS: please, at least read the relevant specs before calling TPM 'Treacherous'.

#1 lore raw
Quoted 2 lines · Alex Besogonov

There's no way to break this chain of trust without hacking TPM (which I consider very unlikely)

fair to say "unlikely"

Quoted 2 lines

doing uber-dirty hardware tricks (like
modifying RAM on-the-fly using DMA from rogue PCI devices)

yeah, it's probably technically possible, but enough work to do that it's not worth guarding against.

But guess what? While your system is running, they can take out your RAM and read it (disk-encryption key and all) before the RAM forgets its contents, see e.g.
http://blogs.zdnet.com/security/?p=900

Quoted 2 lines

or
exploiting some local vulnerability (which is rather unlikely).

maybe. But how do you patch security vulnerabilities in e.g. the GRUB install, if modification = tampering? (I guess there's a way to do it, though.)

Quoted 8 lines
Quoted 5 lines

If you suppose that your attacker is unable to tamper the hardware then bios and grub password is all you need. If you suppose that he can then you can't even trust your ram modules. It can be tampered in many ways like serving hacked bootloader or just being non-volatile then an attacker can read the key from memory.

I'm trying to guard against attacker who can _steal_ the server itself and/or tamper with the hardware.

which is very difficult. Why do you have to reboot, though? and is there some way you can store the key locally in those cases, without compromising it further?

Quoted 2 lines

PS: please, at least read the relevant specs before calling TPM 'Treacherous'.

the ones that say to keep the keys in the hands of the manufacturers?(no I haven't read the specs either, maybe Robert Millan has though)

-Isaac

#2 lore raw
Quoted 4 lines · Isaac Dupree

Alex Besogonov wrote:
But guess what? While your system is running, they can take out your RAM and read it (disk-encryption key and all) before the RAM forgets its contents, see e.g. http://blogs.zdnet.com/security/?p=900

I know. But there's no way to guard against this attack, so there's no sense fretting over it for now.

Quoted 5 lines
Quoted 2 lines

or
exploiting some local vulnerability (which is rather unlikely).

maybe. But how do you patch security vulnerabilities in e.g. the GRUB install, if modification = tampering? (I guess there's a way to do it, though.)

Yes, there are ways to do this. They require additional credentials (which won't be available for attackers), of course.

Quoted 3 lines
Quoted 2 lines

I'm trying to guard against attacker who can _steal_ the server itself and/or tamper with the hardware.

which is very difficult. Why do you have to reboot, though?

Power failure, kernel panic, someone accidentally kicking the power cord, etc.

10-15 minutes of downtime for reboot are acceptable, but several hours, required to dispatch administrator with enough access rights to boot the server, are not.

Quoted 2 lines

and is there someway you can store the key locally in those cases, without compromising it further?

I can't think of one. I'm open to suggestions, though :)

Quoted 4 lines
Quoted 2 lines

PS: please, at least read the relevant specs before calling TPM 'Treacherous'.

the ones that say to keep the keys in the hands of the manufacturers?(no I haven't read the specs either, maybe Robert Millan has though)

So far every TPM I tried can be fully controlled by me. I also don't remember bits of specs saying about keeping keys in the hands of manufacturers.

Of course, TPM in theory can be used to lock down your computer, but I doubt that in this case DRM Mafiaa is going to consider using GRUB to do this. Also, projects like SELinux can then be used to lock down your computer even further, but somehow we don't see Richard Stallman battling SELinux folks.

Maybe we can just rename TPM to 'Secure Key Storage'?

#3 lore raw
Quoted 10 lines · Alex Besogonov

On Wed, Feb 18, 2009 at 4:52 PM, Isaac Dupree

Quoted 4 lines · <[email protected]> wrote:

Alex Besogonov wrote:
But guess what? While your system is running, they can take out your RAM and read it (disk-encryption key and all) before the RAM forgets its contents, see e.g. http://blogs.zdnet.com/security/?p=900

I know. But there's no way to guard against this attack, so there's no sense fretting over it for now.

well, it's relatively straightforward for an attacker who knows what they're doing, so perhaps you should assume that *privacy* is at least partly compromised.

but the most that attack can achieve is observing? Can that attack make it so that, when the system starts running again, it will be in a compromised state?
- they can steal all crypto identity keys and try to run a completely different computer with different software there, if not for TPM
- I don't know how the magic of TPM knowing everything about the state of your computer works, maybe they can modify what's in memory and put it back and confuse things?

Also why does GRUB need to do any explicit interaction with TPM? (I'm ignorant and unimportant here, but maybe it will edify people, to have this conversation.)

-Isaac

#4 lore raw
Quoted 5 lines · Isaac Dupree
Quoted 2 lines

I know. But there's no way to guard against this attack, so there's no sense fretting over it for now.

well, it's relatively straightforward for an attacker who knows what they're doing, so perhaps you should assume that *privacy* is at least partly compromised.

I think there are ways to guard against this attack. There's 'freeze CPU cache' method and I'm also thinking about using GPU to perform decryption - this way decryption keys won't be in the main memory.

For now, I'm just planning to glue memory chips to the mainboard using epoxy resin. It'll make life much harder for the attacker.

Quoted 2 lines

but the most that attack can achieve is observing? Can that attack make it so that, when the system starts running again, it will be in a compromised state?

Attackers can steal decryption keys, connect hard drives from my computer to their computer and then copy everything.

Quoted 5 lines

- they can steal all crypto identity keys and try to run a completely different computer with different software there, if not for TPM
- I don't know how the magic of TPM knowing everything about the state of your computer works, maybe they can modify what's in memory and put it back and confuse things?

No. TPM is a passive chip.

It might be possible to use TPM as a hardware decryptor, but it's too slow to handle full-disk encryption.

Quoted 3 lines

Also why does GRUB need to do any explicit interaction with TPM? (I'm ignorant and unimportant here, but maybe it will edify people, to have this conversation.)

BIOS is only able to attest that the first stage of GRUB (512-byte MBR) is not compromized. First stage then has to check the second stage and so on. So unmodified GRUB will happily load a compromised second stage even if the first stage is attested to be not modified.