Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: Mikhail Kurinnoi <viewizard@viewizard.com>
To: "Magalhaes, Guilherme (Brazil R&D-CL)" <guilherme.magalhaes@hpe.com>
Cc: "linux-integrity@vger.kernel.org" <linux-integrity@vger.kernel.org>
Subject: Re: IMA skips some file measurements
Date: Mon, 6 Nov 2017 23:04:35 +0300	[thread overview]
Message-ID: <20171106230435.34401b54@totoro> (raw)
In-Reply-To: <TU4PR84MB03023D92432F2AA6E9348873FF500@TU4PR84MB0302.NAMPRD84.PROD.OUTLOOK.COM>

? Mon, 6 Nov 2017 19:22:55 +0000
"Magalhaes, Guilherme (Brazil R&D-CL)" <guilherme.magalhaes@hpe.com>
?????:

> We are trying to understand why some file measurements are skipped
> by IMA. In some circumstances, it seems that this could lead to an
> incorrect assessment of the integrity of the host. Consider the
> following, example in which we begin with a vulnerable bash binary
> (e.g. Shellshock) and patch it.
> 
> 1. Load vulnerable bash (measured by IMA)
> 2. Patch the bash file
> 3. Load good bash (measured by IMA)
> 4. Change back to vulnerable bash
> 5. Load vulnerable bash (not measured by IMA)
> 
> After step 5, the IMA logs appear to tell you that the system is
> using a good binary, but a vulnerable binary is installed and being
> used.
> 
> We identified that 'ima_htable.queue' prevented the measurement at
> step 5 since the same vulnerable bash was loaded on step 1 and 5 and
> then its respective hash was already present in 'ima_htable.queue'.
> 
> So in this scenario the last/current file state is not identified
> using the IMA log. Is it not important to identify through the IMA
> log whether or not the last known file state is good?
> 
> Does anybody know why 'ima_htable.queue' is preventing already 
> logged file hashes from being re-measured?
> 
> --
> Guilherme
> 

As I understood, you have FS mounted with i_version option, after step 2
IMA hash was updated in file IMA xattr (plus, in ima_check_last_writer()
iint->measured_pcrs was set to 0 in order to measure changed file next
time again), but in step 5 file not measured by IMA? Right?



-- 
Best regards,
Mikhail Kurinnoi

  reply	other threads:[~2017-11-06 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 19:22 IMA skips some file measurements Magalhaes, Guilherme (Brazil R&D-CL)
2017-11-06 20:04 ` Mikhail Kurinnoi [this message]
2017-11-06 20:20   ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-11-06 20:39 ` Mimi Zohar
2017-11-06 21:26   ` Magalhaes, Guilherme (Brazil R&D-CL)
2017-11-06 22:34     ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171106230435.34401b54@totoro \
    --to=viewizard@viewizard.com \
    --cc=guilherme.magalhaes@hpe.com \
    --cc=linux-integrity@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox