From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com, burn@swtf.dyndns.org
Subject: Re: Configuration file monitoring - reporting content changes
Date: Mon, 20 Jul 2015 19:08:01 -0400 [thread overview]
Message-ID: <7607942.YQGEPIT7XG@x2> (raw)
In-Reply-To: <1437393227.26354.16.camel@swtf.swtf.dyndns.org>
On Monday, July 20, 2015 09:53:47 PM Burn Alting wrote:
> I am interested in any Linux based capability that will monitor
> identified files and report on actual changes to the monitored file.
I know of nothing that does this. But as long as the list of files is limited,
it doesn't sound like a hard program to write.
> I know there are methods of recording that the file has been changed (e.g.
> aide and/or monitor writes via auditd), but I want to know what has
> changed ... basically something that would provide a 'diff' like output.
>
> Now there are tools like Samhain that will record the content changes of
> a file that is <= 92000 bytes in size, but I am interested in a more
> lightweight solution ... perhaps a simple inotify(7) based utility that
> perhaps maintains a copy of the file(s) in core (in compressed format)
> and based on inotify() returns checks for changes and reports (somehow
> yet to be defined) the before/after changes.
It would have to be after the changes since inotify would tell you something
happened.
> Is there anything 'out there' that list members are aware of?
>
> If not, would the following utility be of interest?
I am certain there are people that are interested in this even if no one is
speaking up on it.
> On startup, load the monitored file(s) (saving a compressed copy in memory).
> Then, using inotify, monitor for changes and if so, emit some kind of record
> defining the change and change the compressed in-memory copy. If so, is
> our mailing list and the contributed portion of auditd an appropriate
> repository for such a tool.
That's an interesting question.
> Naturally, such a tool would be supported by appropriate auditd
> monitoring that will take care of changing file attributes etc and file
> writes. That is, auditd tells me who and the utility tells me what.
Correlating the changes might be interesting. There can be a long time between
opening a file and closing it. The inotify might trigger on the changes during
flushing to disk. Or what if the file was mmap'ed? I don't know if that would be
caught. But there's only 1 way to find out. :-)
Like I said, I think its a straight forward program to write. No one's
specifically asked for this. But we tap dance around the subject by patching
programs to record what is being changed (shadow-utils). So, there is a
precedence that this is needed. But Common Criteria makes it only for trusted
databases. One file you would exempt, I presume, is /etc/shadow and
/etc/gshadow.
Any one else with an opinion?
-Steve
next prev parent reply other threads:[~2015-07-20 23:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 11:53 Configuration file monitoring - reporting content changes Burn Alting
[not found] ` <201507202109.GAJ05274.tSFOJFFVQMLOHO@I-love.SAKURA.ne.jp>
2015-07-20 13:03 ` Burn Alting
2015-07-20 17:53 ` Smith, Gary R
2015-07-20 22:12 ` Burn Alting
2015-07-20 23:08 ` Steve Grubb [this message]
2015-07-21 13:47 ` EXT :Re: " Boyce, Kevin P (AS)
2015-07-21 21:48 ` Burn Alting
2015-07-21 14:38 ` John Dennis
2015-07-21 17:59 ` Steve Grubb
2015-07-21 21:54 ` Burn Alting
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=7607942.YQGEPIT7XG@x2 \
--to=sgrubb@redhat.com \
--cc=burn@swtf.dyndns.org \
--cc=linux-audit@redhat.com \
/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 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.