SSH 成功警示規則

Microsoft.AIX.5.3.LogFile.Syslog.SSHAuth.Root.Success.Alert (Rule)

以根 (root) 身分進行 SSH 成功的訊息警示規則。

Knowledge Base article:

摘要

在系統記錄檔中偵測到以根 (root) 身分進行的 SSH 驗證。

設定

此規則預設為停用。 若要啟用此規則以進行監視,請使用覆寫來設定記錄檔路徑及啟用規則。 記錄檔路徑是使用名為 LogFile 的可覆寫內容進行設定,而其值必須設定為將接收這些事件之記錄檔的完整路徑,如同 Syslog 設定中所定義。 您可以使用覆寫,針對所有執行個體或特定執行個體或群組來變更參數值。

原因

使用者可能已獲得存取特殊權限帳戶的授權。 此監視可讓系統管理員追蹤以根使用者身分進行直接登入的狀況。

解決方式

警示及/或輸出資料項目的描述包含所發生事件的資訊。 如果這個事件似乎有問題,請檢查相關聯的事件詳細資訊,以及與此事件同時間發生的其他任何事件。

Element properties:

TargetMicrosoft.AIX.5.3.Computer
CategoryEventCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityInformation
Alert PriorityNormal
RemotableTrue
Alert Message
偵測到以根 (root) 身分進行 SSH 成功
{0}

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Unix.SCXLog.Datasource Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.AIX.5.3.LogFile.Syslog.SSHAuth.Root.Success.Alert" Target="Microsoft.AIX.5.3.Computer" Enabled="false" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] AIX SSH True -->
<!-- [INPUT] Oct 30 15:05:16 scxaix3-1 auth|security:info sshd[483544]: Accepted publickey for root from 172.30.182.212 port 49259 ssh2 -->
<!-- [INPUT] Oct 30 15:06:48 scxaix3-1 auth|security:info sshd[483546]: Accepted password for root from 172.30.182.212 port 49261 ssh2 -->
<!-- [INPUT] Nov 6 12:39:23 scxaix3-1 auth|security:info sshd[666666]: Accepted hostbased for root from dubbuster port 37129 ssh2 -->
<!-- [INPUT-MISS] Nov 6 12:39:23 scxaix3-1 auth|security:info sshd[666666]: Accepted hostbased for bambi from dubbuster port 37129 ssh2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/syslog.log</LogFile>
<RegExpFilter>sshd\[[[:digit:]]+\]: Accepted [^[:space:]]+ for root from [^[:space:]]+</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.AIX.5.3.LogFile.Syslog.SSHAuth.Root.Success.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>