SSH 失败警报规则

Microsoft.AIX.7.LogFile.Syslog.SSHAuth.Root.Failure.Alert (Rule)

失败 SSH 根消息警报规则。

Knowledge Base article:

摘要

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

配置

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

原因

错误输入的密码或使用无效的用户名可能会导致失败。但是,持续的故障可能表示某人尝试获取未授权的访问。

解决方法

警报和/或输出数据项的描述包含有关遇到的问题的信息。如果发生故障,请检查关联的事件的详细信息以及此故障时间附近发生的任何其他事件以诊断问题。

Element properties:

TargetMicrosoft.AIX.7.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
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.7.LogFile.Syslog.SSHAuth.Root.Failure.Alert" Target="Microsoft.AIX.7.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] AIX7 SSH False -->
<!-- [INPUT] Jun 2 14:25:55 scxomd-aix7-01 auth|security:info sshd[6357224]: Failed password for root from 10.195.175.198 port 47282 ssh2 -->
<!-- [INPUT-MISS] Jun 2 14:26:26 scxomd-aix7-01 auth|security:info sshd[6357228]: Failed password for scxuser from 10.195.175.198 port 47283 ssh2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/adm/ras/syslog.caa</LogFile>
<RegExpFilter>[[:space:]]sshd\[[[:digit:]]+]: Failed password for root from</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.AIX.7.LogFile.Syslog.SSHAuth.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>