Detectionmediumtest
Powershell Keylogging
Adversaries may log user keystrokes to intercept credentials as the user types them.
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script
Definition
Requirements: Script Block Logging must be enabled
Detection Logic
Detection Logic2 selectors
detection:
selection_basic:
ScriptBlockText|contains: 'Get-Keystrokes'
selection_high: # want to run in background and keyboard
ScriptBlockText|contains|all:
- 'Get-ProcAddress user32.dll GetAsyncKeyState'
- 'Get-ProcAddress user32.dll GetForegroundWindow'
condition: 1 of selection_*False Positives
Unknown
False positive likelihood has not been assessed. Additional context may be needed during triage.
MITRE ATT&CK
Sub-techniques
Rule Metadata
Rule ID
34f90d3c-c297-49e9-b26d-911b05a4866c
Status
test
Level
medium
Type
Detection
Created
Fri Jul 30
Modified
Mon Jul 11
Author
Path
rules/windows/powershell/powershell_script/posh_ps_keylogging.yml
Raw Tags
attack.credential-accessattack.collectionattack.t1056.001