Hayabusa medium test sigma

Certificate Exported Via PowerShell - ScriptBlock

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.

View Source

Detection Logic

{
  "ps_script": {
    "EventID": 4104,
    "Channel": [
      "Microsoft-Windows-PowerShell/Operational",
      "PowerShellCore/Operational"
    ]
  },
  "selection": {
    "ScriptBlockText
| contains": [
      "Export-PfxCertificate",
      "Export-Certificate"
    ]
  },
  "filter_optional_module_export": {
    "ScriptBlockText
| contains": "CmdletsToExport = @("
  },
  "condition": "ps_script and (selection and not 1 of filter_optional_*)"
}

False Positives

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

Field Validations

Loading…

Comments (0)

Loading comments...