Windows certutil.exe Base64/Hex Decode via -decode or -decodehex Flags
Flags certutil.exe use for decoding base64 or hex data via -decode or -decodehex on Windows.
- Product
- windows
- Category
- process_creation
- Author
- Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2023-02-15
- Updated
- 2026-07-31
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies execution of certutil.exe when invoked with either the -decode or -decodehex flags, indicating decoding of base64 or hex-encoded content. Attackers can use this to reconstruct an encoded payload or configuration before subsequent execution. It relies on Windows process creation telemetry, matching the certutil binary and specific command-line arguments.
Reporting behind it
- learn.microsoft.comhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- unit42.paloaltonetworks.comhttps://unit42.paloaltonetworks.com/new-babyshark-malware-targets-u-s-national-security-think-tanks/
- news.sophos.comhttps://news.sophos.com/en-us/2021/04/13/compromised-exchange-server-hosting-cryptojacker-targeting-other-exchange-servers/
- twitter.comhttps://twitter.com/JohnLaTwC/status/835149808817991680
- learn.microsoft.comhttps://learn.microsoft.com/en-us/archive/blogs/pki/basic-crl-checking-with-certutil
- lolbas-project.github.iohttps://lolbas-project.github.io/lolbas/Binaries/Certutil/
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_certutil_decode.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows certutil.exe Base64/Hex Decode via -decode or -decodehex Flags
id: c1c63709-20fb-482d-9471-8ea6b3b0f2cd
status: test
description: This rule identifies execution of certutil.exe when invoked with either the -decode or -decodehex flags, indicating decoding of base64 or hex-encoded content. Attackers can use this to reconstruct an encoded payload or configuration before subsequent execution. It relies on Windows process creation telemetry, matching the certutil binary and specific command-line arguments.
references:
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil
- https://unit42.paloaltonetworks.com/new-babyshark-malware-targets-u-s-national-security-think-tanks/
- https://news.sophos.com/en-us/2021/04/13/compromised-exchange-server-hosting-cryptojacker-targeting-other-exchange-servers/
- https://twitter.com/JohnLaTwC/status/835149808817991680
- https://learn.microsoft.com/en-us/archive/blogs/pki/basic-crl-checking-with-certutil
- https://lolbas-project.github.io/lolbas/Binaries/Certutil/
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_certutil_decode.yml
author: Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community, Huntrule Team
date: 2023-02-15
modified: 2025-06-04
tags:
- attack.stealth
- attack.t1027
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: \certutil.exe
- OriginalFileName: CertUtil.exe
selection_cli:
CommandLine|contains|windash:
- "-decode "
- "-decodehex "
condition: all of selection_*
falsepositives:
- Unknown
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_certutil_decode/info.yml
license: DRL-1.1
related:
- id: cc9cbe82-7bc0-4ef5-bc23-bbfb83947be7
type: derived