Alert rule for failed "SU to root command" messages.
A failed 'su' command has been detected in the system log files.
An unsuccessful attempt was made to elevate privileges with 'su.' This may have been caused by a mistyped password or an attempt to use an invalid username. However, a persistent failure could be an indication of suspicious activity.
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.
Target | Microsoft.Linux.RHEL.7.Computer | ||
Category | EventCollection | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
|
ID | Module Type | TypeId | RunAs |
---|---|---|---|
EventDS | DataSource | Microsoft.Unix.SCXLog.Privileged.Datasource | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.Linux.RHEL.7.LogFile.Syslog.SU.Command.Root.Failure.Alert" Target="Microsoft.Linux.RHEL.7.Computer" Enabled="true" Remotable="true">
<Category>EventCollection</Category>
<DataSources>
<!-- [TYPE] Redhat7 SU False -->
<!-- [INPUT] Dec 6 01:30:47 scxcrd64-rhel7-01 su: pam_unix(su-l:auth): authentication failure; logname=zoyang uid=504 euid=0 tty=pts/0 ruser=zoyang rhost= user=root -->
<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>su: \S+\(\S+\): authentication failure; logname=\S+ .* user=root</RegExpFilter>
<IndividualAlerts>false</IndividualAlerts>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Linux.RHEL.7.LogFile.Syslog.SU.Command.Root.Failure.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>