File and Directory Permissions Modification T1222

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

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

Authoring guide

Patterns shared across the 79 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 (61 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
CommandLine27contains 13, regex_match 8, in 5, ends_with 1, eq 1, starts_with 1, wildcard 1(?i)\s+-r\s+, (?i)\s\+h\s+, (?i)\s+\/grant\s+everyone, */g *, */grant*
process_name27in 14, eq 13, is_not_null 1icacls.exe, cacls.exe, xcacls.exe, chmod, attrib.exe
EventID21eq 215136, 1, 4688, 4104, 4103
event.type13eq 12, in 1start, change, creation
EventType12eq 7, in 5exec, exec_event, ProcessRollup2, Directory Service Access, changed-file-ownership-of
Channel10eq 10, in 10
eventtype10eq 10
host.os.type9eq 9
process.args9eq 4, starts_with 4, in 3, wildcard 3, ne 1+x, *:F, *:f, *grant*, +*i*
Image7ends_with 6, contains 1, starts_with 1./, /boot/, /chattr, /chmod, /dev/shm/
ObjectClass7eq 7domainDNS, group, groupPolicyContainer, organizationalUnit, user
AttributeLDAPDisplayName5eq 4, in 1ntsecuritydescriptor, gpcmachineextensionnames, msds-allowedtoactonbehalfofotheridentity, msds-allowedtodelegateto, mstsinitialprogram
OriginalFileName5eq 5attrib.exe, cacls.exe, cmd.exe, fsutil.exe, icacls.exe
OperationType4eq 4%%14674
Type4eq 4

Top indicator values (394 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
11606
EventIDeq
5136
1030
EventIDeq
1
4237
EventIDeq
4688
4313
EventIDeq
4104
3268
process_namein
cacls.exe
88
process_namein
icacls.exe
88
process_namein
xcacls.exe
88
EventTypeeq
exec
4171
EventTypein
exec
4171
EventTypein
exec_event
4139
EventTypein
start
4134
EventTypein
ProcessRollup2
3117
EventTypein
executed
388
EventTypein
process_started
374
OperationTypeeq
%%14674
417
AttributeLDAPDisplayNameeq
ntsecuritydescriptor
37
CommandLinein
*/grant*
33
CommandLineregex_match
(?i)\s+-r\s+
33
CommandLineregex_match
(?i)\s\+h\s+
33
ObjectClasseq
domainDNS
34
aceAccessRightsin
Full control
34
process.argsin
+x
33
process.argsin
444
33
process.argsin
4755
33
process.argsin
755
33
process.argsin
777
33
process_nameeq
attrib.exe
35
process_nameeq
chmod
35
process_nameeq
takeown.exe
34

Exclusions (165 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
new_aceeq
old_values
6
ParentImagein
/opt/puppetlabs/puppet/bin/ruby
2
aceTypein
*denied*
2
aceTypein
D
2
aceTypein
OD
2
aceTypein
XD
2
parent_process_namein
sudo
2
parent_process_namein
systemd
2
responseStatus.codege
1
2
responseStatus.codege
400
2
responseStatus.codele
16
2
usernamein
aksService
2
usernamein
masterclient
2
usernamestarts_with
system:
2
CommandLinecontains
/etc/
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 18 rules

Elastic 17 rules

Splunk 39 rules

Kusto 1 rule

Panther 4 rules