Customizing to Wazuh Notications

220 views
Skip to first unread message

Martin Gluckman

unread,
Aug 10, 2022, 4:20:03 PM8/10/22
to Wazuh mailing list
Hi All,

What is the best way to customise the Wazuh notifications currently we have:

Subject: Wazuh notification - (MOUSE2) any - Alert level 12

Body:

(obfuscated)

Wazuh Notification.

2022 Aug 10 19:56:29


Received From: (MICKEYMOUSErd2) any->EventChannel

Rule: 100002 fired (level 12) -> "Windows Administrator Logon Success."

Portion of the log(s):


{"win":{"system":{"providerName":"Microsoft-Windows-Security-Auditing","providerGuid":"{54849625-5478-4994-A5BA-3E3B0328C30D}","eventID":"4624","version":"2","level":"0","task":"12544","opcode":"0","keywords":"0x8020000000000000","systemTime":"2022-08-10T19:55:40.056518200Z","eventRecordID":"56616016","processID":"748","threadID":"25492","channel":"Security","computer":"MICKEYMOUSErd2.MICKEYMOUSEfirma.local","severityValue":"AUDIT_SUCCESS","message":"\"An account was successfully logged on.\r\n\r\nSubject:\r\n\tSecurity ID:\t\tS-1-5-18\r\n\tAccount Name:\t\tMICKEYMOUSERD2$\r\n\tAccount Domain:\t\tMICKEYMOUSEFIRMA\r\n\tLogon ID:\t\t0x3E7\r\n\r\nLogon Information:\r\n\tLogon Type:\t\t10\r\n\tRestricted Admin Mode:\tNo\r\n\tVirtual Account:\t\tNo\r\n\tElevated Token:\t\tNo\r\n\r\nImpersonation Level:\t\tImpersonation\r\n\r\nNew Logon:\r\n\tSecurity ID:\t\tS-1-5-21-190720593-629333342-573016489-1003\r\n\tAccount Name:\t\tDonaldduck\r\n\tAccount Domain:\t\tMICKEYMOUSEFIRMA\r\n\tLogon ID:\t\t0x11EB64980\r\n\tLinked Logon

 ID:\t\t0x11EB64966\r\n\tNetwork Account Name:\t-\r\n\tNetwork Account Domain:\t-\r\n\tLogon GUID:\t\t{00000000-0000-0000-0000-000000000000}\r\n\r\nProcess Information:\r\n\tProcess ID:\t\t0x370\r\n\tProcess Name:\t\tC:\\Windows\\System32\\svchost.exe\r\n\r\nNetwork Information:\r\n\tWorkstation Name:\tMICKEYMOUSERD2\r\n\tSource Network Address:\t100.96.2.33\r\n\tSource Port:\t\t0\r\n\r\nDetailed Authentication Information:\r\n\tLogon Process:\t\tUser32 \r\n\tAuthentication Package:\tNegotiate\r\n\tTransited Services:\t-\r\n\tPackage Name (NTLM only):\t-\r\n\tKey Length:\t\t0\r\n\r\nThis event is generated when a logon session is created. It is generated on the computer that was accessed.\r\n\r\nThe subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.\r\n\r\nThe logon type field indicates the kind of logon that occurred. The most common types ar

 e 2 (interactive) and 3 (network).\r\n\r\nThe New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.\r\n\r\nThe network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.\r\n\r\nThe impersonation level field indicates the extent to which a process in the logon session can impersonate.\r\n\r\nThe authentication information fields provide detailed information about this specific logon request.\r\n\t- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.\r\n\t- Transited services indicate which intermediate services have participated in this logon request.\r\n\t- Package name indicates which sub-protocol was used among the NTLM protocols.\r\n\t- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.\""},"eventdata":{"subjectUserSid":"S-1-5-18","subjectUser

 Name":"MICKEYMOUSERD2$","subjectDomainName":"MICKEYMOUSEFIRMA","subjectLogonId":"0x3e7","targetUserSid":"S-1-5-21-190720593-629333342-573016489-1003","targetUserName":"Donaldduck","targetDomainName":"MICKEYMOUSEFIRMA","targetLogonId":"0x11eb64980","logonType":"10","logonProcessName":"User32","authenticationPackageName":"Negotiate","workstationName":"MICKEYMOUSERD2","logonGuid":"{00000000-0000-0000-0000-000000000000}","keyLength":"0","processId":"0x370","processName":"C:\\\\Windows\\\\System32\\\\svchost.exe","ipAddress":"100.96.2.33","ipPort":"0","impersonationLevel":"%%1833","restrictedAdminMode":"%%1843","virtualAccount":"%%1843","targetLinkedLogonId":"0x11eb64966","elevatedToken":"%%1843"}}}

win.system.providerName: Microsoft-Windows-Security-Auditing

win.system.providerGuid: {54849625-5478-4994-A5BA-3E3B0328C30D}

win.system.eventID: 4624

win.system.version: 2

win.system.level: 0

win.system.task: 12544

win.system.opcode: 0

win.system.keywords: 0x8020000000000000

win.system.systemTime: 2022-08-10T19:55:40.056518200Z

win.system.eventRecordID: 56616016

win.system.processID: 748

win.system.threadID: 25492

win.system.channel: Security

win.system.computer: MICKEYMOUSErd2.MICKEYMOUSEfirma.local

win.system.severityValue: AUDIT_SUCCESS

win.system.message: "An account was successfully logged on.


Subject:

    Security ID:        S-1-5-18

    Account Name:        MICKEYMOUSERD2$

    Account Domain:        MICKEYMOUSEFIRMA

    Logon ID:        0x3E7


Logon Information:

    Logon Type:        10

    Restricted Admin Mode:    No

    Virtual Account:        No

    Elevated Token:        No


Impersonation Level:        Impersonation


New Logon:

    Security ID:        S-1-5-21-190720593-629333342-573016489-1003

    Account Name:        Donaldduck

    Account Domain:        MICKEYMOUSEFIRMA

    Logon ID:        0x11EB64980

    Linked Logon ID:        0x11EB64966

    Network Account Name:    -

    Network Account Domain:    -

    Logon GUID:        {00000000-0000-0000-0000-000000000000}


Process Information:

    Process ID:        0x370

    Process Name:        C:\Windows\System32\svchost.exe


Network Information:

    Workstation Name:    MICKEYMOUSERD2

    Source Network Address:    100.96.2.33

    Source Port:        0


Detailed Authentication Information:

    Logon Process:        User32

    Authentication Package:    Negotiate

    Transited Services:    -

    Package Name (NTLM only):    -

    Key Length:        0


This event is generated when a logon session is created. It is generated on the computer that was accessed.


The subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.


The logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).


The New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.


The network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.


The impersonation level field indicates the extent to which a process in the logon session can impersonate.


The authentication information fields provide detailed information about this specific logon request.

    - Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.

    - Transited services indicate which intermediate services have participated in this logon request.

    - Package name indicates which sub-protocol was used among the NTLM protocols.

    - Key length indicates the length of the generated session key. This will be 0 if no session key was requested."

win.eventdata.subjectUserSid: S-1-5-18

win.eventdata.subjectUserName: MICKEYMOUSERD2$

win.eventdata.subjectDomainName: MICKEYMOUSEFIRMA

win.eventdata.subjectLogonId: 0x3e7

win.eventdata.targetUserSid: S-1-5-21-190720593-629333342-573016489-1003

win.eventdata.targetUserName: Donaldduck

win.eventdata.targetDomainName: MICKEYMOUSEFIRMA

win.eventdata.targetLogonId: 0x11eb64980

win.eventdata.logonType: 10

win.eventdata.logonProcessName: User32

win.eventdata.authenticationPackageName: Negotiate

win.eventdata.workstationName: MICKEYMOUSERD2

win.eventdata.logonGuid: {00000000-0000-0000-0000-000000000000}

win.eventdata.keyLength: 0

win.eventdata.processId: 0x370

win.eventdata.processName: C:\\Windows\\System32\\svchost.exe

win.eventdata.ipAddress: 100.96.2.33

win.eventdata.ipPort: 0

win.eventdata.impersonationLevel: %%1833

win.eventdata.restrictedAdminMode: %%1843

win.eventdata.virtualAccount: %%1843

win.eventdata.targetLinkedLogonId: 0x11eb64966

win.eventdata.elevatedToken: %%1843


---

How do we customise this and make it more user friendly and simple ?

Thank you!

Martin



 --END OF NOTIFICATION





Delfina Lizarralde Bressan

unread,
Aug 10, 2022, 5:01:16 PM8/10/22
to Wazuh mailing list
Hi Martin! 
Thanks for using Wazuh.

This capability is hard coded into the system and although you can modify the sender and recipient as well as the criteria to send the alerts, you cannot modify the message within.

Alternatively, you can use a custom integration (I recommend you to have a look at this blogpost) and use a python script that gets the alerts and send them.

Hope you find this information useful.
Regards.

Reply all
Reply to author
Forward
0 new messages