Skip to content
Threat Feed
high advisory

Abuse of Esentutl.exe for Sensitive Credential File Extraction

Adversaries are leveraging the legitimate Windows binary 'esentutl.exe' to bypass file locks and perform unauthorized copies of system credential databases such as NTDS.dit and SAM.

Esentutl.exe is a native Windows utility designed for maintenance of Extensible Storage Engine (ESE) databases. Threat actors frequently exploit this utility as a Living-off-the-Land (LotL) technique to access and exfiltrate sensitive files that are normally locked by the operating system, including the SAM, SYSTEM, and NTDS.dit files. By utilizing the copy or recovery features of esentutl.exe, attackers can bypass standard file access permissions without needing to deploy custom, potentially detectable, malware. This technique is a common stage in post-exploitation activities aimed at harvesting domain-wide credentials. Defenders should monitor for instances where this binary is invoked with command-line arguments indicative of file copying or volume shadow copy interaction, specifically targeting sensitive system registry and database paths.

Attack Chain

  1. Initial compromise of a workstation or server via established access vectors.
  2. Escalation of privileges to local administrator or SYSTEM level, which is required to access sensitive system files.
  3. Discovery of the file path for target databases, such as C:\Windows\NTDS\ntds.dit or registry hives in C:\Windows\System32\config.
  4. Execution of 'esentutl.exe' with specific flags (e.g., '/y' for copy) to target the locked source file.
  5. The utility bypasses standard file locks by reading the file at the system/volume level.
  6. The sensitive file is written to an attacker-controlled directory (e.g., C:\ProgramData\ or temporary folders).
  7. Exfiltration of the copied credential database files for offline extraction and cracking (e.g., via Mimikatz or SecretsDump).

Impact

Successful exploitation allows attackers to gain unauthorized access to domain hashes and local password secrets. This leads to full domain compromise, lateral movement, and persistent access to the enterprise environment. Targeted sectors include any organization utilizing Windows Active Directory.

Recommendation

  • Deploy the provided Sigma rule to detect suspicious executions of esentutl.exe targeting system registry and database files.
  • Enable command-line logging for process creation events to ensure visibility into the arguments passed to binaries.
  • Baseline legitimate usage of esentutl.exe in your environment to distinguish between administrative maintenance and potential credential dumping attempts.
  • Restrict access to sensitive system directories and monitor for unauthorized file copies or transfers involving registry hives and NTDS.dit.

Immediate actions

Deploy Sigma detection rule to monitor for esentutl.exe abuse

Detection Engineering 48h

Threat Hunt

Search for instances of esentutl.exe interacting with system configuration files

T1003.002 high high confidence hunt now

Data: Process creation events

Detection coverage 1

Detect Esentutl.exe Copying Sensitive System Files

high

Detects the use of esentutl.exe to copy sensitive system files such as SAM, SYSTEM, or NTDS.dit, often used for credential harvesting

sigma tactics: credential-access techniques: T1003.002 sources: process_creation, windows

Detection queries are available on the platform. Get full rules →