linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: John Jasen <jjasen@gmail.com>
To: linux-audit@redhat.com
Subject: Re: perhaps obvious question: auditd and setuid/setgid?
Date: Fri, 4 Sep 2015 13:36:40 -0400	[thread overview]
Message-ID: <55E9D6A8.7010303@gmail.com> (raw)
In-Reply-To: <2447871.tML4uAQppZ@x2>



On 09/04/2015 12:20 PM, Steve Grubb wrote:
> On Friday, September 04, 2015 10:54:47 AM John Jasen wrote:
>> I was specifically wondering if I was missing the appropriate syscall
>> for the use of setuid or setgid.
>>
> >From a brief examination and test, this appears to not be the case?
>
> There are a couple ways to do this. One is using the find method. However, that 
> does not take into account file system based capabilities. In the lab I taught 
> this week, the rules generator also included this:

<snipped> filecap examples to add LINUX_CAP executables to audit.rules.

Huh .... I did not think of that.
> But, if all you want is setuid, then you can use a rule like this instead of 
> file watches:
>
> -a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0

Perfect! Thanks.

For future generations googling for answers, I did the following:

-a always,exit -F arch=x86_64 -S execve -C uid!=euid -F key=execpriv
-a always,exit -F arch=x86_64 -S execve -C gid!=egid -F key=execpriv

I didn't pursue the last match, -F euid=0, as there may be cases where
you wish to audit setuid usage, but the binary is not setuid to root.

      reply	other threads:[~2015-09-04 17:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 23:06 perhaps obvious question: auditd and setuid/setgid? John Jasen
2015-09-03  2:32 ` rshaw1
2015-09-04 14:54   ` John Jasen
2015-09-04 16:20     ` Steve Grubb
2015-09-04 17:36       ` John Jasen [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=55E9D6A8.7010303@gmail.com \
    --to=jjasen@gmail.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;
as well as URLs for NNTP newsgroup(s).