From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: "Fulda, Paul (Space Technology)" <Paul.Fulda@ngc.com>
Subject: Re: Example
Date: Wed, 24 Sep 2008 07:34:20 -0400 [thread overview]
Message-ID: <200809240734.21742.sgrubb@redhat.com> (raw)
In-Reply-To: <D61E6AB9CB208E46B0614D6DBAEB56C601B600BF@XMBIL132.northgrum.com>
On Tuesday 23 September 2008 12:18:27 Fulda, Paul (Space Technology) wrote:
> Can someone give me an example of how to audit the "date" command in the
> audit.rules file.
The "watch" style commands will not work. The audit system works at the
syscall level. So, under the hood, the audit system will place a rule on
execve, or open on your behalf. Neither of these are the actual syscall that
fails.
> I would like for it to report only failures for a user using the command.
> Root using the command would report nothing. I can get this working for file
> watches but not for executables using
strace is your friend. I ran a command that would fail and see something like
this:
write(3, "strace: exec: Permission denied\n"..., 32strace: exec: Permission
denied
) = 32
close(3) = 0
munmap(0x7f17fc707000, 4096) = 0
exit_group(1)
So, we should be able to place a rule on exit_group.
-a exit,always -S exit_group -F a0=1 -F auid>=500
But I'm really not sure this will give you good, quality results. You can
experiment and see. But the audit system is at the syscall level and not the
application level and that should always be taken into account.
-Steve
prev parent reply other threads:[~2008-09-24 11:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 16:18 Example Fulda, Paul (Space Technology)
2008-09-23 16:23 ` Example Fulda, Paul (Space Technology)
2008-09-24 11:34 ` 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=200809240734.21742.sgrubb@redhat.com \
--to=sgrubb@redhat.com \
--cc=Paul.Fulda@ngc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox