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

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

Authoring guide

These 88 rules share fields, values, and exclusions.

Fields filtered most (60 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
process_basename32eq 18, in 14, is_not_null 1, wildcard 1icacls.exe, cacls.exe, chmod, xcacls.exe, chattr
CommandLine29contains 14, regex_match 9, 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*
EventID24eq 245136, 1, 4688, 4104, 4103
EventType17eq 12, in 5exec, exec_event, ProcessRollup2, start, Directory Service Access
event.type17eq 16, in 1start, change, creation
process.args14starts_with 6, wildcard 6, eq 5, in 5+x, +*i*, -*i*, /bin/*, /dev/shm/*
Image9ends_with 6, eq 2, contains 1, starts_with 1/bin/chattr, /usr/bin/chattr, /usr/local/bin/chattr, ./*, /boot/*
ObjectClass7eq 7domainDNS, group, groupPolicyContainer, organizationalUnit, user
OriginalFileName6eq 6ATTRIB.EXE, iCACLS.EXE, CACLS.EXE, Cmd.Exe, PowerShell.EXE
AttributeLDAPDisplayName5eq 4, in 1ntSecurityDescriptor, gPCMachineExtensionNames, msDS-AllowedToActOnBehalfOfOtherIdentity, msDS-AllowedToDelegateTo, msTSInitialProgram
OperationType4eq 4%%14674
aceAccessRights4in 4All extended rights, All validated writes, CC, Full control, LC
event.outcome4eq 4success, Success
EventData3contains 3, regex_match 3"ObjectClass">organizationalUnit, "OperationType">%%14674, (?i)OU=Domain Controllers, "ObjectClass">domainDNS, (?i)DC=
ParentImage3is_not_null 2, starts_with 1, ./*, /dev/shm/*, /tmp/*

Top indicator values (492 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
141036
EventIDeq
5136
1025
EventIDeq
1
4226
EventIDeq
4688
4284
EventIDeq
4104
3269
process_basenamein
cacls.exe
88
process_basenamein
icacls.exe
88
process_basenamein
xcacls.exe
88
EventTypeeq
exec
7547
process.argsin
+x
57
process.argsin
777
57
process.argsin
4755
44
process.argsin
755
44
process_basenameeq
chmod
510
process_basenameeq
takeown.exe
45
EventTypein
exec
4180
EventTypein
exec_event
4135
EventTypein
start
4157
EventTypein
ProcessRollup2
3119
EventTypein
executed
385
EventTypein
process_started
377
OperationTypeeq
%%14674
416
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
event.outcomeeq
Success
3306
process.argseq
/F
35

Exclusions (264 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
new_aceeq
old_values
6
parent_process_basenamein
sudo
3
parent_process_basenamein
systemd
2
ParentCommandLineeq
runc init
2
aceTypein
*denied*
2
aceTypein
D
2
aceTypein
OD
2
aceTypein
XD
2
responseStatusis_not_null
2
responseStatus.codege
1
2
responseStatus.codege
400
2
responseStatus.codele
16
2
usernamein
aksService
2
usernamein
masterclient
2
usernameis_not_null
2

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 18 rules

Elastic 22 rules

Splunk 40 rules

Kusto 4 rules

Panther 4 rules