From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Eytan Naim <eytan.naim@imperva.com>
Subject: Re: Set audisp plugin filters
Date: Wed, 12 Apr 2017 12:45:47 -0400 [thread overview]
Message-ID: <2095493.9BRLS0f1nT@x2> (raw)
In-Reply-To: <BL2PR06MB212974A3256E375D116EC57383030@BL2PR06MB2129.namprd06.prod.outlook.com>
On Wednesday, April 12, 2017 4:28:02 AM EDT Eytan Naim wrote:
> I am currently developing an audisp plugin that should be as effective as
> possible. Therefore, I want to set my own set of filtering rules (2-3
> syscalls) and I don't want to get any other audit events from the audisp
> itself
This is not possible. There is one audit rule evaluator in the kernel. Any
event generated by it will get written to disk and sent to all plugins. It is
up to the plugins to filter events themselves.
A long time ago, I was working on feeding an intrusion detection system. (I'm
working my way back to intrusion detection and prevention but this time with
better technology.) The way that I denoted events that were meant for the IDS
system was to use keys with a special prefix of 'ids-'. Anything that did not
have this prefix was discarded by the plugin.
I have also considered asking if we could put a routing field in the event
specifically for cases like this. There are times you want lots of information
about something but its not actually meant to be logged. For example, you
might want exit_group events which is not called out for in any security
policy. So, you don't want to pollute the audit trail with those kind of
events.
I suppose this could be accomplished by using multiple keys with one having
routing information. I don't exactly like that because it forces all keys
associated with that event to get encoded and that takes up more disk space.
Still mulling it over. Haven't solved it yet because I'm not quite ready to go
back to IDS work just yet.
> , - I assumed it is possible to set my own plugin rules but I couldn't find
> it in the audit documentation (Linux Audit API)
The preferred way is drop your rules into /etc/audit/rules.d/ This will get
picked up and loaded. If however you wanted load them programmatically, I
would suggest looking over the autrace source code.
https://github.com/linux-audit/audit-userspace/blob/master/src/autrace.c#L50
There's no guarantee that the rule won't get flushed by someone updating the
rules with augenrules unless you put the audit system into immutable mode.
Some people may not like that.
> nor any other audisp plugins examples. Is it even possible? If not, is it
> possible to run an auditd of my own in parallel with the original auditd?
Not exactly. There is a multicast socket with lower reliability guarantees but
you get the same events that auditd sees.
> I assume each auditd can define its own set of audit rules. - Am I right?
Nope.
-Steve
prev parent reply other threads:[~2017-04-12 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 8:28 Set audisp plugin filters Eytan Naim
2017-04-12 15:54 ` Richard Guy Briggs
2017-04-12 15:56 ` Paul Moore
2017-04-12 16:45 ` Steve Grubb [this message]
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=2095493.9BRLS0f1nT@x2 \
--to=sgrubb@redhat.com \
--cc=eytan.naim@imperva.com \
--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.