Hello,
I would like to monitor all security events from EventLog, but in Wazuh manager I can only see few of them 4634 and 4624. But in Windows EventLog I can see more, i.e. 6272.
I made rules for 6272 and wazuh logtest for event 6272 works ok.
Starting wazuh-logtest v4.8.0
Type one log per line
{"win":{"system":{"providerName":"Microsoft-Windows-Security-Auditing","providerGuid":"{54849625-5478-4994-A5BA-3E3B0328C30D}","eventID":"6272","version":"1","level":"0","task":"12552","opcode":"0","keywords":"0x8020000000000000","systemTime":"2019-10-03T14:23:41.073661300Z","eventRecordID":"39507771","processID":"672","threadID":"5748","channel":"Security","computer":"ithvbotp1op01","severityValue":"AUDIT_SUCCESS","message":"Network Policy Server granted access to a user."},"eventdata":{"subjectUserSid":"S-1-0-0","subjectUserName":"vi1cb17","subjectMachineSID":"S-1-0-0","nASIPv4Address":"10.201.19.44","clientName":"Smart_1_VPN","clientIPAddress":"10.201.166.21","proxyPolicyName":"Use Windows authentication for all users","authenticationProvider":"<none>","authenticationServer":"ithvbotp1op01","authenticationType":"Extension","loggingResult":"Accounting information was written to the local log file."}}}
**Phase 1: Completed pre-decoding.
full event: '{"win":{"system":{"providerName":"Microsoft-Windows-Security-Auditing","providerGuid":"{54849625-5478-4994-A5BA-3E3B0328C30D}","eventID":"6272","version":"1","level":"0","task":"12552","opcode":"0","keywords":"0x8020000000000000","systemTime":"2019-10-03T14:23:41.073661300Z","eventRecordID":"39507771","processID":"672","threadID":"5748","channel":"Security","computer":"ithvbotp1op01","severityValue":"AUDIT_SUCCESS","message":"Network Policy Server granted access to a user."},"eventdata":{"subjectUserSid":"S-1-0-0","subjectUserName":"vi1cb17","subjectMachineSID":"S-1-0-0","nASIPv4Address":"10.201.19.44","clientName":"Smart_1_VPN","clientIPAddress":"10.201.166.21","proxyPolicyName":"Use Windows authentication for all users","authenticationProvider":"<none>","authenticationServer":"ithvbotp1op01","authenticationType":"Extension","loggingResult":"Accounting information was written to the local log file."}}}'
**Phase 2: Completed decoding.
name: 'json'
win.eventdata.authenticationProvider: '<none>'
win.eventdata.authenticationServer: 'ithvbotp1op01'
win.eventdata.authenticationType: 'Extension'
win.eventdata.clientIPAddress: '10.201.166.21'
win.eventdata.clientName: 'Smart_1_VPN'
win.eventdata.loggingResult: 'Accounting information was written to the local log file.'
win.eventdata.nASIPv4Address: '10.201.19.44'
win.eventdata.proxyPolicyName: 'Use Windows authentication for all users'
win.eventdata.subjectMachineSID: 'S-1-0-0'
win.eventdata.subjectUserName: 'vi1cb17'
win.eventdata.subjectUserSid: 'S-1-0-0'
win.system.channel: 'Security'
win.system.computer: 'ithvbotp1op01'
win.system.eventID: '6272'
win.system.eventRecordID: '39507771'
win.system.keywords: '0x8020000000000000'
win.system.level: '0'
win.system.message: 'Network Policy Server granted access to a user.'
win.system.opcode: '0'
win.system.processID: '672'
win.system.providerGuid: '{54849625-5478-4994-A5BA-3E3B0328C30D}'
win.system.providerName: 'Microsoft-Windows-Security-Auditing'
win.system.severityValue: 'AUDIT_SUCCESS'
win.system.systemTime: '2019-10-03T14:23:41.073661300Z'
win.system.task: '12552'
win.system.threadID: '5748'
win.system.version: '1'
**Phase 3: Completed filtering (rules).
id: '60598'
level: '4'
description: 'OTP Used - Auth Sucessful'
groups: '['windows', 'windows_security', 'ipsec']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
But I suppose, that any 6272 event doesn't arrive from agent to manager.
This shows nothing
tail -f /var/ossec/logs/alerts/alerts.log | grep eventID\"\:\"6272\"
but on the Windows server the event is generated.
In the ossec.conf on the agent I tried this:
<localfile>
<location>Security</location>
<log_format>eventchannel</log_format>
</localfile>
and this:
<localfile>
<location>Security</location>
<log_format>eventchannel</log_format>
<query>Event/System[EventID != 5145 and EventID != 5156 and EventID != 5447 and
EventID != 4656 and EventID != 4658 and EventID != 4663 and EventID != 4660 and
EventID != 4670 and EventID != 4690 and EventID != 4703 and EventID != 4907 and
EventID != 5152 and EventID != 5157]</query>
</localfile>
But still I can only see on the manager events 4634 and 4624.
Could you please help me, what is the correct configuration for Windows agent to collect all or more events than two?
Thank you.
Best regards,
V.