我写了一条规则,用“密码失败”来警告 ssh 事件。这条规则在这里:
rule "Hello World"
when
accumulate(m:Message(eventType=="Failed password") over window:time( 59s );s:count(m);s>3)
then
System.out.println( "success" );
Alert alert=new Alert("ssh","test");
insert(alert);
end
这适用于第一种情况。但我想扩展这条规则。我想为具有相同 Src_ip 地址的“密码失败”累积 ssh 事件。例如,如果我在 59 秒内从三个不同的 src_ip 有 4 个失败的密码 ssh 事件,则规则不匹配,但是当我在 59 秒内从一个 src_ip 有 4 个失败的密码 ssh 事件时,规则匹配。我应该如何为这种情况重写这个规则。