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
11modified: 2025-01-21
12tags:
13    - attack.persistence
14    - attack.t1136.001
15    - attack.t1098
16logsource:
17    product: linux
18    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'
19detection:
20    # Example of the events that could be observed when matching these would be as follow
21    #   Dec 21 16:42:19 testserver useradd[1337]: new user: name=butter1, UID=1000, GID=0, home=/root, shell=/bin/bash
22    #   Dec 21 17:13:54 testserver useradd[1337]: new user: name=john, UID=0, GID=0, home=/home/john, shell=/bin/bash
23    #   Dec 21 17:24:40 testserver useradd[1337]: new user: name=butter3, UID=1000, GID=10, home=/home/butter3, shell=/bin/bash
24    #   Dec 21 17:30:22 testserver useradd[1337]: new user: name=butter4, UID=1000, GID=27, home=/home/butter4, shell=/bin/bash
25    selection_new_user:
26        - 'new user'
27    selection_uids_gids:
28        - 'GID=0,' # root group
29        - 'UID=0,' # root UID
30        - 'GID=10,' # wheel group
31        - 'GID=27,' # sudo group
32    condition: all of selection_*
33falsepositives:
34    - Administrative activity
35level: high
yaml

References

Related rules

to-top