Sigma rule: Certificate Exported Via PowerShell - ScriptBlock

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-3dfaf7fea285, updated 2023-05-18T00:00:00.000Z.

Rule

Title
Certificate Exported Via PowerShell - ScriptBlock
Status
test
Level
medium
Author
Florian Roth (Nextron Systems)
Date
2021-04-23
Modified
2023-05-18
File
rules/windows/powershell/powershell_script/posh_ps_export_certificate.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects calls to cmdlets inside of PowerShell scripts that are used to export certificates from the local certificate store. Threat actors were seen abusing this to steal private keys from compromised machines.

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    ScriptBlockText|contains:
        - 'Export-PfxCertificate'
        - 'Export-Certificate'
filter_optional_module_export:
    ScriptBlockText|contains: 'CmdletsToExport = @('
condition: selection and not 1 of filter_optional_*

False positives (as the rule lists them)

  • Legitimate certificate exports by administrators. Additional filters might be required.

Tags

  • attack.credential-access
  • attack.t1552.004

MITRE ATT&CK ids this rule names

Related rules

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_export_certificate.yml

Sources and licences

  • SigmaHQ

    "Certificate Exported Via PowerShell - ScriptBlock" by Florian Roth (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_export_certificate.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Certificate Exported Via PowerShell - ScriptBlock",
entity page, dataset version ref-3dfaf7fea285, updated 2023-05-18T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/aa7a3fce-bef5-4311-9cc1-5f04bb8c308c (accessed 2026-11-03).
Underlying source: SigmaHQ rule aa7a3fce-bef5-4311-9cc1-5f04bb8c308c, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.