Detectionmediumtest

Potential Keylogger Activity

Detects PowerShell scripts that contains reference to keystroke capturing functions

Open in Detection LabConvert ruleBuild Package
Nasreddine BencherchaliCreated 2023-01-04965e2db9-eddb-4cf6-a986-7a967df651e4windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains: '[Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::'
    condition: selection
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Rule Metadata
Rule ID
965e2db9-eddb-4cf6-a986-7a967df651e4
Status
test
Level
medium
Type
Detection
Created
2023-01-04
Path
rules/windows/powershell/powershell_script/posh_ps_susp_keylogger_activity.yml
Raw Tags
attack.collectionattack.credential-accessattack.t1056.001
View on GitHub