Privileged User Has Been Created

Detects the addition of a new user to a privileged group such as "root" or "sudo"

Sigma rule (View on GitHub)

 1title: Privileged User Has Been Created
 2id: 0ac15ec3-d24f-4246-aa2a-3077bb1cf90e
 3status: test
 4description: Detects the addition of a new user to a privileged group such as "root" or "sudo"
 5references:
 6    - https://digital.nhs.uk/cyber-alerts/2018/cc-2825
 7    - https://linux.die.net/man/8/useradd
 8    - https://github.com/redcanaryco/atomic-red-team/blob/25acadc0b43a07125a8a5b599b28bbc1a91ffb06/atomics/T1136.001/T1136.001.md#atomic-test-5---create-a-new-user-in-linux-with-root-uid-and-gid
 9author: Pawel Mazur
10date: 2022/12/21
11tags:
12    - attack.persistence
13    - attack.t1136.001
14    - attack.t1098
15logsource:
16    product: linux
17    definition: '/var/log/secure on REHL systems or /var/log/auth.log on debian like Systems needs to be collected in order for this detection to work'
18detection:
19    # Example of the events that could be observed when matching these would be as follow
20    #   Dec 21 16:42:19 testserver useradd[1337]: new user: name=butter1, UID=1000, GID=0, home=/root, shell=/bin/bash
21    #   Dec 21 17:13:54 testserver useradd[1337]: new user: name=john, UID=0, GID=0, home=/home/john, shell=/bin/bash
22    #   Dec 21 17:24:40 testserver useradd[1337]: new user: name=butter3, UID=1000, GID=10, home=/home/butter3, shell=/bin/bash
23    #   Dec 21 17:30:22 testserver useradd[1337]: new user: name=butter4, UID=1000, GID=27, home=/home/butter4, shell=/bin/bash
24    selection_new_user:
25        - 'new user'
26    selection_uids_gids:
27        - 'GID=0' # root group
28        - 'UID=0' # root UID
29        - 'GID=10' # wheel group
30        - 'GID=27' # sudo group
31    condition: all of selection_*
32falsepositives:
33    - Administrative activity
34level: high

References

Related rules

to-top