linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hank Leininger <hlein@progressive-comp.com>
To: <linux-kernel@vger.kernel.org>
Cc: Red Phoenix <redph0enix@hotmail.com>
Subject: Linux C2-Style Audit Capability
Date: Sat, 4 Aug 2001 19:01:55 -0400 (EDT)	[thread overview]
Message-ID: <010108041858540.11841-100000@marc1.theaimsgroup.com> (raw)

On 2001-08-04, "Red Phoenix" <redph0enix@hotmail.com> wrote:

[ snip "every syscall can/will be interrupted and it+arguments want to be
  logged somewhere, and a userspace log daemon can't keep up" ]

> What I've considered:
> * Opening the output file directly from the module
>   - I'd prefer to avoid this if at all possible.

While this sounds ugly, it is I suspect the way several commercial UNIXen
handle system call logging[0].  There's some wacky arcane userspace
commands that set the path-to-be-logged-to and tweak what shall be
audited, and then the kernel just goes.  If you think about it, it's the
easiest way to handle the inherent race condition and/or performance hits
of having one userspace process be the "clearing house" for every other
processes's syscalls (each syscall now causes at least 2 extra context
switches).

Also, keep in mind that auditing to a userspace process means it all goes
away if/when someone cracks root.  Doing all of it in kernel space makes
it harder to subvert.  Right now the "root user"<->"kernel" barrier is too
porous, but there are efforts under way/things you can do to make it
better[1] (run around with some chattr +i's, drop privileges early in the
boot process to disable raw memory and raw disk access, etc).  You
shouldn't have to solve that problem, but you do need to keep it in mind
(if nothing else, point these issues out in your first INSTALL doc, caveat
emptor ;).

iif that problem is addressed, an in-kernel audit subsystem with userspace
knobs stands a chance (similar to the old securelevel idea, it should
probably not be possible to "unset" various auditing options once they're
turned on, without a reboot).  A system which relies on a userspace
root-run process (on a conventional UNIXy system) to actually write logs
out isn't going to last two seconds once the system has been compromised;
if the audit trail is stored only locally it will then be targetted
(though the same root<->kernel hardening might make that impossible... but
the logging of new events can certainly be stopped).

The usual log-replication standard of a syslog loghost is worth thinking
about; it'd be pretty easy to have the kernel module spit logs out as
syslog-alike packets (probably stamped with a MAC and possibly
payload-encrypted).  It has some serious shortcomings if you want 100%
guaranteed remote capturing of all logs (in short: it won't happen) but
it's valuable nevertheless; if a box is cracked and its logs wiped,
99.999% complete logs written to another box in real time is better than
0% of the logs being available for analysis[2].

[ Um, after a visit to your project page, I see you're already experienced
  with at least Solaris's audit subsystem, and have things that feed these
  to syslog already.  Heh ;)  Course you know what I'll ask about next:
  a kernel-module version of backlog for Solaris. ]

[0] Not that is necessarily a ringing endorsement.
[1] Note I didn't say "good enough;" that's not possible for all
    definitions of "enough."
[2] Of course, smart attackers will try to make sure they're in the 0.001%

--
Hank Leininger <hlein@progressive-comp.com>


             reply	other threads:[~2001-08-04 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-04 23:01 Hank Leininger [this message]
     [not found] <fa.hg36o7v.1076epo@ifi.uio.no>
     [not found] ` <fa.i3h9gdv.45k3go@ifi.uio.no>
2001-08-06 22:07   ` Linux C2-Style Audit Capability richard offer
  -- strict thread matches above, loose matches on Subject: below --
2001-08-04 20:48 Elladan
2001-08-04  7:03 Red Phoenix
2001-08-04  9:23 ` Alan Cox
2001-08-04 16:46   ` Ralf Baechle

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=010108041858540.11841-100000@marc1.theaimsgroup.com \
    --to=hlein@progressive-comp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=redph0enix@hotmail.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).