SU 命令失败警报规则

Microsoft.Linux.RHEL.5.LogFile.Syslog.SU.Command.Root.Failure.Alert (Rule)

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

Knowledge Base article:

摘要

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

原因

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

解决方法

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

Element properties:

TargetMicrosoft.Linux.RHEL.5.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.RHEL.5.LogFile.Syslog.SU.Command.Root.Failure.Alert" Target="Microsoft.Linux.RHEL.5.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Redhat5 SU False -->
<!-- [INPUT] Oct 6 00:48:56 scxom64-rhel52-03 su: pam_unix(su-l:auth): authentication failure; logname=a-mitmor uid=514 euid=0 tty=pts/1 ruser=a-mitmor rhost= user=root -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/secure</LogFile>
<RegExpFilter>su: \S+\(\S+\): authentication failure; logname=\S+ .* user=root</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.RHEL.5.LogFile.Syslog.SU.Command.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>