linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: Monitoring "root-level" commands
Date: Wed, 18 May 2016 08:42:46 -0400	[thread overview]
Message-ID: <2318397.HZZBRemDFY@x2> (raw)
In-Reply-To: <BY1PR09MB0887A43C1B312460B39B2F29C7490@BY1PR09MB0887.namprd09.prod.outlook.com>

On Wednesday, May 18, 2016 12:18:21 PM Warron S French wrote:
> My Special Security Team, not being UNIX/Linux savvy asked me if I could put
> into place audit rules that monitor "Root-Level" commands.
> 
> I don't know of any specific identifier for such a term, and the closest
> thing I could come up with was monitoring those files that fall under
> /usr/sbin/ and /sbin/; does anyone else have any thoughts about how to
> approach this task?

Typically this is handled by monitoring what root runs. One huge difference 
between windows and linux is that running one command may spawn 20 or 30 
scripts and helpers. So, its easier to use the keystroke logging to what the 
root user is doing.

To enable this, you would add:

session   required pam_tty_audit.so disable=* enable=root

to the pam stack for su if that's how admins get the shell. If sudo gives them 
shell access, then you can add it there, too. Sudo normally logs the commands 
and parameters that it runs. If you are given a shell, though, all it logs is 
it started a shell.

-Steve
 
> I figured I would use a rule such as:
> -w /sbin/   -p rawx  -k watch_root_commands                (I used rawx, to
> account for replacement by a hacker)

      reply	other threads:[~2016-05-18 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 12:18 Monitoring "root-level" commands Warron S French
2016-05-18 12:42 ` 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=2318397.HZZBRemDFY@x2 \
    --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;
as well as URLs for NNTP newsgroup(s).