阈值规则
阈值规则使您能够在给定时间段内发生定义数量的检测时创建事件。要查看整个阈值规则的外观,请参阅阈值规则示例主题。
定义
阈值规则定义为 <threshold threshold="3" interval="10m">
threshold 参数用于指定触发检测所需的最小次数,达到该次数后才会创建事件。
interval 参数用于发生检测的时间间隔,达到该间隔后才会创建事件。阈值规则会将所有符合条件且发生在该时间间隔内的检测纳入事件中。
如果事件创建后仍收到符合条件且在该时间间隔内的其他检测,事件将被更新以包含这些新检测。
时间间隔的可能格式为:
•d - 天
•h - 小时
•m - 分钟
•s - 秒
•ms - 毫秒
•us - 微秒
检测定义
<definition> <process> <operator type="or"> <condition component="FileItem" property="FileName" condition="is" value="notepad.exe"/> <condition component="FileItem" property="FileName" condition="is" value="cmd.exe"/> </operator> </process>
<operations> <operation type="Detection"> <operator type="or"> <condition component="InspectDetection" property="RuleName" condition="contains" value="PB000"/> <condition component="InspectDetection" property="RuleName" condition="contains" value="PB001"/> </operator> </operation> </operations>
</definition> |
在检测定义中,您可以使用 operations、process 和 parentprocess 标签来指定创建事件的条件。这部分并不特定于阈值规则,而是与其他任何规则定义一样进行评估。
被评估的检测始终在 operations 部分中指定,该部分可包含 InspectDetection 和 Endpoint 组件。
在阈值规则的这部分中,唯一有意义的操作符是 or。
AggregateOn
<aggregateOn> <property name="ParentProcess"/> </aggregateOn> |
AggregateOn 是可选的。此标签允许您根据 used 属性聚合检测。所有类型的聚合都意味着计算机聚合。例如,如果使用 process,则仅会评估来自同一台计算机和同一进程的检测。
可能的值为:
•计算机
•进程
•ParentProcess
Cardinality
<cardinality> <property name="ruleName" value="2" /> </cardinality> |
Cardinality 是可选的。它会检查检测中的唯一性。在上述示例中,要使阈值规则触发,必须存在来自至少两个不同规则名称的检测。
可能的值为:
•computerName
•ruleName
操作
<actions> <action name="ReportIncident" /> </actions> |
ReportIncident 是唯一支持的操作。如果未指定相应操作,阈值规则将不会创建或更新事件。在阈值规则中,除 name 外的参数(如 aggregateOn 和 aggregationParameter)将被忽略。
到期时间
服务器可能会在稍后接收到旧的检测数据,并需要将其添加到正确的事件中(如果存在)。由于不需要评估旧检测,过期时间默认设置为 24 小时。该值可以在 .ini 文件中通过 Server.EirExpirationInterval 进行修改。
如果检测早于 EirExpirationInterval,它将不会被评估。
如果事件早于 EirExpirationInterval,则不会再添加新的检测记录。