Failed sudo (Red Hat Enterprise Linux Server 5)

Microsoft.ACS.Linux.RHEL.5.Sudo.Failed (Rule)

Rule to collect events for failed call to sudo

Element properties:

TargetMicrosoft.ACS.Linux.RHEL.5.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.RHEL.5.Sudo.Failed" Enabled="true" Target="Microsoft.ACS.Linux.RHEL.5.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/secure</LogFile>
<!-- [TYPE] Redhat5 SUDO False -->
<!-- [INPUT] Oct 6 18:19:00 scxom64-rhel52-03 sudo: pam_unix(sudo:auth): authentication failure; logname=a-mitmor uid=0 euid=0 tty=pts/2 ruser= rhost= user=a-mitmor -->
<!-- [EXPECTED] date="Oct 6 18:19:00"; hostname="scxom64-rhel52-03"; process="sudo"; subSystem="pam_unix"; user="a-mitmor" -->
<RegExpFilter>\s+sudo: \S+\(\S+\): authentication failure; logname=.* user=\S+</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+(?'process'sudo): (?'subSystem'\S+)\(\S+\): authentication failure; logname=.* user=(?'user'\S+)</RegExp>
<EventType>0</EventType>
<EventId>27003</EventId>
</WriteAction>
</WriteActions>
</Rule>