Suspicious ConvertTo-SecureString Cmdlet Use Through CommandLine (via process_creation)
This rule detects use of the "ConvertTo-SecureString" cmdlet via the commandline. Which is fairly uncommon and could indicate potential anomalous behavior
SigmamediumWindowsv1
sigma
suspicious-convertto-securestring-cmdlet-use-through-commandline-via-process-creation
title: Suspicious ConvertTo-SecureString Cmdlet Use Through CommandLine (via process_creation)
id: f5fdb880-1822-5c69-9bdd-80a7c41e4f64
status: stable
description: This rule detects use of the "ConvertTo-SecureString" cmdlet via the commandline. Which is fairly uncommon and could indicate potential anomalous behavior
references:
- https://attack.mitre.org/techniques/T1059/001/
- https://attack.mitre.org/techniques/T1027/
- 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
author: Huntrule Team
date: 2026-04-10
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- OriginalFileName:
- 'PowerShell.EXE'
- 'pwsh.dll'
selection_cli:
CommandLine|contains: 'ConvertTo-SecureString'
condition: all of selection_*
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.