Detectionmediumtest

Add Windows Capability Via PowerShell Cmdlet

Detects usage of the "Add-WindowsCapability" cmdlet to add Windows capabilities. Notable capabilities could be "OpenSSH" and others.

Convert In Phoenix Studio

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

Launch
Nasreddine Bencherchali (Nextron Systems)Created Sun Jan 22Updated Tue May 09b36d01a3-ddaf-4804-be18-18a6247adfcdwindows
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 Logic3 selectors
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_cmdlet:
        CommandLine|contains: 'Add-WindowsCapability'
    selection_capa:
        CommandLine|contains: 'OpenSSH.' # For both "OpenSSH.Server" and "OpenSSH.Client"
    condition: all of selection_*
False Positives

Legitimate usage of the capabilities by administrators or users. Add additional filters accordingly.

MITRE ATT&CK
Rule Metadata
Rule ID
b36d01a3-ddaf-4804-be18-18a6247adfcd
Status
test
Level
medium
Type
Detection
Created
Sun Jan 22
Modified
Tue May 09
Path
rules/windows/process_creation/proc_creation_win_powershell_add_windows_capability.yml
Raw Tags
attack.execution
View on GitHub