Waarschuwingsregel voor mislukte SSH-verificatie

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

Waarschuwingsregel voor de detectie van SSH verificatiefouten.

Knowledge Base article:

Samenvatting

Er is een SSH-verificatiefout voor het root-account in de systeemlogboekbestanden gevonden.

Oorzaken

Een fout wordt mogelijk veroorzaakt door een verkeerd getypt wachtwoord of een poging om een ongeldige gebruikersnaam te gebruiken. Een permanente storing kan echter wel een indicatie zijn dat iemand probeert onbevoegd toegang te krijgen.

Oplossingen

De beschrijving van de waarschuwing en/of het uitvoergegevensitem bevat informatie over het probleem dat is opgetreden. Als er een fout optreedt, controleert u de details van de bijbehorende gebeurtenis en alle andere gebeurtenissen die rond dezelfde tijd hebben plaatsgevonden om de oorzaak van het probleem op te sporen.

Element properties:

TargetMicrosoft.Linux.RHEL.4.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
SSH-verificatiefout gedetecteerd
{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.4.LogFile.Syslog.SSHAuth.PAM.Root.Failure.Alert" Target="Microsoft.Linux.RHEL.4.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Redhat4 SshPassword False -->
<!-- [INPUT] Oct 15 04:34:18 scxom64-rhel40-03 sshd[4797]: Failed password for root from ::ffff:127.0.0.1 port 32773 ssh2 -->
<!-- [INPUT] Oct 15 04:35:16 scxom64-rhel40-03 sshd[4843]: Failed password for invalid user root from ::ffff:127.0.0.1 port 32774 ssh2 -->
<!-- [INPUT-MISS] Oct 15 02:54:17 scxom64-rhel40-03 sshd[4208]: Failed password for nobody from ::ffff:172.30.181.72 port 60209 ssh2 -->
<!-- [INPUT-MISS] Oct 15 04:33:53 scxom64-rhel40-03 sshd[4794]: Failed password for tst1 from ::ffff:127.0.0.1 port 32772 ssh2 -->
<!-- [INPUT-MISS] Oct 15 04:36:03 scxom64-rhel40-03 sshd[4848]: Failed password for invalid user tst1 from ::ffff:127.0.0.1 port 32775 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.4.LogFile.Syslog.SSHAuth.PAM.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>