I need to create an exclusion setting based on the values of multiple fields in a YARA-L rule.
I've been trying and erroring using a data table, but I'm not getting anywhere so I'd appreciate any advice.
○What I want to do
If principal.user.email_addresses is aaa@sample.com and principal.ip is x.x.x.x, do not send an alert.
(I want these two fields to be an and condition, not an or condition)
If this cannot be done with a data table, could you tell me if there is another way to do it?
I look forward to your reply.
rule sample_rule {
meta:
author = "sample"
description = "testrule"
severity = "MEDIUM"
events:
$e.metadata.log_type = "GCP_CLOUDAUDIT"
($e.principal.user.email_addresses != %sample_rule.useremailaddresses or $e.principal.ip != %sample_rule.ip)
$user_id_for_match = $e.principal.user.userid
match:
$user_id_for_match over 1h
condition:
$e
}


