SU Command Success alert rule

Microsoft.Linux.RHEL.6.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. This monitor 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, please check the associated event details and any other events that happened around the time of this event.

Element properties:

TargetMicrosoft.Linux.RHEL.6.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.RHEL.6.LogFile.Syslog.SU.Command.Root.Success.Alert" Target="Microsoft.Linux.RHEL.6.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Redhat6 SU True -->
<!-- [INPUT] Dec 6 01:24:06 scxcrd64-rhel6-01 su: pam_unix(su-l:session): session opened for user root by zoyang(uid=504) -->
<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+su: \S+\(\S+\): session opened for user root by \S+\(uid=[[:digit:]]+\)</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.RHEL.6.LogFile.Syslog.SU.Command.Root.Success.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>