cacls.exe

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

Hashes

Type Hash
MD5 B75DBE7670516FE2F1C06211006299B2
SHA1 787DEEEEC2690EE3264E4A283193EFF8E5E37C3E
SHA256 D134EB94124645E73C9BF7F97A834A6E6261D2890CC9BD11A75A34F4E16E812C
SHA384 2D4A97A4A6E2677D1F4F29828868489777ED29F1A9DE03DE4CAAE20FC1A3DE72A2F2BE98B1FBF1AB6DD460C39ED29FF3
SHA512 215046CE99E4DFE2645F9DBC230BB29891B3AE985882419738BDE15024E41B5B19110A14DA6F0118A72F270A218C87378C7213DD69B0024C1BBEE6B3252D6353
SSDEEP 768:462i0EvHYstIAp5m8ubMFdQDpRuvu0tiPbND+G4bU:b2ibbIA3m8rFaDp820kxD+GuU

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.

Signature

  • Status: Signature verified.
  • Serial: 330000023241FB59996DCC4DFF000000000232
  • Thumbprint: FF82BC38E1DA5E596DF374C53E3617F7EDA36B06
  • 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.18362.1 (WinBuild.160101.0800)
  • Product Version: 10.0.18362.1
  • Language: English (United States)
  • Legal Copyright: Microsoft Corporation. All rights reserved.

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.