On Mon, Oct 27, 2014 at 8:34 PM, Brian <
ke...@myschatz.net> wrote:
> From what I can tell, and I am doing this correctly. here is the log for
> event ID 5145. . I did run ./ossec-logtest , I placed "
> WinEvtLog: Security: AUDIT_SUCCESS(5145)" and it took me to Rule 18100 and
> not 19000.
> below I have my log, rules and logtest
>
> Log:
>
> 2014 Oct 27 14:16:54 (WinClient) 10.10.10.67->WinEvtLog 2014 Oct 27 14:17:07
> WinEvtLog: Security: AUDIT_SUCCESS(5145):
> Microsoft-Windows-Security-Auditing: (no user): no domain:
> WinClient.Domain.Local: S-1-5-21-3748380571-1685127485-3479259990-2707
> User01 Domain 0xbe810a File 10.5.5.8 51134 \\*\IPC$ srvsvc 0x12019f %%1538
> %%1541
> %%4416
> %%4417
> %%4418
> %%4419
> %%4420
> %%4423
> %%4424
>
I don't know enough about the Windows stuff to know why all of these
are being presented on their own lines and whatnot.
Running everything up until the first newline through ossec-logtest
gives me the following output (Removing everything between the
beginning of the line and 2014 because that should be an OSSEC header
added to the archives.log entries):
[root@localhost ddp]# cat /tmp/xxx
2014 Oct 27 14:17:07 WinEvtLog: Security: AUDIT_SUCCESS(5145):
Microsoft-Windows-Security-Auditing: (no user): no domain:
WinClient.Domain.Local: S-1-5-21-3748380571-1685127485-3479259990-2707
User01 Domain 0xbe810a File 10.5.5.8 51134 \\*\IPC$ srvsvc 0x12019f
%%1538
[root@localhost ddp]# cat /tmp/xxx | /var/ossec/bin/ossec-logtest
2014/10/28 09:30:41 ossec-testrule: INFO: Reading local decoder file.
2014/10/28 09:30:41 ossec-testrule: INFO: Started (pid: 6981).
ossec-testrule: Type one log per line.
**Phase 1: Completed pre-decoding.
full event: '2014 Oct 27 14:17:07 WinEvtLog: Security:
AUDIT_SUCCESS(5145): Microsoft-Windows-Security-Auditing: (no user):
no domain: WinClient.Domain.Local:
S-1-5-21-3748380571-1685127485-3479259990-2707 User01 Domain 0xbe810a
File 10.5.5.8 51134 \\*\IPC$ srvsvc 0x12019f %%1538'
hostname: 'localhost'
program_name: '(null)'
log: '2014 Oct 27 14:17:07 WinEvtLog: Security:
AUDIT_SUCCESS(5145): Microsoft-Windows-Security-Auditing: (no user):
no domain: WinClient.Domain.Local:
S-1-5-21-3748380571-1685127485-3479259990-2707 User01 Domain 0xbe810a
File 10.5.5.8 51134 \\*\IPC$ srvsvc 0x12019f %%1538'
**Phase 2: Completed decoding.
decoder: 'windows'
status: 'AUDIT_SUCCESS'
id: '5145'
extra_data: 'Microsoft-Windows-Security-Auditing'
dstuser: '(no user)'
system_name: 'WinClient.Domain.Local'
**Phase 3: Completed filtering (rules).
Rule id: '18104'
Level: '0'
Description: 'Windows audit success event.'
So the id is decoded. And this rule successfully captures that log message:
<rule id="300001" level="6">
<if_sid>18104</if_sid>