SSH 成功警报规则

Microsoft.AIX.6.1.LogFile.Syslog.SSHAuth.Root.Success.Alert (Rule)

成功 SSH 根消息警报规则。

Knowledge Base article:

摘要

在系统日志文件中检测到作为根帐户的 SSH 身份验证。

配置

默认情况下,此规则已禁用。要启用此规则以进行监视,请使用替代来配置日志文件路径并启用该规则。日志文件路径使用名为 LogFile 的可替代属性进行设置,并且必须将值设置为日志文件的完整路径,该日志文件将接收 syslog 配置中所定义的这些事件。替代可用于为所有实例或特定实例或组更改参数值。

原因

可能会授权用户访问特权帐户。该监视器允许系统管理员跟踪作为根用户的直接登录。

解决方法

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

Element properties:

TargetMicrosoft.AIX.6.1.Computer
CategoryEventCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityInformation
Alert PriorityNormal
RemotableTrue
Alert Message
检测到根帐户的 SSH 成功
{0}

Member Modules:

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

Source Code:

<Rule ID="Microsoft.AIX.6.1.LogFile.Syslog.SSHAuth.Root.Success.Alert" Target="Microsoft.AIX.6.1.Computer" Enabled="false" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] AIX SSH True -->
<!-- [INPUT] Oct 30 14:11:34 scxaix1 auth|security:info sshd[376912]: Accepted password for root from 172.30.182.212 port 40873 ssh2 -->
<!-- [INPUT] Nov 6 12:39:23 scxaix1 auth|security:info sshd[524538]: Accepted hostbased for root from 10.195.175.32 port 37129 ssh2 -->
<!-- [INPUT-MISS] Oct 30 14:10:48 scxaix1 auth|security:info sshd[344146]: Accepted publickey for ccrammo from 172.30.182.212 port 40871 ssh2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/syslog.log</LogFile>
<RegExpFilter>sshd\[[[:digit:]]+\]: Accepted [^[:space:]]+ for root from [^[:space:]]+</RegExpFilter>
<IndividualAlerts>false</IndividualAlerts>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>0</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.AIX.6.1.LogFile.Syslog.SSHAuth.Root.Success.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>