We are trying to build a esa rule named
Compliance - Windows - WinAdmCSI Logins
We want this rule to fire each time a Windows administrator logs in during not working hours.
This is the syntax of our rule:
@RSAAlert()
create context NotWorkingHours start (0, 18, *, *, *) end (0, 9, *, *, *);
context NotWorkingHours
SELECT * FROM
Event(
(user_dst .toLowerCase() LIKE '%adm')
AND device_type IN ( 'winevent_nic' )
AND reference_id IN ( '4624')
);
It appears that this rule does not match any event (as you can see in the attachment). Can you please explain us why? Are there any mistakes in context definition?
Thanks in advance
Csi Piemonte D-Soc
I believe the main issue is that you need to use
...instead of
A couple references on the topic:
Also, you may find it useful to refine your context to account for weekends and different timezones. For instance, your context:
treats every day of the week exactly the same....and creates your context in UTC.
Instead, we can create context like this:
HTH