SharpDPAPI Tool Execution via Command-Line and PE Metadata on Windows
Flags SharpDPAPI executions on Windows by combining SharpDPAPI PE metadata with distinctive DPAPI-related CommandLine arguments.
- Product
- windows
- Category
- process_creation
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2024-06-26
- Updated
- 2026-07-31
ATT&CK techniques
Priv Esc → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies execution of SharpDPAPI.exe by matching the process image path or PE metadata (OriginalFileName) and corroborating the command line with SharpDPAPI-specific arguments and option patterns. Attackers may use SharpDPAPI to interact with DPAPI-related secrets and encryption material as part of credential and privilege escalation activity. Telemetry relies on Windows process creation events including the executable image name and full command line, plus PE metadata fields when available.
Reporting behind it
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: SharpDPAPI Tool Execution via Command-Line and PE Metadata on Windows
id: b9dd14f4-70db-4f60-a552-8180517e128c
status: test
description: This rule identifies execution of SharpDPAPI.exe by matching the process image path or PE metadata (OriginalFileName) and corroborating the command line with SharpDPAPI-specific arguments and option patterns. Attackers may use SharpDPAPI to interact with DPAPI-related secrets and encryption material as part of credential and privilege escalation activity. Telemetry relies on Windows process creation events including the executable image name and full command line, plus PE metadata fields when available.
references:
- https://github.com/GhostPack/SharpDPAPI
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_hktl_sharp_dpapi_execution.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2024-06-26
tags:
- attack.privilege-escalation
- attack.stealth
- attack.t1134.001
- attack.t1134.003
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: \SharpDPAPI.exe
- OriginalFileName: SharpDPAPI.exe
selection_other_cli:
CommandLine|contains:
- " backupkey "
- " blob "
- " certificates "
- " credentials "
- " keepass "
- " masterkeys "
- " rdg "
- " vaults "
selection_other_options_guid:
CommandLine|contains|all:
- " {"
- "}:"
selection_other_options_flags:
CommandLine|contains:
- " /file:"
- " /machine"
- " /mkfile:"
- " /password:"
- " /pvk:"
- " /server:"
- " /target:"
- " /unprotect"
condition: selection_img or (selection_other_cli and 1 of selection_other_options_*)
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: c7d33b50-f690-4b51-8cfb-0fb912a31e57
type: derived