OS Credential Dumping: /etc/passwd and /etc/shadow T1003.008

Tactic: Credential Access

Adversaries may attempt to dump the contents of /etc/passwd and /etc/shadow to enable offline password cracking. Most modern Linux operating systems use a combination of /etc/passwd and /etc/shadow to store user account information, including password hashes in /etc/shadow. By default, /etc/shadow is only readable by the root user.

Events covered

2 catalog events are tagged with this technique by at least one rule.

Authoring guide

Patterns shared across the 13 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (25 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
host.os.type8eq 8
EventType7in 5, eq 2exec, exec_event, ProcessRollup2, creation, file_create_event
event.type7eq 6, in 1start, process_started
process_name6eq 4, in 3cat, chmod, chown, defaults, dscl
process.args5eq 4, wildcard 3, in 1, starts_with 1--exec, --reference=, --system, -R, -dump
CommandLine3wildcard 2, contains 1, in 1*/dev/shm/*, */dev/tcp*, */dev/tcp/*, */etc/passwd*, */etc/shadow*
parent_process_name3in 2, eq 1ash, bash, csh, cupsd, foomatic-rip
CurrentDirectory2eq 2/etc, /bin, /usr/bin
event.category2eq 2process
sourcetype2eq 1, in 1auditd, vmw-syslog, vmware:esxlog*
Esql.any_payload_keyword_max1eq 11
Esql.event_count1lt 15
Image1eq 1, wildcard 1?:\users\*\appdata\local\packages\*\rootfs\usr\bin\bash, ?:\windows\system32\bash.exe
Message1contains 1, in 1*/etc/likewise/krb5-affinity.conf*, */etc/security/*, */etc/sfcb/sfcb.cfg*
OriginalFileName1eq 1bash.exe

Top indicator values (241 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
6606
EventTypein
exec
4171
EventTypein
exec_event
4139
EventTypein
ProcessRollup2
3117
EventTypein
start
3134
CurrentDirectoryeq
/etc
23
EventTypeeq
exec
2171
event.categoryeq
process
2128
process_namein
cat
223
CommandLinecontains
/etc/passwd
14
CommandLinecontains
/etc/shadow
14
CommandLinecontains
/etc/sudoers
16
CommandLinecontains
/root/.ssh/
1
CommandLinein
*/etc/passwd*
1
CommandLinein
*/etc/shadow*
1
CommandLinewildcard
*/dev/shm/*
13
CommandLinewildcard
*/dev/tcp*
12
CommandLinewildcard
*/dev/tcp/*
12
CommandLinewildcard
*/dev/udp/*
12
CommandLinewildcard
*/etc/init.d*
12
CommandLinewildcard
*/etc/ld.so*
12
CommandLinewildcard
*/etc/passwd*
14
CommandLinewildcard
*/etc/profile*
12
CommandLinewildcard
*/etc/rc.local*
12
CommandLinewildcard
*/etc/shadow*
15
CommandLinewildcard
*/etc/ssh*
14
CommandLinewildcard
*/etc/sudoers*
12
CommandLinewildcard
*/etc/update-motd.d*
12
CommandLinewildcard
*/home/*/.ssh/*
15
CommandLinewildcard
*/root/.ssh*
13

Exclusions (66 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
Imageeq
/etc/cron.daily/passwd
1
Imageeq
/usr/bin/rkhunter
1
Imageeq
/usr/lib/tiger/scripts/check_passwdformat
1
Imageeq
/usr/local/hestia/bin/v-check-user-password
1
Imageeq
/usr/sbin/lynis
1
Imageeq
/usr/sbin/setroubleshootd
1
Imagein
/bin/chmod
1
Imagein
/bin/chown
1
Imagein
/usr/bin/chmod
1
Imagein
/usr/bin/chown
1
Imagestarts_with
/run/containerd/
1
Imagestarts_with
/tmp/.criu
1
Imagestarts_with
/tmp/newroot/
1
Imagestarts_with
/var/lib/docker/
1
Imagestarts_with
/vz/
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Elastic 10 rules

Splunk 3 rules