Reguła alertu dotycząca niepowodzenia uwierzytelniania SSH

Microsoft.Linux.RHEL.6.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert (Rule)

Reguła alertu dotycząca wykrywania niepowodzeń uwierzytelniania SSH.

Knowledge Base article:

Podsumowanie

W plikach dziennika systemowego wykryto niepowodzenie uwierzytelniania SSH dla konta „root”.

Przyczyny

Przyczyną niepowodzenia może być błędnie wpisane hasło lub próba użycia nieprawidłowej nazwy użytkownika. Niemniej jednak utrzymujące się niepowodzenie może wskazywać, że ktoś próbuje uzyskać nieautoryzowany dostęp.

Rozwiązania

Opis alertu i/lub element danych wyjściowych zawiera informacje o napotkanym problemie. Aby zdiagnozować problem w razie błędu, sprawdź szczegóły skojarzonego zdarzenia oraz inne zdarzenia, które wystąpiły w czasie zbliżonym do tej awarii.

Element properties:

TargetMicrosoft.Linux.RHEL.6.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Wykryto niepowodzenie uwierzytelniania SSH
{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.RHEL.6.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert" Target="Microsoft.Linux.RHEL.6.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Redhat6 SSH False -->
<!-- [INPUT] Dec 6 01:48:30 scxcrd64-rhel6-01 sshd[15029]: Failed password for root from 172.30.170.58 port 18319 ssh2 -->
<!-- [INPUT] Jul 31 20:06:25 scxcrd64-rhel6-01 sshd[16764]: Failed password for invalid user root from 172.30.181.43 port 2899 ssh2 -->
<!-- [INPUT-MISS] Dec 6 01:49:18 scxcrd64-rhel6-01 sshd[15053]: Failed password for zoyang from 172.30.170.58 port 18320 ssh2 -->
<!-- [INPUT-MISS] Dec 7 22:44:00 scxcrd64-rhel6-01 sshd[19637]: Failed password for invalid user jasd from 172.30.168.209 port 34514 ssh2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/secure</LogFile>
<RegExpFilter>\s+sshd\[[[:digit:]]+\]: Failed password for (invalid 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.RHEL.6.LogFile.Syslog.SSHAuth.PAM.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>