SU Command Success alert rule

Microsoft.Linux.SLES.12.LogFile.Syslog.SU.Command.Root.Success.Alert (Rule)

Alert rule for successful "SU to root command" messages.

Knowledge Base article:

Summary

A successful 'su' command has been detected in the system log files.

Causes

Users may have been granted access to privileged accounts with 'su' elevation. This alerting rule allows system administrators to track 'su' usage.

Resolutions

The description of the alert and/or the output data item contains information on the event encountered. If 'su' usage appears suspicious, check the associated event details and any other events that happened around the time of this event.

Element properties:

TargetMicrosoft.Linux.SLES.12.Computer
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityInformation
Alert PriorityNormal
RemotableTrue
Alert Message
Successful SU to Root detected
{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.SLES.12.LogFile.Syslog.SU.Command.Root.Success.Alert" Target="Microsoft.Linux.SLES.12.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] SUSE SU True -->
<!-- [INPUT] 2014-11-05T18:33:15.108355-05:00 linux-sb1s su: (to root) anugup on pts/0 -->
<!-- [INPUT-MISS] Nov 30 03:36:38 scxcr-sles11-03 su: (to jeffcof) jonas on /dev/pts/2 -->
<DataSource ID="EventDS" TypeID="Unix!Microsoft.Unix.SCXLog.Privileged.Datasource">
<Host>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Host>
<LogFile>/var/log/messages</LogFile>
<RegExpFilter>\s+su: \(to root\) \S+ on</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.SLES.12.LogFile.Syslog.SU.Command.Root.Success.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>