Suspicious X509Enrollment usage in Windows PowerShell scripts

Alerts on PowerShell script blocks containing X509Enrollment.CBinaryConverter and a specific enrollment GUID.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-12-23
Updated
2026-07-31
title: Suspicious X509Enrollment usage in Windows PowerShell scripts
id: 99723f29-1275-4756-a2b4-8bce5c0cd04d
related:
  - id: 114de787-4eb2-48cc-abdb-c0b449f93ea4
    type: similar
  - id: 504d63cb-0dba-4d02-8531-e72981aace2c
    type: derived
status: test
description: This rule flags PowerShell script content that references X509Enrollment components, including the CBinaryConverter class and a specific X509Enrollment identifier. Attackers may use these .NET objects to interact with certificate enrollment or manipulate certificate-related data as part of broader abuse. Detection relies on Script Block Logging telemetry capturing the referenced class name and GUID within the executed PowerShell script text.
references:
  - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=42
  - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=41
  - https://learn.microsoft.com/en-us/dotnet/api/microsoft.hpc.scheduler.store.cx509enrollmentwebclassfactoryclass?view=hpc-sdk-5.1.6115
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_x509enrollment.yml
author: frack113, Huntrule Team
date: 2022-12-23
tags:
  - attack.defense-impairment
  - attack.t1553.004
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection:
    ScriptBlockText|contains:
      - X509Enrollment.CBinaryConverter
      - 884e2002-217d-11da-b2a4-000e7bbb2b09
  condition: selection
falsepositives:
  - Legitimate administrative script
level: medium
license: DRL-1.1