All of lore.kernel.org
 help / color / mirror / Atom feed
* A _good_ and valid use for TPM
@ 2009-02-18  9:10 Alex Besogonov
  2009-02-18 12:16 ` phcoder
                   ` (2 more replies)
  0 siblings, 3 replies; 74+ messages in thread
From: Alex Besogonov @ 2009-02-18  9:10 UTC (permalink / raw)
  To: grub-devel

I know that TPM has been mentioned several times on this list. With
absolutely inadequate knee-jerk reactions from GRUB developers :(

Currently I have a problem - I need to protect confidential private
data (we try to protect privacy of our customers) from the _physical_
theft of the server. A simple full hard drive encryption should work
just fine except for one small detail - there's nobody to enter the
password when server reboots.

I've solved this by adding an intermediate system which connects to
another server (which I consider physically secure), retrieves
decryption key and does kexec into the real OS passing this key as a
parameter. So I can just delete the key from the secure server to stop
the physically insecure sever from booting, it'll then be useless for
attackers since there's no decryption key present on it.

However, it would be fairly trivial for attacker to steal the server
and/or make a full copy of its hard drive and then modify intermediate
system to print the decryption key. Not good. And there's no way to
solve it in software, since attacker can trivially change the
bootloader.

So I've added another layer of security - I use TPM to remotely attest
that the bootloader and the intermediate system is not modified. It
requires chain of trust from BIOS to the intermediate system. So if
attacker tries to modify bootloader or intermediate system image - TPM
will not provide keys for communication with the secure server.

Please note, that if TPM chip is blocked/kicked/de-soldered/sacrificed
to GNU gods then I can still retrieve all data because the main
decryption key is NOT kept in the TPM module (TPM is only used to
attest integrity of the system). Also, this is not a DRM scheme.

So... Why not add TPM patches into the mainline GRUB2 project? GPLv3
protects nicely against the possible DRM misuse of GRUB2 and TPM. Also
I can assist in forward-porting of 'Trusted GRUB' patch.



^ permalink raw reply	[flat|nested] 74+ messages in thread
* Re: A _good_ and valid use for TPM
@ 2009-02-18 14:10 Alex Besogonov
  2009-02-18 14:52 ` Isaac Dupree
  0 siblings, 1 reply; 74+ messages in thread
From: Alex Besogonov @ 2009-02-18 14:10 UTC (permalink / raw)
  To: grub-devel

>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).

>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'.



^ permalink raw reply	[flat|nested] 74+ messages in thread
* Re: A _good_ and valid use for TPM
@ 2009-02-19 17:43 Alex Besogonov
  2009-02-19 19:30 ` phcoder
  0 siblings, 1 reply; 74+ messages in thread
From: Alex Besogonov @ 2009-02-19 17:43 UTC (permalink / raw)
  To: grub-devel; +Cc: phcoder

>First of all your system is still totally vulnerable to emanation and
>power analysis or hw tampering.
Yes, but that's way too hard.

>By reflashing bios one can bypass all
>tpm protections (don't say it's difficult because it's closed source and
>so on. Look at all closed source obfuscations/pseudo-protections that
>get cracked every day)
That's possible, but again I consider this not critical. BIOS itself
is checksummed and checked by the root of trust.

>Personally if tpm support is merged into mainline grub2 I'll stop using
>it.
Why?

>However what you request doesn't need tpm. Authenticity of modules,
>configuration files and so on can be verified by one of 4 methods:
>1) internal signatures
>2) file in signed gpg container
>3) detached signatures
>4) signed hash file
Won't work.

For example, attacker can run everything inside a hypervisor and then
just dump memory and extract decryption keys. You have no reliable
ways to detect hypervisor from inside the running OS. You can pile
layers upon layers of integrity checks, but they are useless if
hardware itself is not trusted.  TPM allows me to establish this
trust.

Actually, I can probably even formally prove this assumption.

>First advantage is that you can override it manually supplying grub password
Administrator can manually override TPM by supplying the decryption
key directly instead of fetching them from my key server.

[skipped because this scheme just won't work]

>I personally would be interested in implementing security features in
>grub2 as long as tpm stays away
Then that's a religion, not engineering.

PS: please, can you CC me when you answer my posts?



^ permalink raw reply	[flat|nested] 74+ messages in thread
* Re: A _good_ and valid use for TPM
@ 2009-02-21  2:27 Alex Besogonov
  0 siblings, 0 replies; 74+ messages in thread
From: Alex Besogonov @ 2009-02-21  2:27 UTC (permalink / raw)
  To: grub-devel

>> The hard part is initializing the hardware without the use of the
>> original BIOS - the specifics of initializing various chips are not
>> public, and probably depend on companion hardware and/or trace length
>> on the particular board as well.
>It's not actually needed. If one can nop tpm code in bios then he can
>boot from anything and read tpm keys. You don't need to understand the
>whole bios to do it. Of course it's obfuscated but obfuscation isn't a
>security in any way. Also if you write completely different code to
>flash bios you don't need to be able to initialise the whole hardware
>all you need is being able to read tpm and write to serial port. Then
>you can simply read the key at your serial console. Actually bios isn't
>protected. It's just obfuscated.
It won't work. BIOS itself is checksummed by the TPM. And TPM by
design gains control even _before_ BIOS.



^ permalink raw reply	[flat|nested] 74+ messages in thread

end of thread, other threads:[~2009-02-27 20:33 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-18  9:10 A _good_ and valid use for TPM Alex Besogonov
2009-02-18 12:16 ` phcoder
     [not found] ` <499C7809.6030203@student.ethz.ch>
2009-02-19 10:21   ` Alex Besogonov
2009-02-19 15:05     ` phcoder
2009-02-19 15:38       ` Colin D Bennett
2009-02-19 16:29         ` phcoder
2009-02-21 13:38         ` Robert Millan
2009-02-21 13:43           ` phcoder
2009-02-21 14:00           ` Jan Alsenz
2009-02-19 15:44       ` Michal Suchanek
2009-02-19 16:02         ` phcoder
2009-02-21 13:22 ` Robert Millan
  -- strict thread matches above, loose matches on Subject: below --
2009-02-18 14:10 Alex Besogonov
2009-02-18 14:52 ` Isaac Dupree
2009-02-18 15:10   ` Alex Besogonov
2009-02-18 22:03     ` Isaac Dupree
2009-02-19  9:46       ` Alex Besogonov
2009-02-19 17:43 Alex Besogonov
2009-02-19 19:30 ` phcoder
2009-02-19 21:00   ` Alex Besogonov
2009-02-20  0:29     ` Jan Alsenz
2009-02-20  1:03       ` Alex Besogonov
2009-02-20  7:47         ` Jan Alsenz
2009-02-22  1:14           ` Alex Besogonov
2009-02-27 19:59             ` Robert Millan
2009-02-21 13:46         ` Robert Millan
2009-02-21 14:20           ` Jan Alsenz
2009-02-21 14:34             ` Robert Millan
2009-02-21 15:00               ` Jan Alsenz
2009-02-21 20:08                 ` Robert Millan
2009-02-22  1:21                   ` Alex Besogonov
2009-02-22  9:44                     ` phcoder
2009-02-22 14:49                       ` Michal Suchanek
2009-02-22 15:33                         ` phcoder
2009-02-23  2:34                           ` step21
2009-02-23 13:35                             ` Michal Suchanek
2009-02-27 20:07                             ` Robert Millan
2009-02-27 20:03                     ` Robert Millan
2009-02-21 16:29           ` Alex Besogonov
2009-02-21 17:03             ` phcoder
2009-02-21 20:23               ` Robert Millan
2009-02-21 20:21             ` Robert Millan
2009-02-22  1:26               ` Alex Besogonov
2009-02-27 20:13                 ` Robert Millan
2009-02-20  7:45       ` Michael Gorven
2009-02-20 11:27         ` phcoder
2009-02-20 12:12           ` Michael Gorven
2009-02-20 17:31             ` Jan Alsenz
2009-02-20 18:35               ` Vesa Jääskeläinen
2009-02-20 19:35                 ` Jan Alsenz
2009-02-21 13:59             ` Robert Millan
2009-02-21 13:51         ` Robert Millan
2009-02-21 15:29           ` Michael Gorven
2009-02-21 20:31             ` Robert Millan
2009-02-21 20:43               ` Michael Gorven
2009-02-21 21:04                 ` Robert Millan
2009-02-21 21:17                   ` Jan Alsenz
2009-02-21 21:27                     ` phcoder
2009-02-21 21:32                     ` Robert Millan
2009-02-21 21:57                       ` Jan Alsenz
2009-02-21 23:19                         ` Robert Millan
2009-02-21 21:04               ` Jan Alsenz
2009-02-21 21:27                 ` Robert Millan
2009-02-22  2:10               ` Isaac Dupree
2009-02-27 20:28                 ` Robert Millan
2009-02-21 16:48           ` Alex Besogonov
2009-02-21 20:39             ` Robert Millan
2009-02-22  1:02               ` Alex Besogonov
2009-02-27 20:33                 ` Robert Millan
2009-02-21 16:58           ` Alex Besogonov
2009-02-21 17:08             ` phcoder
2009-02-21 20:43             ` Robert Millan
2009-02-21 13:31       ` Robert Millan
2009-02-21  2:27 Alex Besogonov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.