ima: related Makefile compile order change and Readme
Pavel Machek <[email protected]> wrote on 05/22/2005 03:37:17 PM:
Quoted 12 lines
Hi!
Review
Quoted 7 lines
(quoted diff) +7
-0+Limitations: IMA does not detect corruption of software once it is +loaded into main memory. Instead, it indicates known vulnerabilities +in such software (e.g., buffer overflow) by securely identifying the +software at load-time. Only executable files (binaries, libraries, +kernel modules) are measured by default. However, IMA offers a +sysfs-interface that allows applications to instruct the kernel to +measure files that they have opened.What is it good for, then? So I have to put my backdoor into script, not into an executable...
Scripts can be measured as well (from the user space).
For example, equipping the bash shell with 5-10 lines of code, bash initiates IMA measurements on scripts and files that are sourced into bash before they are "executed" by bash. This way, startup scripts and executed scripts can be logged as measurements and the measuremnt list will include them.
Quoted 11 lines
Review
Quoted 7 lines
(quoted diff) +7
-0+Some of our work shows that IMA is very useful to detect Rootkit +exploits that totally take over the software of a Linux system but +cannot hide themselves from contributing to the TPM aggregate and this +will be detectable from a non-corrupted platform. While the corrupted +system might not show the Rootkit, a remote party can securely +identify known bad or unknown software having been loaded into the +system.How does it work? It is corrupted software, not your TPM chip that is talking over network.... Do you sign the measurements inside TPM chip?
Quoted 1 line
Pavel
We sign the _integrity_value_ of the measurements inside the TPM.
TPMs offer signing of their so-called Platform Configuration Registers (PCR) inside the TPM (Quote). IMA uses one of these PCRs (kernel configuration option) to maintains an integrity value over the kernel-held measurement list. Whenever a new measurement is added, we also adjust the TPM PCR holding the integrity value (that's why we call it also a measurement aggregate).
You retrieve not only the measurement list from a system (kernel) but also a signature over the TPM PCR holding the integrity value. Nonces (random numbers) are used to protect against replay of old signed TPM PCR contents by the kernel. Since PCR is signed inside the TPM together with the nonce, corrupt system software can't cheat unnoticedly.
IMA implements the measurment hooks and maintains the measurement list and its integrity value in the TPM PCR. Services retrieving and evaluating measurement lists can be based on top of IMA.
Thanks
Reiner
Quoted 3 lines · Reiner Sailer
IMA implements the measurment hooks and maintains the measurement list and its integrity value in the TPM PCR. Services retrieving and evaluating measurement lists can be based on top of IMA.
Perhaps I don't understand things fully, but what is the purpose of providing measurement values locally via proc?
How can they be trusted without the TPM signing an externally generated nonce?
- James
Signature · 2 lines
James Morris <[email protected]>
Quoted 5 lines · James Morris
Perhaps I don't understand things fully, but what is the purpose of providing measurement values locally via proc?
How can they be trusted without the TPM signing an externally generated nonce?
If you can't trust what the kernel is outputting in /proc, you're screwed.
And for that matter, how would you verify that it's the TPM that signed the externally generated nonce? (Remember - if you can't trust /proc, then you have to assume that *any* attempt at talking to the TPM from userspace *is* a MITM attack - and you don't have access to any out-of-band info. If the now-untrusted kernel did a MITM on your nonce and signed it with a fake key, then it can *also* MITM your attempt to read the "correct" key from /etc/tpm.key or wherever it is....
Hi!
Quoted 11 lines
Quoted 10 lines
Review
Quoted 7 lines
(quoted diff) +7
-0+Limitations: IMA does not detect corruption of software once it is +loaded into main memory. Instead, it indicates known vulnerabilities +in such software (e.g., buffer overflow) by securely identifying the +software at load-time. Only executable files (binaries, libraries, +kernel modules) are measured by default. However, IMA offers a +sysfs-interface that allows applications to instruct the kernel to +measure files that they have opened.What is it good for, then? So I have to put my backdoor into script, not into an executable...
Quoted 7 lines
Scripts can be measured as well (from the user space).
For example, equipping the bash shell with 5-10 lines of code, bash initiates IMA measurements on scripts and files that are sourced into bash before they are "executed" by bash. This way, startup scripts and executed scripts can be logged as measurements and the measuremnt list will include
them.
Well, for this to be usefull, you'd have to split files into two categories:
1) files that do not change
2) files that can not compromise your security.
I guess that /etc/shadow *has to change*, and it still can compromise your system security.
Same with basch scripts; you can make bash checksum its script, but when user modifies his first script, you'll detect system as "compromised".
I guess it can work... but I don't see how it can work in Linux.
Pavel