All of lore.kernel.org
 help / color / mirror / Atom feed
* Filtering Connect syscalls for af_inet only
@ 2015-02-03 22:57 F Rafi
  2015-02-03 23:21 ` Peter Moody
  0 siblings, 1 reply; 12+ messages in thread
From: F Rafi @ 2015-02-03 22:57 UTC (permalink / raw)
  To: linux-audit


[-- Attachment #1.1: Type: text/plain, Size: 1543 bytes --]

Hi folks,

<n00b alert>

I have auditing for outbound connect requests working using the Connect
(sys_connect) syscall on a server running *Ubuntu precise 12.04 LTS*.

The rule I'm using is:

-a exit,always -F arch=b64 -S connect -k network_outbound



I'm getting a substantial amount of saddr=0100.... logs, which I understand
are not  connections to a remote host but rather a local AF_UNIX socket
pointing to a file. Example log message is:



type=SYSCALL msg=audit(1423002916.796:24545371): arch=c000003e syscall=42
> success=no exit=-2 a0=294 a1=7fff97f62680 a2=6e a3=7fff97f62860 items=0
> ppid=20546 pid=21439 auid=4294967295 uid=33 gid=33 euid=33 suid=33 fsuid=33
> egid=33 sgid=33 fsgid=33 tty=(none) ses=4294967295 comm="apache2"
> exe="/usr/lib/apache2/mpm-prefork/apache2" key="network_outbound"

type=SOCKADDR msg=audit(1423002916.796:24545371): *saddr=0100*<truncated to
> remove the hex-encoded file path>


Is there an easy way to filter these out so that we only have saddr=0200...
messages left?

I'm exporting the log to an external syslog server and it would help
considerably if I could eliminate this from all of our servers.

I see that auditctl has a *filetype* filter which can be set to filter
*socket* or *file* types. Is that the right way to filter these messages?

-a exit,always -F arch=b64 -F filetype=socket -S connect -k network_outbound


The above rule filters out everything but the af_unix connect syscalls,
which is the opposite of what I'm looking for.

Any help would be appreciated.

Thanks,
Farhan

[-- Attachment #1.2: Type: text/html, Size: 2756 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-02-05 20:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 22:57 Filtering Connect syscalls for af_inet only F Rafi
2015-02-03 23:21 ` Peter Moody
2015-02-03 23:24   ` F Rafi
2015-02-03 23:53     ` F Rafi
2015-02-05  1:19       ` F Rafi
2015-02-05 14:39         ` Paul Moore
2015-02-05 15:31           ` F Rafi
2015-02-05 15:38             ` Paul Moore
2015-02-05 19:06               ` F Rafi
2015-02-05 20:16                 ` Paul Moore
2015-02-05 20:26                 ` Hassan Sultan
2015-02-05 20:34                   ` Paul Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.