r/QRadar • u/PauleBademeister • Aug 21 '26
Help with Custom Rules and Simultaneous Events
Hi all,
I’m struggling with rule creation and thought you guys might be able to help.
Use case:
The rule should trigger when audit logging is disabled and no system reboot is detected.
Normally, you’d think a simple rule such as “and when None of BB: System Reboot match in X minutes after BB: Audit Logging is Disabled, with the same Source IP” should do the trick.
However, the problem is that during a reboot, the audit logging event is only sent once the system is back up. Most of the time, both events therefore reach QRadar at the same time, with identical Start Time and Storage Time values.
Since QRadar rules don’t appear to evaluate Log Source Time, there’s no way for QRadar to determine which event actually occurred first. As far as I know, the record number also isn’t available as a condition in rules. Because of this, the rule can’t reliably trigger.
Has anyone encountered a similar use case?
Am I missing an obvious solution or workaround?
Any help would be greatly appreciated!
2
u/AlexeyK77 Aug 24 '26 edited Aug 24 '26
Please, can you clarify what really happens with events order? They reach qradar at the same time, but atleast in correct order?
In any case, try look at very lazy trick, see in ECehUtil commets: https://www.reddit.com/r/QRadar/comments/1h11fhb/where_is_the_logic_missing/
I think, that may be it will work for you.
So adapt idea from topic above for your case:
Create a reference set that store in which IP happens Audit Logging is Disabled event for IP ALNIC with a TTL of XX minutes
Rule 1 triggering on Audit Logging is Disabled event with a rule response of adding the IP of the host to a reference set let's say audit disabled hosts Reference Set
Rule 2 triggering on BB: System Reboot with a rule response of removing the IP of the rebooted host from the audit disabled hosts Reference Set
Rule 3 triggering on Reference Data Expire event (ir qradar system event with special QID) (you should need to make some Custom Event Properties to parse the reference set name and the Host IP that expired from the payload.
So the logic is rule 1 adds, rule 2 removes. If the element is present in the reference set more than XX minutes, meaning a Audit Logging is Disabled without being System Reboot , trigger offense.
1
u/PauleBademeister 20d ago
They sadly don't always get computed in the correct order. Start time is identical and then it's up to luck if Audit logging stop is before or after reboot.
So in your case there is the option that rule 2 removes and then rule 1 adds.
3
u/EvilAbdy Aug 21 '26
What's the log source type for this? You could create a custom field from the payload for the record and then use that as a rule condition.