SSH Failure Alert Rule

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

Alert rule for failed SSH as root messages.

Knowledge Base article:

Summary

A failed SSH authentication as root was detected in the system log files.

Configuration

This rule is disabled by default. To enable this rule for monitoring, use overrides to configure the log file path and enable the rule. The log file path is set with the overridable property named LogFile, and the value must be set to the full path to the log file that will receive these events, as defined in the syslog configuration. Overrides can be used to change the parameter values for all instances or for specific instances or groups.

Causes

A failure may be caused by a mistyped password or an attempt to use an invalid username. However, a persistent failure could be an indication that someone is attempting to gain unauthorized access.

Resolutions

The description of the alert and/or the output data item contains information on the problem encountered. If a failure occurs, please check the associated event details and any other events that happened around the time of this failure to diagnose the problem.

Element properties:

TargetMicrosoft.AIX.7.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Failed SSH as Root detected
{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>