Abuse Elevation Control Mechanism: Setuid and Setgid T1548.001

Tactic: Privilege Escalation

An adversary may abuse configurations where an application has the setuid or setgid bits set in order to get code running in a different (and possibly more privileged) user’s context. On Linux or macOS, when the setuid or setgid bits are set for an application binary, the application will run with the privileges of the owning user or group respectively. Normally an application is run in the current user’s context, regardless of which user or group owns the application. However, there are instances where programs need to be executed in an elevated context to function properly, but the user running them may not have the specific required privileges.

Events covered

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

Authoring guide

Patterns shared across the 28 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 (37 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
EventType20eq 17, in 5exec, uid_change, executed, ProcessRollup2, exec_event
host.os.type19eq 19
event.type18eq 17, in 1start, change, creation
process_name18eq 12, in 8, starts_with 3, is_not_null 1chmod, bash, ., busybox, chown
process.args14in 8, eq 6, starts_with 2, contains 1, match 1, ne 1, wildcard 1+x, --command, -c, +s, -2000
user.id8eq 5, ne 5, is_not_null 10
event.category5eq 4, in 1process, file, network
CommandLine4contains 3, in 3 chmod g+s, chmod u+s, * 4577 *, * 4777 *, * cap_dac_read_search+ep *
Image4starts_with 2, is_not_null 1, wildcard 1/dev/shm/*, /dev/shm/., /home/, /home/*/*, /run/user/*
parent_process_name4in 4, wildcard 2bash, .*, bun, csh, dash
process.group.id4eq 40
process.real_group.id4ne 40
process.real_user.id4ne 40
process.user.id4eq 40
process.parent.args_count3le 2, eq 14, 1

Top indicator values (540 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
16606
event.typeeq
change
577
EventTypeeq
exec
13171
EventTypeeq
uid_change
35
user.ideq
0
512
user.idne
0
516
event.categoryeq
process
4128
parent_process_namein
bash
430
parent_process_namein
csh
426
parent_process_namein
dash
427
parent_process_namein
fish
426
parent_process_namein
ksh
426
parent_process_namein
sh
430
parent_process_namein
tcsh
426
parent_process_namein
zsh
429
process.group.ideq
0
45
process.real_group.idne
0
44
process.real_user.idne
0
44
process.user.ideq
0
45
process_nameeq
chmod
45
process_namein
bash
488
process_namein
dash
478
process_namein
fish
472
process_namein
ksh
473
process_namein
zsh
482
EventTypein
exec
3171
process.argsin
+x
33
process.argsin
444
33
process.argsin
4755
33
process.argsin
755
33

Exclusions (188 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
Imagestarts_with
/bin/
2
Imagestarts_with
/opt/dynatrace/
2
Imagestarts_with
/sbin/
2
Imagestarts_with
/tmp/newroot/
2
Imagestarts_with
/usr/bin/
2
Imagestarts_with
/usr/sbin/
2
ParentImagewildcard
/tmp/newroot/*
2
process_namein
sudo
2
CommandLinewildcard
/bin/sh*sapsysinfo.sh*
1
CommandLinewildcard
sudo -E -H bash -l
1
CommandLinewildcard
sudo su
1
CommandLinewildcard
sudo su -
1
CommandLinewildcard
sudo*BECOME-SUCCESS*
1
CurrentDirectorywildcard
/opt/Elastic/Agent/data/*
1
CurrentDirectorywildcard
/usr/sap/tmp
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)

Sigma 3 rules

Elastic 20 rules

Splunk 5 rules