Windows File Writes Matching DPAPI Backup Key and Certificate Export Filenames

Alerts on Windows file events for DPAPI backup key/certificate filenames ending in .cer/.key/.pfx/.pvk.

FreeReviewedSigma · High · v2
Product
windows
Category
file_event
Author
Nounou Mbeiri, Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2024-06-26
Updated
2026-07-31
title: Windows File Writes Matching DPAPI Backup Key and Certificate Export Filenames
id: e3a028db-f1b2-4609-825b-507d2ea26e5f
status: test
description: Identifies Windows file events where the target filename contains DPAPI-related backup key prefixes (ntds_capi_, ntds_legacy_, ntds_unknown_) and ends with certificate/key extensions (.cer, .key, .pfx, .pvk). This pattern is commonly associated with tools that export or steal DPAPI backup keys and certificates, which attackers can use to decrypt protected credentials. Detection relies on file event telemetry that includes the target filename.
references:
  - https://www.dsinternals.com/en/dpapi-backup-key-theft-auditing/
  - https://github.com/MichaelGrafnetter/DSInternals/blob/39ee8a69bbdc1cfd12c9afdd7513b4788c4895d4/Src/DSInternals.Common/Data/DPAPI/DPAPIBackupKey.cs#L28-L32
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_susp_dpapi_backup_and_cert_export_ioc.yml
author: Nounou Mbeiri, Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2024-06-26
tags:
  - attack.credential-access
  - attack.t1555
  - attack.t1552.004
logsource:
  product: windows
  category: file_event
detection:
  selection:
    TargetFilename|contains:
      - ntds_capi_
      - ntds_legacy_
      - ntds_unknown_
    TargetFilename|endswith:
      - .cer
      - .key
      - .pfx
      - .pvk
  condition: selection
falsepositives:
  - Unlikely
level: high
license: DRL-1.1
related:
  - id: 7892ec59-c5bb-496d-8968-e5d210ca3ac4
    type: derived