Local System Accounts Discovery Attempt - Linux
Detects attempts to enumerate local user accounts via common Linux utilities and sensitive file access. Adversaries may read files such as /etc/passwd, /etc/shadow, and /etc/sudoers, or use tools like getent, id, who, and finger to identify accounts and privilege levels on a compromised system.
Sigma rule (View on GitHub)
1title: Local System Accounts Discovery Attempt - Linux
2id: b45e3d6f-42c6-47d8-a478-df6bd6cf534c
3status: test
4description: |
5 Detects attempts to enumerate local user accounts via common Linux utilities and sensitive file access.
6 Adversaries may read files such as /etc/passwd, /etc/shadow, and /etc/sudoers, or use tools like getent,
7 id, who, and finger to identify accounts and privilege levels on a compromised system.
8references:
9 - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1087.001/T1087.001.md
10 - https://my.f5.com/manage/s/article/K589
11 - https://man.freebsd.org/cgi/man.cgi?pwd_mkdb
12 - https://man7.org/linux/man-pages/man1/getent.1.html
13 - https://linux.die.net/man/1/finger
14author: Alejandro Ortuno, oscd.community, CheraghiMilad
15date: 2020-10-08
16modified: 2026-11-03
17tags:
18 - attack.discovery
19 - attack.t1087.001
20logsource:
21 category: process_creation
22 product: linux
23detection:
24 selection_lastlog:
25 Image|endswith:
26 - '/lastlog'
27 - '/last'
28 - '/lastb'
29 selection_root_string:
30 CommandLine|contains: 'x:0:'
31 selection_read_utilities:
32 Image|endswith:
33 - '/cat'
34 - '/ed'
35 - '/emacs'
36 - '/head'
37 - '/less'
38 - '/makemap'
39 - '/more'
40 - '/nano'
41 - '/sqlite3'
42 - '/tail'
43 - '/vi'
44 - '/vim'
45 CommandLine|contains:
46 - '/etc/passwd'
47 - '/etc/shadow'
48 - '/etc/sudoers'
49 - 'master.passwd'
50 - 'pwd.db'
51 selection_id:
52 Image|endswith: '/id'
53 selection_lsof:
54 Image|endswith: '/lsof'
55 CommandLine|contains: '-u'
56 selection_getent:
57 Image|endswith: '/getent'
58 CommandLine|contains:
59 - ' passwd'
60 - ' shadow'
61 selection_who:
62 Image|endswith:
63 - '/finger'
64 - '/users'
65 - '/w'
66 - '/who'
67 selection_ypcat:
68 Image|endswith: '/ypcat'
69 CommandLine|contains: 'passwd'
70 filter_optional_landscape_sysinfo:
71 ParentCommandLine|contains: '/usr/bin/landscape-sysinfo'
72 Image|endswith: '/who'
73 condition: 1 of selection_* and not 1 of filter_optional_*
74falsepositives:
75 - Legitimate administration activities
76level: low
References
Related rules
- HackTool - Bloodhound/Sharphound Execution
- Suspicious Group And Account Reconnaissance Activity Using Net.EXE
- Local System Accounts Discovery - MacOs
- Local Accounts Discovery
- BloodHound Collection Files