Thank you for your answer,
I have deepened the decoders and the ruels and now I have a clearer functioning. Let me explain my situation: I currently have a windows domain controller sending security related logs to Wazuh. Wazuh already has a 0580-win-security_rules.xml rule and decoder to capture these events and I see everything being captured in the default /var/ossec/logs/alerts.json file. Of this multitude of events I would like to filter some, a subcategory of windows security events (a subpart) and create an alert_custom.json file. For example an event looks like this:
"timestamp": "2023-07-06T12:53:41.257+0000",
"rules": {
"levels": 3,
"description": "Windows User Logoff.",
"id": "60137",
"firedtimes": 146,
"mail": false,
"groups": [
"windows",
"windows_security"
],
"gdpr": [
"IV_32.2"
],
"hipaa": [
"164.312.b"
],
"nist_800_53": [
"AC.7",
"AU.14"
],
"pci_dss": [
"10.2.5"
],
"tsc": [
"CC6.8",
"CC7.2",
"CC7.3"
]
},
"agent": {
"id": "001",
"name": "W2019S-SIE-DC01",
"ip": "10.0.6.30"
},
"managers": {
"name": "wazuh-server"
},
"id": "1688648021.198507493",
"decoders": {
"name": "windows_eventchannel"
},
"date": {
"win": {
"system": {
"providerName": "Microsoft-Windows-Security-Auditing",
"providerGuid": "{54849625-5478-4994-a5ba-3e3b0328c30d}",
"eventID": "4634",
"version": "0",
"level": "0",
"tasks": "12545",
"opcode": "0",
"keywords": "0x8020000000000000",
"systemTime": "2023-07-06T12:49:40.381476200Z",
"eventRecordID": "11597720",
"processID": "776",
"threadID": "2380",
"channel": "Security",
"computer": "W2019S-SIE-DC01.domainxxx.local",
"severityValue": "AUDIT_SUCCESS",
"message": "\"An account has been disconnected.\r\n\r\nSubject:\r\n\tSecurity ID:\t\tS-1-5-21-3695727019-3691295661-1291628153-1118\r \n\tAccount name:\t\tmario.rossi\r\n\tAccount domain:\t\tdomainname\r\n\tLogin ID:\t\t0x61B3209C\r\n\r\nLogin type:\t\ t\t3\r\n\r\nThis event is generated when a login session is dropped. It can be positively correlated with a login event through the Login ID value. Login IDs are unique only across restarts on the same computer.\""
},
"eventdata": {
"targetUserSid": "S-1-5-21-3695727019-3691295661-1291628153-1118",
"targetUserName": "Mario.Rossi",
"targetDomainName": "DomainXXX",
"targetLogonId": "0x61b3209c",
"logonType": "3"
}
}
},
"location": "EventChannel"
}
which concerns the logoff action of the user Mario Rossi. For example, I would like my custom_alert.json file to capture only Mario Rossi's logoffs and logons.
Is this possible?
Thank you
jk