File and Directory Permissions Modification: Linux and Mac Permissions T1222.002

Tactic: Defense Impairment

Adversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files. File and directory permissions are commonly managed by ACLs configured by the file or directory owner, or users with the appropriate permissions. File and directory ACL implementations vary by platform, but generally explicitly designate which users or groups can perform which actions (read, write, execute, etc.).

Events covered

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

ProviderEventTitle
Linux-AuditdEvent ID 1309EXECVE
Sysmon-for-LinuxEvent ID 1Process Create

Authoring guide

Patterns shared across the 18 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 (22 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
process_name11eq 6, in 5, is_not_null 1chmod, chown, chattr, bash, busybox
event.type10eq 9, in 1start, change, creation
host.os.type9eq 9
EventType8eq 4, in 4exec, exec_event, ProcessRollup2, changed-file-ownership-of, start
process.args6starts_with 4, in 3, wildcard 2, eq 1, ne 1+x, +*i*, -*i*, --reference=, -R
CommandLine4contains 4, eq 1, starts_with 1 -i , root , /.library/, /etc/, /opt/
Image3ends_with 2, starts_with 1./, /boot/, /chattr, /chmod, /dev/shm/
event.category3eq 2, in 1file, process
proctitle3contains 2, eq 1, in 1 -i, * 754 *, * 755 *, * 777 *, *chown *root*
sourcetype3eq 3auditd
TargetFilename2in 1, starts_with 1/dev/shm/, /etc/passwd, /etc/shadow, /etc/sudoers, /run/
a02contains 2chattr, chmod, chown
type2eq 2EXECVE
CurrentDirectory1in 1/dev/shm, /tmp, /var/tmp
ParentCommandLine1contains 1, ends_with 1.postinst configure, /update-shells, /var/lib/dpkg/info/

Top indicator values (168 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
8606
EventTypeeq
exec
4171
EventTypein
exec
4171
EventTypein
exec_event
4139
EventTypein
start
4134
EventTypein
ProcessRollup2
3117
EventTypein
executed
388
EventTypein
process_started
374
process.argsin
+x
33
process.argsin
444
33
process.argsin
4755
33
process.argsin
755
33
process.argsin
777
33
process.argsin
000
22
process_nameeq
chmod
35
process_namein
chmod
34
process_namein
chown
24
sourcetypeeq
auditd
356
typeeq
EXECVE
228
CommandLinecontains
-i
14
CommandLinecontains
root
1
CommandLinecontains
/.library/
1
CommandLinecontains
/etc/
1
CommandLinecontains
/opt/
1
CommandLinecontains
/root/
1
CommandLinecontains
/tmp/
19
CommandLinecontains
chmod --reference=/etc/shells
1
CommandLinecontains
chown
1
CommandLinecontains
passwd
13
CommandLinecontains
shadow
17

Exclusions (129 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
ParentImagein
/opt/puppetlabs/puppet/bin/ruby
2
parent_process_namein
sudo
2
parent_process_namein
systemd
2
CommandLinecontains
/etc/
1
CommandLinecontains
chmod --reference=/etc/shells
1
CommandLineeq
/bin/setfacl --restore=-
1
CommandLineeq
chmod 0775 /etc/landscape/
1
CommandLineeq
chmod 644 /etc/apparmor.d/tunables/home.d/ubuntu
1
CommandLinein
chmod 755 /etc/update-motd.d/
1
CommandLinein
chmod 777 /etc/update-motd.d/
1
CommandLinestarts_with
chmod 700 /tmp/apt-key-gpghome.
1
CommandLinestarts_with
chmod 755 /var/tmp/mkinitramfs
1
Imageeq
./usr/bin/podman
1
Imageeq
./usr/lib/snapd/snap-update-ns
1
Imageeq
/tmp/newroot/snap/snapd/current/usr/bin/snap
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 4 rules

Elastic 10 rules

Splunk 4 rules