<div dir="ltr">I'll try that module and those rules out, thanks.<div><br></div><div>Also, do you forsee issues with using 2.6.x userspace on ubuntu12.04, which is about four years old now?  Its kernel version 3.2.0-99-generic.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 13, 2016 at 9:32 AM, Steve Grubb <span dir="ltr"><<a href="mailto:sgrubb@redhat.com" target="_blank">sgrubb@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday, July 13, 2016 9:22:57 AM EDT Chris Nandor wrote:<br>
> Secondary question: the reason for what I'm working on is that we want to<br>
> be able to audit what folks do as root on our production hosts.  We're not<br>
> a bank, and a perfect solution is not required, but we do need to be able<br>
> to take reasonable steps to find out if people with access are doing bad<br>
> things.<br>
><br>
> Is this setup reasonable for that purpose?<br>
<br>
</span>Yes. You would want to do two things, first enable tty auditing. This is done<br>
by the pam_tty_audit module. Second consider adding the 32-power-abuse.rules<br>
to your rules.<br>
<span class=""><br>
> I know that's a loaded question<br>
> and I can answer any questions anyone has that are necessary to figure this<br>
> out.  I am not asking so much about rules, but about architecture: logging<br>
> according to whatever rules we set up, to the local audit.log and<br>
> immediately to a remote using audisp-remote, so the log can't be easily<br>
> manipulated.<br>
<br>
</span>Remote logging is the defence against local log manipulation.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Steve<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Wed, Jul 13, 2016 at 8:57 AM, Steve Grubb <<a href="mailto:sgrubb@redhat.com">sgrubb@redhat.com</a>> wrote:<br>
> > On Wednesday, July 13, 2016 8:47:58 AM EDT Chris Nandor wrote:<br>
> > > Hi, I had some odd behavior to report.<br>
> > ><br>
> > > I am running ubuntu 12.04.  Using the default auditd and audispd-plugins<br>
> > > packages for my release, I was able to get logs sent to local syslog and<br>
> ><br>
> > to<br>
> ><br>
> > > a remote auditd server (same basic configuration), but the entries were<br>
> > > being buffered somewhere (I think on the client side), and if the server<br>
> > > died reconnections didn't happen.<br>
> > ><br>
> > > So, I wanted a more recent version, so I compiled audit-userspace from<br>
> ><br>
> > the<br>
> ><br>
> > > github src mirror,* trunk@1341.<br>
> ><br>
> > The github repo is a mirror of svn and is not always up to date. The issue<br>
> > you<br>
> > are seeing is fixed in the next commit after the mirror stops.<br>
> ><br>
> > <a href="https://fedorahosted.org/audit/changeset/1342" rel="noreferrer" target="_blank">https://fedorahosted.org/audit/changeset/1342</a><br>
> ><br>
> > if you want the lastest you can:<br>
> ><br>
> > svn co <a href="http://svn.fedorahosted.org/svn/audit/trunk" rel="noreferrer" target="_blank">http://svn.fedorahosted.org/svn/audit/trunk</a><br>
> ><br>
> > and then generate from there. I am planning to release audit-2.6.5<br>
> > tomorrow.<br>
> > So, if anyone can test the current code, I'd really appreciate it. I'm<br>
> > hoping<br>
> > the next release settles down the audit code.<br>
> ><br>
> > > When I did, I got some weird results.  For example, I expected got<br>
> > ><br>
> > > something like this in my audit.log:<br>
> > >   node=<a href="http://host.example.com" rel="noreferrer" target="_blank">host.example.com</a> type=CWD msg=audit(1468363871.644:3279856):<br>
> > >  cwd="/etc/audisp"<br>
> > ><br>
> > > And that was as expected.  In syslog, I expected to get:<br>
> > >   Jul 13 08:34:53 host audispd: node=<a href="http://host.loc.example.com" rel="noreferrer" target="_blank">host.loc.example.com</a> type=CWD<br>
> > ><br>
> > > msg=audit(1468363871.644:3279856):  cwd="/etc/audisp"<br>
> > ><br>
> > > But instead, I got:<br>
> > >   Jul 13 08:34:53 host audispd: type=CWD msg=node=<a href="http://host.loc.example.com" rel="noreferrer" target="_blank">host.loc.example.com</a><br>
> > ><br>
> > > type=CWD msg=audit(1468363871.644<br>
> > ><br>
> > > As you can see, the whole thing was prepended with "type=CWD msg=", and<br>
> ><br>
> > the<br>
> ><br>
> > > line was truncated.  Similarly, on the remote host, I got the same<br>
thing:<br>
> > >   type=CWD msg=node=<a href="http://host.loc.example.com" rel="noreferrer" target="_blank">host.loc.example.com</a> type=CWD<br>
> ><br>
> > msg=audit(1468363871.644<br>
> ><br>
> > > I noticed that the most recent version of the src for ubuntu was 2.4.5,<br>
> ><br>
> > so<br>
> ><br>
> > > I grabbed the src tarball from packages.ubuntu and built it, and now<br>
> > > everything looks fine.  The exact same line I see in my audit.log shows<br>
> ><br>
> > up<br>
> ><br>
> > > in the remote audit.log, with no buffering.  When I restart the remote<br>
> > > auditd server or client, it reconnects.  syslog has same entry<br>
> > > (prepended<br>
> > > with the timestamp etc.).  Everything seems happy now.<br>
> > ><br>
> > ><br>
> > > *For some reason I had to define `CC_FOR_BUILD=gcc` in my shell when I<br>
> ><br>
> > ran<br>
> ><br>
> > > `make` from the svn/git src.  I did not require this when building 2.4.5<br>
> > > from the ubuntu src.<br>
> ><br>
> > I think that should have been detected during configure.<br>
> ><br>
> > -Steve<br>
<br>
<br>
</div></div></blockquote></div><br></div>