Sigma rule: Invocation Of Crypto-Classes From The "Cryptography" PowerShell Namespace
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-d8597092c838, updated 2023-12-01T00:00:00.000Z.
Rule
- Title
- Invocation Of Crypto-Classes From The "Cryptography" PowerShell Namespace
- Status
- test
- Level
- medium
- Author
- Andreas Braathen (mnemonic.io)
- Date
- 2023-12-01
- File
- rules-threat-hunting/windows/process_creation/proc_creation_win_powershell_crypto_namespace.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the invocation of PowerShell commands with references to classes from the "System.Security.Cryptography" namespace.
The PowerShell namespace "System.Security.Cryptography" provides classes for on-the-fly encryption and decryption.
These can be used for example in decrypting malicious payload for defense evasion.
Log source
- 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_*False positives (as the rule lists them)
- Classes are legitimately used, but less so when e.g. parents with low prevalence or decryption of content in temporary folders.
Tags
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1027.010
- detection.threat-hunting
MITRE ATT&CK ids this rule names
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
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/process_creation/proc_creation_win_powershell_crypto_namespace.yml
Sources and licences
SigmaHQ
"Invocation Of Crypto-Classes From The "Cryptography" PowerShell Namespace" by Andreas Braathen (mnemonic.io) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/process_creation/proc_creation_win_powershell_crypto_namespace.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Invocation Of Crypto-Classes From The "Cryptography" PowerShell Namespace",
entity page, dataset version ref-d8597092c838, updated 2023-12-01T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/ad856965-f44d-42a8-945e-bbf7bd03d05a (accessed 2026-11-03).
Underlying source: SigmaHQ rule ad856965-f44d-42a8-945e-bbf7bd03d05a, 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.