Règle d'alerte d'échec d'authentification SSH

Microsoft.Linux.SLES.9.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert (Rule)

Règle d'alerte pour la détection des échecs d'authentification SSH.

Knowledge Base article:

Résumé

Un échec d'authentification SSH pour le compte racine a été détecté dans les fichiers journaux système.

Causes

L'échec de l'opération peut être lié à une erreur de saisie du mot de passe ou à l'utilisation d'un nom d'utilisateur incorrect. Cependant, si l'incident persiste, cela peut être le signe qu'une personne non autorisée tente d'accéder au réseau.

Résolutions

La description de l'alerte et/ou de l'élément de données de sortie contient des informations sur le problème rencontré. Si un incident se produit, consultez les détails des événements connexes ou des événements survenus à peu près au même moment pour diagnostiquer le problème.

Element properties:

TargetMicrosoft.Linux.SLES.9.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Échec de l'authentification SSH détecté
{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.Linux.SLES.9.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert" Target="Microsoft.Linux.SLES.9.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] SUSE SSH False -->
<!-- [INPUT] Nov 30 12:37:40 sles9v4-cjc sshd[11474]: error: PAM: Authentication failure for root from localhost -->
<!-- [INPUT] Nov 30 12:40:05 sles9v4-cjc sshd[11621]: error: PAM: Authentication failure for illegal user root from localhost -->
<!-- [INPUT-MISS] Nov 30 12:37:25 sles9v4-cjc sshd[11468]: error: PAM: Authentication failure for ccrammo from localhost -->
<!-- [INPUT-MISS] Nov 30 12:39:42 sles9v4-cjc sshd[11600]: error: PAM: Authentication failure for illegal user newguy from localhost -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/messages</LogFile>
<RegExpFilter>\s+sshd\[[[:digit:]]+\]: error: PAM: Authentication failure for (illegal user )?root from \S+</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.Linux.SLES.9.LogFile.Syslog.SSHAuth.PAM.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>