Detectionmediumtest

ConvertTo-SecureString Cmdlet Usage Via CommandLine

Detects usage of the "ConvertTo-SecureString" cmdlet via the commandline. Which is fairly uncommon and could indicate potential suspicious activity

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Teymur Kheirkhabarov, Vasiliy Burov, oscd.community, Tim SheltonCreated Sun Oct 11Updated Wed Feb 0174403157-20f5-415d-89a7-c505779585cfwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic2 selectors
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

Legitimate use to pass password to different powershell commands

Rule Metadata
Rule ID
74403157-20f5-415d-89a7-c505779585cf
Status
test
Level
medium
Type
Detection
Created
Sun Oct 11
Modified
Wed Feb 01
Path
rules/windows/process_creation/proc_creation_win_powershell_cmdline_convertto_securestring.yml
Raw Tags
attack.defense-evasionattack.t1027attack.executionattack.t1059.001
View on GitHub