Hello Wazuh Team,
I am currently working on creating rules to segregate desktop logon events for real users and machine accounts in Wazuh.
Here is the scenario:
I have a base rule (ID: 100810) that successfully triggers on all 4624 desktop logon events.
From the events triggered by 100810, I receive two types of usernames:
Machine accounts – usernames ending with $ (e.g., SERVER01$)
Real user accounts – standard usernames (e.g., John.Doe or DOMAIN\Jane)
My goal is to create separate rules to identify:
Machine account logons
Real user logons
I have attempted the following rules:
<!-- REAL USER logon --> <rule id="100813" level="16"> <if_sid>100810</if_sid> <field name="win.eventdata.targetUserName">^(?!.*\$).+$</field> <description>Successful desktop logon by user $(win.eventdata.targetUserName) from $(win.eventdata.ipAddress)</description> </rule> <!-- MACHINE ACCOUNT logon --> <rule id="100814" level="10"> <if_sid>100810</if_sid> <field name="win.eventdata.targetUserName">.+\$$</field> <description>Machine account logon by $(win.eventdata.targetUserName) from $(win.eventdata.ipAddress)</description> </rule>
However, these rules are not triggering separately, and I am unable to properly segregate machine accounts from real user accounts.
Could someone guide me on how to correctly implement rules to separate usernames ending with $ from regular usernames in Wazuh?
Thank you for your help!