ルート パスワード SSH 認証アラート ルール

Microsoft.Linux.Universal.LogFile.Syslog.Root.SSHAuth.Password.Alert (Rule)

SSH 認証を使用したルート パスワード検出のためのアラート ルール

Knowledge Base article:

概要

ルート アカウント パスワードを使用する直接ログインが検出されました。

構成

このルールは、既定では無効になっています。このルールを有効にするには、特定の Universal Linux インスタンスまたは Universal Linux インスタンスのグループをターゲットにした上書きを使います。このルールを有効にした場合は、RegExpFilter パラメーターをターゲットの Linux オペレーティング システムとバージョンに適した正規表現パターンで上書きする必要があります。特定の条件のシステム ログ メッセージは、オペレーティング システムとバージョンによって異なる場合があります。

原因

ユーザーが、特権アカウントへのアクセス許可を付与されている可能性があります。このアラート ルールは、システム管理者がルート アカウント パスワードを使用して直接ログインを追跡できるようにします。

解決策

アラートや出力データ項目の説明には、発生したイベントに関する情報が含まれています。このイベントに疑問がある場合は、関連イベントの詳細およびこのイベントとほぼ同時刻に発生したその他のイベントを確認してください。

Element properties:

TargetMicrosoft.Linux.Universal.Computer
CategoryEventCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityInformation
Alert PriorityNormal
RemotableTrue
Alert Message
システムは検出された「ルート」パスワードを使用して 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.Universal.LogFile.Syslog.Root.SSHAuth.Password.Alert" Target="Universal!Microsoft.Linux.Universal.Computer" Enabled="false" Remotable="true">
<Category>EventCollection</Category>
<!-- [TYPE] Redhat6 SSH True -->
<!-- [INPUT] Dec 6 00:57:45 scxcrd64-rhel6-01 sshd[14769]: Accepted password for root from 10.217.5.101 port 52268 ssh2 -->
<!-- [INPUT] Jul 31 20:04:31 scxcrd64-rhel6-01 sshd[16729]: Accepted publickey for root from 172.30.182.25 port 35550 ssh2 -->
<!-- [INPUT-MISS] Dec 6 01:49:37 scxcrd64-rhel6-01 sshd[15053]: Accepted password for zoyang from 172.30.170.58 port 18320 ssh2 -->
<DataSources>
<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:]]+\]: Accepted \S+ for root from \S+</RegExpFilter>
<IndividualAlerts>false</IndividualAlerts>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>0</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Linux.Universal.LogFile.Syslog.Root.SSHAuth.Password.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>