Ant*_*sov 10 linux security intrusion-detection
我有标准的syslog_rules.xml(OSSEC 2.6.0).这是/var/log/messages文件中坏词的标准规则:
<var name="BAD_WORDS">core_dumped|failure|error|attack|bad |illegal |denied|refused|unauthorized|fatal|failed|Segmentation Fault|Corrupted</var>
.....
<rule id="1002" level="2">
<match>$BAD_WORDS</match>
<options>alert_by_email</options>
<description>Unknown problem somewhere in the system.</description>
</rule>
.....
Run Code Online (Sandbox Code Playgroud)
如何添加或修改使用$BAD_WORDS但不包括该auxpropfunc error短语的规则?就是这样的:
<match>$BAD_WORDS</match>
<match>!auxpropfunc error</match>
<options>alert_by_email</options>
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
小智 11
您最好的选择可能是编写一条规则来忽略该短语.您可以添加以下内容/var/ossec/rules/local_rules.xml:
<rule id="SOMETHING" level="0">
<if_sid>1002</if_sid>
<match>auxpropfunc error</match>
<description>Ignore auxpropfunc error.</description>
</rule>
Run Code Online (Sandbox Code Playgroud)
然后,您可以通过ossec-logtest运行整个日志消息,以查看OSSEC将如何分析它.您可能需要在此规则中添加其他选项,或者您可能不需要.
小智 6
如果您有多个单词,可以在/var/ossec/rules/local_rules.xml中添加如下内容
<var name="GOOD_WORDS">error_reporting|auxpropfunc error</var>
<rule id="100002" level="0">
<if_sid>1002</if_sid>
<match>$GOOD_WORDS</match>
<description>Ignore good_words.</description>
</rule>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11836 次 |
| 最近记录: |