File and Directory Permissions Modification T1222

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

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

Authoring guide

Patterns shared across the 50 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 (32 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
CommandLine23contains 9, regex_match 8, in 5, ends_with 1, wildcard 1(?i)\s+-r\s+, (?i)\s\+h\s+, (?i)\s+\/grant\s+everyone, */g *, */grant*
EventID21eq 215136, 1, 4688, 4104, 4103
process_name16in 9, eq 7icacls.exe, cacls.exe, xcacls.exe, attrib.exe, takeown.exe
Channel10eq 10, in 10
eventtype10eq 10
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
Image4ends_with 4, contains 1\111.exe, \attrib.exe, \cacls.exe, \cmd.exe, \icacls.exe
OperationType4eq 4%%14674
Type4eq 4
aceAccessRights4in 4All extended rights, All validated writes, CC, Full control, LC
SubjectUserName3ends_with 2, eq 1$, srvexchange01$, srvexchange02$, srvexchange03$
event.type3eq 3start
process.args3eq 3, wildcard 1*:F, *:f, *grant*, +h, /f

Top indicator values (196 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
EventIDeq
5136
1029
EventIDeq
1
4232
EventIDeq
4688
4312
EventIDeq
4104
3268
EventIDeq
4103
2105
process_namein
cacls.exe
88
process_namein
icacls.exe
88
process_namein
xcacls.exe
88
OperationTypeeq
%%14674
417
AttributeLDAPDisplayNameeq
ntsecuritydescriptor
37
CommandLinein
*/grant*
33
CommandLinein
*/g *
22
CommandLinein
*/g:*
22
CommandLineregex_match
(?i)\s+-r\s+
33
CommandLineregex_match
(?i)\s\+h\s+
33
CommandLineregex_match
(?i)\s+\/grant\s+everyone
22
ObjectClasseq
domainDNS
34
aceAccessRightsin
Full control
34
event.typeeq
start
3241
process_nameeq
attrib.exe
35
process_nameeq
takeown.exe
34
AccessMaskeq
0x40000
22
CommandLinecontains
/inheritance:r
22
CommandLinecontains
behavior
23
CommandLinecontains
set
211
CommandLinecontains
symlinkevaluation
22
Imageends_with
\takeown.exe
22
OriginalFileNameeq
attrib.exe
25
ScriptBlockTextcontains
-aclobject
22
ScriptBlockTextcontains
set-acl
22

Exclusions (27 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
aceTypein
*denied*
2
aceTypein
D
2
aceTypein
OD
2
aceTypein
XD
2
CommandLinecontains
:\program files (x86)\avira
1
CommandLinecontains
:\program files\avira
1
CommandLinecontains
:\program files\microsoft vs code
1
CommandLinecontains
\appdata\local\programs\microsoft vs code
1
CommandLinecontains
drawio.bkp
1
CommandLinecontains
drawio.dtmp
1
CommandLinecontains
icacls c:\programdata\dynatrace\gateway\config\config.properties /grant :r
1
CommandLinecontains
s-1-5-19:f
1
CommandLineends_with
ICACLS C:\ProgramData\dynatrace\gateway\config\connectivity.history /reset
1
CommandLinewildcard
attrib +R +H +S +A *.cui
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.

Sigma 12 rules

Elastic 4 rules

Splunk 34 rules