我正在研究logalyze,这个工具的文档非常有限。我已经完成了大部分工作,但无法添加警报。
以下是事件定义的示例xml文件
<?xml version="1.0" encoding="UTF-8"?>
<tns:definitions xmlns:tns="http://logalyze.com" xmlns:xsi="http://www.w3.org /2001/XMLSchema-instance" xsi:schemaLocation="http://logalyze.com http://repository.logalyze.com/logalyze-definitions-1.0.xsd ">
<tns:eventdef version="1" id="a4151076-152c-11e1-91a4-0018de9d251b">
<tns:name>Critical event Mod Sec</tns:name>
<tns:description>Mod Sec</tns:description>
<tns:vendor>LOGalyze</tns:vendor>
<tns:group></tns:group>
<tns:rule>SingleWithThreshold</tns:rule>
<tns:criteria>
<tns:criterion>
<tns:field>_tag</tns:field>
<tns:operator>=</tns:operator>
<tns:value>mod_sec_warn</tns:value>
</tns:criterion>
</tns:criteria>
<tns:desc>3 login failures within 1m for user ${user_name}</tns:desc>
<tns:window>60</tns:window>
<tns:thresh>3</tns:thresh>
<tns:actions>
<tns:action type="event">
<tns:prop>
<tns:key>field:msg</tns:key>
<tns:value>3 login failures within 1m for user ${user_name}</tns:value>
</tns:prop>
<tns:prop>
<tns:key>field:user_name</tns:key>
<tns:value/>
</tns:prop>
<tns:prop>
<tns:key>field:loghostname</tns:key>
<tns:value/>
</tns:prop>
<tns:prop>
<tns:key>field:_priority</tns:key>
<tns:value>high</tns:value>
</tns:prop>
</tns:action>
</tns:actions>
</tns:eventdef>
</tns:definitions>
谢谢Infosec.pk
所以我应该增强这个文件:-)
您有一个类型为"event"的Action。这会生成一个人工日志条目,其中包含属性列表中字段nem/value对的logtype事件(msg、user_name、loghostname、_priority)。这种类型的日志可以被搜索,并且可以是任何其他事件定义的输入。
若要发送警报,您必须使用操作类型"mail"。"邮件"操作的属性为:
- 收件人:电子邮件地址
- subject:Defaule值为:'LOGalyze alert'
邮件正文的内容将由LOGalyze生成,目前无法修改。