SSH Failure Alert Rule

Microsoft.Solaris.11.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert (Rule)

Alert rule for failed SSH as root messages.

Knowledge Base article:

Summary

An SSH Authentication failure for the root account 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, check the associated event details and any other events that happened around the time of this failure to diagnose the problem.

Element properties:

TargetMicrosoft.Solaris.11.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.Privileged.Datasource Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.Solaris.11.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert" Target="Microsoft.Solaris.11.Computer" Enabled="false" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Solaris SSH False -->
<!-- [INPUT] Nov 30 16:43:58 jeffcof-sol11-x86 sshd[1381]: [ID 800047 auth.notice] Failed keyboard-interactive for root from ::1 port 33798 ssh2 -->
<!-- [INPUT-MISS] Nov 30 16:43:58 jeffcof-sol11-x86 sshd[1381]: [ID 800047 auth.notice] Failed keyboard-interactive for jeffcof from ::1 port 33798 ssh2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/authlog</LogFile>
<RegExpFilter>sshd\[[[:digit:]]+\]: \[.*\] Failed (keyboard-interactive|publickey) for root from [^[:space:]]+</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.Solaris.11.LogFile.Syslog.SSHAuth.PAM.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>