cacls.exe

  • File Path: C:\WINDOWS\system32\cacls.exe
  • Description: Control ACLs Program

Hashes

Type Hash
MD5 D608F364341AF2E4A0E890878C43AD82
SHA1 4FC4AF846AB3B4178D65F9CF1B22AC76B33C3851
SHA256 279559BA82A45EA6071CB15EC776C32A8781E2C7DBF75F07849A952025A3F649
SHA384 BA994525676F5580F937EFA5B84F027ED26B0C3DE5B33A5497E613FBF99982FC2C9E8D04C4336A814C54D081F2110F86
SHA512 F95D8D5A0DC8A60A7A20B23141648E243AA0A9E9823DBE3CB93934991DDA0508D8B7CED78E056EACC423537C11B811048C2EE40D7CFFB3868D86236114FDD28D
SSDEEP 768:wHBozEH05bfPCax1AiBZDWRL4rNHj00OJAtn0gJPG3CwW:wHCEHQC4294Rj0pebJPGywW
IMP 30254A514CD61AB9D483307AA5A195E8
PESHA1 42BFEDF974958EA0F1DADDE9FAD799049D8F9C2A
PE256 93CF3736B327888E8DAA99D7FC7C49656F1B3DFE522A5DE5C1BEC04212EBA9E4

Runtime Data

Usage (stdout):


 NOTE: Cacls is now deprecated, please use Icacls.

 Displays or modifies access control lists (ACLs) of files

 CACLS filename [/T] [/M] [/L] [/S[:SDDL]] [/E] [/C] [/G user:perm]
        [/R user [...]] [/P user:perm [...]] [/D user [...]]
    filename      Displays ACLs.
    /T            Changes ACLs of specified files in
                  the current directory and all subdirectories.
    /L            Work on the Symbolic Link itself versus the target
    /M            Changes ACLs of volumes mounted to a directory
    /S            Displays the SDDL string for the DACL.
    /S:SDDL       Replaces the ACLs with those specified in the SDDL string
                  (not valid with /E, /G, /R, /P, or /D).
    /E            Edit ACL instead of replacing it.
    /C            Continue on access denied errors.
    /G user:perm  Grant specified user access rights.
                  Perm can be: R  Read
                               W  Write
                               C  Change (write)
                               F  Full control
    /R user       Revoke specified user's access rights (only valid with /E).
    /P user:perm  Replace specified user's access rights.
                  Perm can be: N  None
                               R  Read
                               W  Write
                               C  Change (write)
                               F  Full control
    /D user       Deny specified user access.
 Wildcards can be used to specify more than one file in a command.
 You can specify more than one user in a command.

 Abbreviations:
    CI - Container Inherit.
         The ACE will be inherited by directories.
    OI - Object Inherit.
         The ACE will be inherited by files.
    IO - Inherit Only.
         The ACE does not apply to the current file/directory.
    ID - Inherited.
         The ACE was inherited from the parent directory's ACL.

Usage (stderr):

The system cannot find the file specified.

Loaded Modules:

Path
C:\WINDOWS\system32\cacls.exe
C:\WINDOWS\System32\KERNEL32.DLL
C:\WINDOWS\System32\KERNELBASE.dll
C:\WINDOWS\SYSTEM32\ntdll.dll

Signature

  • Status: Signature verified.
  • Serial: 33000002ED2C45E4C145CF48440000000002ED
  • Thumbprint: 312860D2047EB81F8F58C29FF19ECDB4C634CF6A
  • Issuer: CN=Microsoft Windows Production PCA 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
  • Subject: CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

File Metadata

  • Original Filename: CACLS.EXE.MUI
  • Product Name: Microsoft Windows Operating System
  • Company Name: Microsoft Corporation
  • File Version: 10.0.22000.1 (WinBuild.160101.0800)
  • Product Version: 10.0.22000.1
  • Language: English (United States)
  • Legal Copyright: Microsoft Corporation. All rights reserved.
  • Machine Type: 64-bit

File Scan

  • VirusTotal Detections: 0/73
  • VirusTotal Link: https://www.virustotal.com/gui/file/279559ba82a45ea6071cb15ec776c32a8781e2c7dbf75f07849a952025a3f649/detection

Possible Misuse

The following table contains possible examples of cacls.exe being misused. While cacls.exe is not inherently malicious, its legitimate functionality can be abused for malicious purposes.

Source Source File Example License
sigma proc_creation_win_file_permission_modifications.yml - '\cacls.exe' DRL 1.0
sigma proc_creation_win_hiding_malware_in_fonts_folder.yml CommandLine\|re: '(?i).*(echo\|copy\|type\|file createnew\|cacls).*C:\\\\Windows\\\\Fonts\\\\.*(.sh\|.exe\|.dll\|.bin\|.bat\|.cmd\|.js\|.msh\|.reg\|.scr\|.ps\|.vb\|.jar\|.pl\|.inf\|.cpl\|.hta\|.msi\|.vbs).*' DRL 1.0
atomic-red-team index.md - Atomic Test #2: cacls - Grant permission to specified user or group recursively [windows] MIT License. © 2018 Red Canary
atomic-red-team windows-index.md - Atomic Test #2: cacls - Grant permission to specified user or group recursively [windows] MIT License. © 2018 Red Canary
atomic-red-team T1222.001.md Adversaries can interact with the DACLs using built-in Windows commands, such as icacls, cacls, takeown, and attrib, which can grant adversaries higher permissions on specific files and folders. Further, PowerShell provides cmdlets that can be used to retrieve or modify file and directory DACLs. Specific file and directory modifications may be a required step for many techniques, such as establishing Persistence via Accessibility Features, Boot or Logon Initialization Scripts, or tainting/hijacking other instrumental binary/configuration files via Hijack Execution Flow.</blockquote> MIT License. © 2018 Red Canary
atomic-red-team T1222.001.md - Atomic Test #2 - cacls - Grant permission to specified user or group recursively MIT License. © 2018 Red Canary
atomic-red-team T1222.001.md ## Atomic Test #2 - cacls - Grant permission to specified user or group recursively MIT License. © 2018 Red Canary
signature-base cn_pentestset_tools.yar $s1 = “cacls %s /t /c /e /r administrators” fullword ascii /* PEStudio Blacklist: strings */ CC BY-NC 4.0

Additional Info*

*The information below is copied from MicrosoftDocs, which is maintained by Microsoft. Available under CC BY 4.0 license.


cacls

[!IMPORTANT] This command has been deprecated. Please use icacls instead.

Displays or modifies discretionary access control lists (DACL) on specified files.

Syntax

cacls <filename> [/t] [/m] [/l] [/s[:sddl]] [/e] [/c] [/g user:<perm>] [/r user [...]] [/p user:<perm> [...]] [/d user [...]]

Parameters

Parameter Description
<filename> Required. Displays ACLs of specified files.
/t Changes ACLs of specified files in the current directory and all subdirectories.
/m Changes ACLs of volumes mounted to a directory.
/l Works on the Symbolic Link itself instead of the target.
/s:sddl Replaces the ACLs with those specified in the SDDL string. This parameter is not valid for use with the /e, /g, /r, /p, or /d parameters.
/e Edit an ACL instead of replacing it.
/c Continue after access denied errors.
/g user:<perm> Grants specified user access rights, including these valid values for permission:<ul><li>n - None</li><li>r - Read</li><li>w - Write</li><li>c - Change (write)</li><li>f - Full control</li></ul>
/r user […] Revoke specified user’s access rights. Only valid when used with the /e parameter.
[/p user:<perm> [...] Replace specified user’s access rights, including these valid values for permission:<ul><li>n - None</li><li>r - Read</li><li>w - Write</li><li>c - Change (write)</li><li>f - Full control</li></ul>
[/d user […] Deny specified user access.
/? Displays help at the command prompt.
Sample output
Output Access control entry (ACE) applies to
OI Object inherit. This folder and files.
CI Container inherit. This folder and subfolders.
IO Inherit only. The ACE does not apply to the current file/directory.
No output message This folder only.
(OI)(CI) This folder, subfolders, and files.
(OI)(CI)(IO) Subfolders and files only.
(CI)(IO) Subfolders only.
(OI)(IO) Files only.
Remarks
  • You can use wildcards (? and *) to specify multiple files.

  • You can specify more than one user.

Additional References


MIT License. Copyright (c) 2020-2021 Strontic.