Sigma rule: ConvertTo-SecureString Cmdlet Usage Via CommandLine
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-6ff6609f5df3, updated 2023-02-01T00:00:00.000Z.
Rule
- Title
- ConvertTo-SecureString Cmdlet Usage Via CommandLine
- Status
- test
- Level
- medium
- Author
- Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton
- Date
- 2020-10-11
- Modified
- 2023-02-01
- File
- rules/windows/process_creation/proc_creation_win_powershell_cmdline_convertto_securestring.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects usage of the "ConvertTo-SecureString" cmdlet via the commandline. Which is fairly uncommon and could indicate potential suspicious activity
Log source
- product
- windows
- category
- process_creation
Detection
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
selection_cli:
CommandLine|contains: 'ConvertTo-SecureString'
condition: all of selection_*False positives (as the rule lists them)
- Legitimate use to pass password to different powershell commands
Tags
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
MITRE ATT&CK ids this rule names
References
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse?slide=65
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/convertto-securestring?view=powershell-7.3#examples
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_cmdline_convertto_securestring.yml
Sources and licences
SigmaHQ
"ConvertTo-SecureString Cmdlet Usage Via CommandLine" by Teymur Kheirkhabarov (idea), Vasiliy Burov (rule), oscd.community, Tim Shelton (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_cmdline_convertto_securestring.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: ConvertTo-SecureString Cmdlet Usage Via CommandLine",
entity page, dataset version ref-6ff6609f5df3, updated 2023-02-01T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/74403157-20f5-415d-89a7-c505779585cf (accessed 2026-11-03).
Underlying source: SigmaHQ rule 74403157-20f5-415d-89a7-c505779585cf, 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.