PowerShell Crypto Namespace Class Invocation for Windows Process Creation
Alerts on PowerShell executions that reference System.Security.Cryptography and common crypto class names.
- Product
- windows
- Category
- process_creation
- Author
- Andreas Braathen (mnemonic.io) (SigmaHQ), DRL 1.1
- Published
- 2023-12-01
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows process creation events where PowerShell (powershell.exe or pwsh.exe) is launched with command-line content referencing the System.Security.Cryptography namespace and specific cryptography class names. Attackers may use built-in .NET cryptography APIs to perform on-the-fly decryption or encryption during execution for stealth and payload handling. The detection relies on process creation telemetry containing the process image and the full command line text.
Reporting behind it
- learn.microsoft.comhttps://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography?view=net-8.0
- blogs.vmware.comhttps://blogs.vmware.com/security/2023/11/jupyter-rising-an-update-on-jupyter-infostealer.html
- virustotal.comhttps://www.virustotal.com/gui/file/39102fb7bb6a74a9c8cb6d46419f9015b381199ea8524c1376672b30fffd69d2
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_powershell_crypto_namespace.yml
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: PowerShell Crypto Namespace Class Invocation for Windows Process Creation
id: 4d1f81dc-87e5-4b69-b5be-c2736e28a7a1
status: test
description: This rule flags Windows process creation events where PowerShell (powershell.exe or pwsh.exe) is launched with command-line content referencing the System.Security.Cryptography namespace and specific cryptography class names. Attackers may use built-in .NET cryptography APIs to perform on-the-fly decryption or encryption during execution for stealth and payload handling. The detection relies on process creation telemetry containing the process image and the full command line text.
references:
- https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography?view=net-8.0
- https://blogs.vmware.com/security/2023/11/jupyter-rising-an-update-on-jupyter-infostealer.html
- https://www.virustotal.com/gui/file/39102fb7bb6a74a9c8cb6d46419f9015b381199ea8524c1376672b30fffd69d2
- https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_powershell_crypto_namespace.yml
author: Andreas Braathen (mnemonic.io), Huntrule Team
date: 2023-12-01
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1027.010
- detection.threat-hunting
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith:
- \powershell.exe
- \pwsh.exe
- OriginalFileName:
- PowerShell.EXE
- pwsh.dll
selection_cmdlet_namespace:
CommandLine|contains: System.Security.Cryptography.
selection_cmdlet_classes:
CommandLine|contains:
- .AesCryptoServiceProvider
- .DESCryptoServiceProvider
- .DSACryptoServiceProvider
- .RC2CryptoServiceProvider
- .Rijndael
- .RSACryptoServiceProvider
- .TripleDESCryptoServiceProvider
condition: all of selection_*
falsepositives:
- Classes are legitimately used, but less so when e.g. parents with low prevalence or decryption of content in temporary folders.
level: medium
license: DRL-1.1
related:
- id: ad856965-f44d-42a8-945e-bbf7bd03d05a
type: derived