SU 命令失败警报规则

Microsoft.Linux.SLES.12.LogFile.Syslog.SU.Command.Root.Failure.Alert (Rule)

失败“根命令 SU”消息警报规则。

Knowledge Base article:

摘要

系统日志文件中检测到失败的 'su' 命令。

原因

尝试用“su”提升特权不成功。这可能是由于输入的密码不正确或试图使用无效的用户名造成的。但是,永久性故障可能是可疑活动的征兆。

解决方法

警报和/或输出数据项的描述包含有关遇到的事件的信息。如果“su”使用率显得可疑,请检查关联的事件详细信息以及此事件时间附近发生的任何其他事件。

Element properties:

TargetMicrosoft.Linux.SLES.12.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
检测到失败根 SU
{0}

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Unix.SCXLog.Privileged.Datasource Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.Linux.SLES.12.LogFile.Syslog.SU.Command.Root.Failure.Alert" Target="Microsoft.Linux.SLES.12.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] SUSE SU False -->
<!-- [INPUT] 2014-12-15T13:57:14.311950-05:00 linux-sb1s su: FAILED SU (to root) root on pts/1 -->
<!-- [INPUT-MISS] Nov 30 03:37:25 scxcr-sles11-03 su: FAILED SU (to jeffcof) jonas on /dev/pts/2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/messages</LogFile>
<RegExpFilter>\s+su: FAILED SU \(to root\) \S+ on</RegExpFilter>
<IndividualAlerts>false</IndividualAlerts>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Linux.SLES.12.LogFile.Syslog.SU.Command.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>