cacls.exe

  • File Path: C:\Windows\SysWOW64\cacls.exe
  • Description: Control ACLs Program

Hashes

Type Hash
MD5 E1FF71AB0680F2043DC70A4DA64A4384
SHA1 73EC42332FE02036E5D18A76BCEC9F281456FF2C
SHA256 BC42118AAA1877EEFF34B9A93DCA8B94ED50109FB6436AE22E27D8E3B2BCA78F
SHA384 4ACBF18E4056D99356968D5E6EF77AB14626755224B50A0FD64A1C4C54125985724F489FB6408D8170621CAA7F1EDF19
SHA512 2B2422D3F36964771398164E50B1B80D14F41C82C30AE2D8552534AFCEC0123CB81028205C4148F4A55853D7EBF5917E1DCF6DC89F4624C581E0ECB146FE0C5A
SSDEEP 384:5SC64JchhMN4djZ8aN62ym/mBEGRVYg3d1FLZBFvZhmi0DqGwNR9WXDWH:A4JchtZjA2nmEivHpeDqGwaI
IMP 29323867CDC9A8BC7E9164C47C4E0B13
PESHA1 51889B7ABB53080A5D46119678ACFFD626CF7E91
PE256 6143891A3A5300760AD6604E77E05DA6166AB4D5454FC8AFBEC768CD8CFD9988

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.

Loaded Modules:

Path
C:\Windows\SYSTEM32\ntdll.dll
C:\Windows\System32\wow64.dll
C:\Windows\System32\wow64cpu.dll
C:\Windows\System32\wow64win.dll
C:\Windows\SysWOW64\cacls.exe

Signature

  • Status: Signature verified.
  • Serial: 33000001C422B2F79B793DACB20000000001C4
  • Thumbprint: AE9C1AE54763822EEC42474983D8B635116C8452
  • 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
  • Product Name: Microsoft Windows Operating System
  • Company Name: Microsoft Corporation
  • File Version: 10.0.17763.1 (WinBuild.160101.0800)
  • Product Version: 10.0.17763.1
  • Language: English (United States)
  • Legal Copyright: Microsoft Corporation. All rights reserved.
  • Machine Type: 32-bit

File Scan

  • VirusTotal Detections: 0/68
  • VirusTotal Link: https://www.virustotal.com/gui/file/bc42118aaa1877eeff34b9a93dca8b94ed50109fb6436ae22e27d8e3b2bca78f/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.