CmdID / Techniques / T1222
T1222.001 File and Directory Permissions Modification: Windows Permissions
Adversaries may modify file or directory permissions/attributes to evade access control lists (ACLs) and access protected files. MITRE ATT&CK
4 Sigma rules T1222.001 on attack.mitre.org
Part of
Sigma rules tagged with it
Command lines CmdID reads as it
To remove the Read-only attribute from files in the public directory and its subdirectories on a disk in drive b:, type on the page for attrib
attrib -r b:\public\*.* /sIdentifyRemove a specific attribute of files or directories on the page for attrib
attrib -r path\to\file_or_directory1 path\to\file_or_directory2 ...IdentifyTo grant the user User1 Delete and Write DAC permissions to a file named Test1, type on the page for icacls
icacls test1 /grant User1:(d,wdac)IdentifyTo grant the user defined by SID S-1-1-0 Delete and Write DAC permissions to a file named TestFile, type on the page for icacls
icacls TestFile /grant *S-1-1-0:(d,wdac)IdentifyTake ownership of the specified directory on the page for takeown
takeown /d path\to\directoryIdentifyTake ownership of the specified directory and all subdirectories on the page for takeown
takeown /r /d path\to\directoryIdentifyChange ownership to the Administrator group instead of the current user on the page for takeown
takeown /a /f path\to\fileIdentifyAn example is here when CmdID’s reading of it names T1222.001: a Sigma rule it trips is tagged with it, or its abuse is documented as it.