From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: [RFC] Auditing user command execution
Date: Wed, 26 Oct 2011 13:36:30 -0400 [thread overview]
Message-ID: <201110261336.31084.sgrubb@redhat.com> (raw)
In-Reply-To: <CAA7Uhcn_c2iWrTRES9e4OSFJ-S7Kwz9WOVSfNhJaueCC1MJdCg@mail.gmail.com>
On Wednesday, October 26, 2011 12:51:02 PM Diego Woitasen wrote:
> I received a requirement from one of my customer to audit what the
> users do after sudo. To be sure that only user sessions are audited
> I'm using the pam_script module to insert and remove a rule when the
> users logins and logouts, respectively. I'm doing this because if you
> have a persistent rule and you restart a daemon, the audit system will
> report the daemon actions, even if the user logouts.
>
> I configured the pam_script in /etc/pam.d/sudo and pam_loginuid in
> /etc/pam.d/{login,ssh}.
>
> The command line that I'm using to add/remove the rule to audit execs is:
>
> /sbin/auditctl [-a|-d] entry,always -S execve -F auid=$AUID
>
> Let me know if anybody has a better way to do this.
This looks about right given the current implementation. However, thinking about this
made me realize that we do not allow adding a session id field to an audit rule. We
should probably fix that.
Another approach might be to add tty auditing to the sudo pam stack so that you can
tell what the person is doing. What if they open python and start typing commands?
With execve, you will see python start and then nothing. Meanwhile files could be
deleted or copied or whatever.
-Steve
prev parent reply other threads:[~2011-10-26 17:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 16:51 [RFC] Auditing user command execution Diego Woitasen
2011-10-26 17:36 ` 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=201110261336.31084.sgrubb@redhat.com \
--to=sgrubb@redhat.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