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.
Nasreddine BencherchaliCreated 2023-01-22Updated 2023-05-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
Tactics
Rule Metadata
Rule ID
b36d01a3-ddaf-4804-be18-18a6247adfcd
Status
test
Level
medium
Type
Detection
Created
2023-01-22
Modified
2023-05-09
Author
Path
rules/windows/process_creation/proc_creation_win_powershell_add_windows_capability.yml
Raw Tags
attack.execution