public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: "MAUPERTUIS, PHILIPPE" <philippe.maupertuis@equensworldline.com>
Cc: "linux-audit@redhat.com" <linux-audit@redhat.com>
Subject: Re: Auditing a program use but not what it is doing
Date: Thu, 13 Feb 2020 11:55:22 -0500	[thread overview]
Message-ID: <14125267.1EXI0Z5HcE@x2> (raw)
In-Reply-To: <5F4EE10832231F4F921A255C1D9542982A0EB6@DEERLM99EX7MSX.ww931.my-it-solutions.net>

On Thursday, February 13, 2020 11:35:46 AM EST MAUPERTUIS, PHILIPPE wrote:
> > Objet : Re: Auditing a program use but not what it is doing
> > 
> > On Wednesday, February 12, 2020 5:01:37 AM EST MAUPERTUIS, PHILIPPE
> > 
> > wrote:
> > > Like many, we are using aide and clamav.
> > > I woud like to have an audit record when these program are run but no
> > > records for what they are doing. I mean, I want to know that clamscan
> > > or
> > > aide has been launched but not that it checks say /etc/passwd whatever
> > > rules could be in place for /etc/passwd
> > 
> > Then all you need to do is place a watch on them.
> > 
> > -a always,exit -F path=path-to-aide -F perm=x -F key=something-ran
> 
> Just to be sure to understand how it works :
> If we have two rules in that order :
> -a always,exit -F arch=b64 -F exe=/sbin/aide -F perm=x  -F key=aide_run

The exe option is to audit syscalls by a specific application. For example,
you might want to use it to see what IP address and application connects to.

-a always,exit -F arch=b64 -S connect,recvfrom -F auid>=1000 -F auid!=-1 -F exe=/usr/bin/bash

To place a _watch_ on a file, you use the path option with permission of
executable. The rule above should be:

-a always,exit -F path=/usr/sbin/aide -F perm=x  -F key=aide_run

There should be other examples like this in the shipped rules.

> -a always,exit -F path=/etc/passwd -F perm=wa -F key=10.2.5.c-accounts

This will create an event whenever an application writes to or changes
permissions of passwd. Try running adduser or chmod it.

> When running aide :
> -  the first rule produces a message
> - the second rule  is ignored

It would only trigger on a write/permission change.

-Steve

      reply	other threads:[~2020-02-13 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 10:01 Auditing a program use but not what it is doing MAUPERTUIS, PHILIPPE
2020-02-12 13:53 ` Steve Grubb
2020-02-13 16:35   ` MAUPERTUIS, PHILIPPE
2020-02-13 16:55     ` 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=14125267.1EXI0Z5HcE@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=philippe.maupertuis@equensworldline.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