SSH Failure Alert Rule

Microsoft.AIX.6.1.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.6.1.Computer
CategoryEventCollection
EnabledFalse
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.6.1.LogFile.Syslog.SSHAuth.Root.Failure.Alert" Target="Microsoft.AIX.6.1.Computer" Enabled="false" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] AIX SSH False -->
<!-- [INPUT] Nov 5 15:32:56 scxaix1 auth|security:info sshd[655370]: Failed password for root from 172.30.182.212 port 50879 ssh2 -->
<!-- [INPUT-MISS] Nov 5 15:32:21 scxaix1 auth|security:info sshd[655368]: Failed password for scxuser from dubbuster port 50878 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>[[: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.6.1.LogFile.Syslog.SSHAuth.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>