Rule to collect events for adding a user to a group
A successful usermod command has been detected in the system log files.
A user was added to an existing group. This monitor allows system administrators to track account/group creation and deletion.
The description of the alert and/or the output data item contains information on the event encountered. If the activity appears suspicious, please check the associated event details and any other events that happened around the time of this event.
Target | Microsoft.ACS.Linux.SLES.11.ACSEndPoint |
Category | EventCollection |
Enabled | True |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
EventDS | DataSource | Microsoft.Unix.SCXLog.Privileged.Datasource | Default |
WA | WriteAction | Microsoft.ACS.Unix.SecureEventLogWriter | Default |
<Rule ID="Microsoft.ACS.Linux.SLES.11.Adding.User.To.Group" Enabled="true" Target="Microsoft.ACS.Linux.SLES.11.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 UserAddToGroup True -->
<!-- [INPUT] Oct 13 16:43:48 scxcr-sles11-03 shadow[19425]: account added to group - account=tempuser, group=tempgroup, gid=1000, by=0 -->
<!-- [EXPECTED] date="Oct 13 16:43:48"; hostname="scxcr-sles11-03"; process="shadow"; processId="19425"; clientUser="tempuser"; groupName="tempgroup" -->
<RegExpFilter>\s+shadow\[[[:digit:]]+\]: account added to group - account=\S+, group=\S+, gid=</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'shadow)\[(?'processId'\d+)\]: account added to group - account=(?'clientUser'\S+), group=(?'groupName'\S+), gid=</RegExp>
<EventType>1</EventType>
<EventId>27004</EventId>
<BackrefOverrides>sessionName="User added to group"</BackrefOverrides>
</WriteAction>
</WriteActions>
</Rule>