Date: Sun, 6 Jan 2013 23:25:16 +0100 From: Patrick Proniewski <patpro@patpro.net> To: Mike Tancsa <mike@sentex.net> Cc: "freebsd-security@freebsd.org" <freebsd-security@freebsd.org> Subject: Re: audit events confusion Message-ID: <27758D4F-14E0-4BEB-AF89-E78D75FD89D7@patpro.net> In-Reply-To: <50E9F6A8.5050502@sentex.net> References: <50E9F6A8.5050502@sentex.net>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 06 janv. 2013, at 23:11, Mike Tancsa wrote:
> But if I make a simple php script to try and connect out, again, pflog0
> blocks it and logs it, but it does not show up in the audit logs
>
> 17:07:46.518501 rule 433/0(match): block out on em0: 64.7.xx.xx.36528 >
> 8.8.8.8.25: Flags [S], seq 1724105073, win 65535, options [mss
> 1460,nop,wscale 3,sackOK,TS val 177324430 ecr 0], length 0
>
> Any idea what I am missing ?
I think auditd can catch events only for users that have logged in at least once. To audit Apache, I've had to install setaudit and launch httpd process by using setaudit with proper flags.
I've modified my /usr/local/etc/rc.d/apache22 file, mainly changing the start command to start_cmd="apache22_auditstart" and adding the proper command definition:
apache22_auditstart() {
echo "Starting apache22 with audit"
eval /usr/local/sbin/setaudit ${apache22_auditflags} ${command} ${apache22_flags} -k start
}
In /etc/rc.conf, I've added:
apache22_auditflags="-a www -m ex,lo,ad,-pc,fd,-fc,-fm,-fw"
I'm then able to log audit events for Apache, according to flags I've set in apache22_auditflags.
hope this helps,
patpro
[-- Attachment #2 --]
0 *H
010 + 0 *H
M0400
*H
0}10 UIL10U
StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z010 UIL10U
StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0"0
*H
0
-).2AUGo#G
B|NDRpM-B=o-we5JQpa>O.#._<V
[~**pz~3WG .ᘟMlr[<Ce6fqO"uxfWN#uicgkv$Lb%y`_{`xK'GN 00U00U0USr풜\|~5NԸQ0U#0N@[i04hCA0f+Z0X0'+0http://ocsp.startssl.com/ca0-+0!http://www.startssl.com/sfsca.crt0[UT0R0'%#!http://www.startssl.com/sfsca.crl0'%#!http://crl.startssl.com/sfsca.crl0U y0w0u+70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
*H
}x,\c^#wMq}>UK/^yX֏y frMIŲB61ymQҨݬZ0&