Sigma rule: Registry Set With Crypto-Classes From The "Cryptography" PowerShell Namespace
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-8b5f239cb888, updated 2023-12-01T00:00:00.000Z.
Rule
- Title
- Registry Set With 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/registry/registry_set/registry_set_powershell_crypto_namespace.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the setting of a registry inside the "\Shell\Open\Command" value with PowerShell 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
- registry_set
Detection
selection_key:
TargetObject|contains: '\Shell\Open\Command'
selection_value_img:
Details|contains:
- 'powershell'
- 'pwsh'
selection_value_namespace:
Details|contains: 'System.Security.Cryptography.'
selection_value_classes:
Details|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.persistence
- attack.privilege-escalation
- attack.stealth
- attack.t1059.001
- attack.t1027.010
- attack.t1547.001
- 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://squiblydoo.blog/2023/11/07/october-2023-solarmarker/
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/registry/registry_set/registry_set_powershell_crypto_namespace.yml
Sources and licences
SigmaHQ
"Registry Set With 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/registry/registry_set/registry_set_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: Registry Set With Crypto-Classes From The "Cryptography" PowerShell Namespace",
entity page, dataset version ref-8b5f239cb888, updated 2023-12-01T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1c2a3268-3881-414a-80af-a5b313b14c0e (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1c2a3268-3881-414a-80af-a5b313b14c0e, 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.