<div dir="ltr">Perhaps this is of use. My goal was to restrict audit logs to outbound connections only to reduce the amount of logs.<br><br># Outbound connections could indicate exfiltration of data (connect vs accept)<br># Log 64 bit processes (a2!=6e filters local unix socket calls)<div><br>-a exit,always -F arch=b64 -S connect -F a2!=110 -k network_outbound64</div><div><br># Log 32 bit processes (a0=3 means only outbound sys_connect calls)</div><div><br>-a exit,always -F arch=b32 -S socketcall -F a0=3 -k network_outbound32</div><div><br></div><div><br></div><div>-Farhan</div><div><br></div><div>PS: I'd appreciate if someone could poke holes in this.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 20, 2016 at 10:29 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, January 20, 2016 10:18:29 AM Steve Grubb wrote:<br>
> > I work on an audisp plugin which audits network traffic – what process<br>
> > has send/received data to/from what remote address. So far I see 2 ways<br>
> > of accomplishing that:<br>
> ><br>
> > Hook syscalls. First, hook socket call with af_inet/inet6 to get pid and<br>
> > fd, then read/write/sendto/recvfrom filtered by pid and fd<br>
<br>
</span>One other thing, read and write will tell you that a read or write happened.<br>
It does not record what was read or written. If you need that, you will have<br>
to sniff network traffic. Audit won't be able to help much.<br>
<div class="HOEnZb"><div class="h5"><br>
-Steve<br>
<br>
--<br>
Linux-audit mailing list<br>
<a href="mailto:Linux-audit@redhat.com">Linux-audit@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-audit" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/linux-audit</a></div></div></blockquote></div><br></div>