成功的 su (SUSE Linux Enterprise Server 9)

Microsoft.ACS.Linux.SLES.9.Su.Succeeded (Rule)

用于收集 su 的成功调用事件的规则

Knowledge Base article:

摘要

在系统日志文件中检测到成功的 'su' 命令。

原因

可能会授权用户访问特权帐户。该监视器允许系统管理员跟踪 'su' 使用率。

解决方法

警报和/或输出数据项的描述包含有关遇到的事件的信息。如果活动显得可疑,请检查关联的事件详细信息以及此事件时间附近发生的任何其他事件。

Element properties:

TargetMicrosoft.ACS.Linux.SLES.9.ACSEndPoint
CategoryEventCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
EventDS DataSource Microsoft.Unix.SCXLog.Privileged.Datasource Default
WA WriteAction Microsoft.ACS.Unix.SecureEventLogWriter Default

Source Code:

<Rule ID="Microsoft.ACS.Linux.SLES.9.Su.Succeeded" Enabled="true" Target="Microsoft.ACS.Linux.SLES.9.ACSEndPoint" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</Host>
<LogFile>/var/log/messages</LogFile>
<!-- [TYPE] SUSE SU True -->
<!-- [INPUT] Nov 30 10:12:04 scxsles9-03b su: (to jim) jonas on /dev/pts/0 -->
<!-- [INPUT] Nov 30 10:11:30 scxsles9-03b su: (to root) jonas on /dev/pts/0 -->
<!-- [EXPECTED] date="Nov 30 10:12:04"; hostname="scxsles9-03b"; process="su"; clientUser="jim"; user="jonas" -->
<!-- [EXPECTED] date="Nov 30 10:11:30"; hostname="scxsles9-03b"; process="su"; clientUser="root"; user="jonas" -->
<RegExpFilter>su: \(to \S+\) \S+ on</RegExpFilter>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="ACS.Unix!Microsoft.ACS.Unix.SecureEventLogWriter">
<RegExp>(?'date'\S+\s+\d+\s+\d+:\d+:\d+)\s+(?:\S+:)?(?'hostname'\S+)\s+(?&lt;process&gt;su): \(to (?&lt;clientUser&gt;\S+)\) (?&lt;user&gt;\S+)</RegExp>
<EventType>1</EventType>
<EventId>27006</EventId>
</WriteAction>
</WriteActions>
</Rule>