Detection rules › Sigma

HackTool - SharpDPAPI Execution

Severity
high
Author
Nasreddine Bencherchali (Nextron Systems)
Source
upstream

Detects the execution of the SharpDPAPI tool based on CommandLine flags and PE metadata. SharpDPAPI is a C# port of some DPAPI functionality from the Mimikatz project.

MITRE ATT&CK coverage

TacticTechniques
Privilege EscalationT1134.001 Access Token Manipulation: Token Impersonation/Theft, T1134.003 Access Token Manipulation: Make and Impersonate Token
Defense EvasionT1134.001 Access Token Manipulation: Token Impersonation/Theft, T1134.003 Access Token Manipulation: Make and Impersonate Token

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: selection_img

or:
Image|endswith: '\SharpDPAPI.exe'
OriginalFileName: SharpDPAPI.exe

Stage 2: selection_other_cli

or:
CommandLine|contains: ' backupkey '
CommandLine|contains: ' blob '
CommandLine|contains: ' certificates '
CommandLine|contains: ' credentials '
CommandLine|contains: ' keepass '
CommandLine|contains: ' masterkeys '
CommandLine|contains: ' rdg '
CommandLine|contains: ' vaults '

Stage 3: 1 of selection_other_options_guid

CommandLine|contains: ' {'
CommandLine|contains: '}:'

Stage 4: 1 of selection_other_options_flags

or:
CommandLine|contains: ' /file:'
CommandLine|contains: ' /machine'
CommandLine|contains: ' /mkfile:'
CommandLine|contains: ' /password:'
CommandLine|contains: ' /pvk:'
CommandLine|contains: ' /server:'
CommandLine|contains: ' /target:'
CommandLine|contains: ' /unprotect'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • /file:
  • /machine
  • /mkfile:
  • /password:
  • /pvk:
  • /server:
  • /target:
  • /unprotect
  • backupkey
  • blob
  • certificates
  • credentials
  • keepass
  • masterkeys
  • rdg
  • vaults
  • {
  • }:
Imageends_with
  • \SharpDPAPI.exe
OriginalFileNameeq
  • SharpDPAPI.exe