|
From: Mimi Z. <zo...@li...> - 2015-08-06 18:25:03
|
On Thu, 2015-08-06 at 12:39 +0200, Patrick Ohly wrote: > On Wed, 2015-08-05 at 16:35 -0400, Mimi Zohar wrote: > > On Tue, 2015-08-04 at 15:17 +0200, Patrick Ohly wrote: > > > > > My expectation is that a device protected by appraisal refuses access to > > > files that an attacker has tampered with while offline, without relying > > > on measurements and a remote service that checks these measurements. > > > Otherwise, what would be the benefit of appraisal? > > > > > > For example, suppose there is a data file read by the init process (for > > > systemd, /lib/systemd/system/systemd-networkd.service would be a > > > specific example). I can think of two approaches how an attacker could > > > get systemd to use a modified file (for example, one which > > > invokes /bin/sh on a shell script which then runs as root). > > > > > > 1. Edit the file, change owner from root:root to some other owner. > > > Because appraisal is limited to files owned by certain groups, > > > it is no longer covered by the policy and thus access is granted > > > despite the modified content. > > > > True, the builtin appraisal policy only verifies files owned by root. > > This policy could be replaced with a more comprehensive one similar to > > the measurement policy, where all files executed or read by root are > > appraised, or even with a more constrained policy that appraises all > > files. > > > > You might be interested in David Safford's presentation at last year's > > LSS titled "Extending the Linux Integrity Subsystem for TCB Protection" > > - > > http://kernsec.org/wiki/index.php/Linux_Security_Summit_2014/Abstracts/Safford > > The threat model described there is explicitly about attacks on a > running device, and in that context IMA appraisal starts to make a lot > more sense to me than in the offline attack scenario that I described. > > This IMA "locked" mode is not yet in the upstream kernel, is it? And > without it, IMA appraisal still has to be considered ineffective (or at > least not as complete as it should be) regarding online attacks? The existing IMA/EVM can provide complete protection against on-line and off-line attacks, given the right policy. If the policy says that root cannot read or execute any file unless it is signed, then you have a complete Biba model. We don't do this by default, as most systems are badly designed and won't even boot with such a policy. The problem is privileged applications which write and read sensitive local files, which cannot be securely signed. The coming locked mode can protect these. In the meantime, there are some Linux environments (hypervisor, embedded...) which don't have such troublesome applications, and which can have all TCB files signed, and can have a policy for complete protection. The existing IMA and EVM are useful in these environments. Dave Safford Mimi Zohar |