Sigma rule: Potential Keylogger Activity
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-e50e3f8387d1, updated 2023-01-04T00:00:00.000Z.
Rule
- Title
- Potential Keylogger Activity
- Status
- test
- Level
- medium
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2023-01-04
- File
- rules/windows/powershell/powershell_script/posh_ps_susp_keylogger_activity.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects PowerShell scripts that contains reference to keystroke capturing functions
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection:
ScriptBlockText|contains: '[Windows.Input.Keyboard]::IsKeyDown([System.Windows.Input.Key]::'
condition: selectionFalse positives (as the rule lists them)
- Unknown
Tags
- attack.collection
- attack.credential-access
- attack.t1056.001
MITRE ATT&CK ids this rule names
References
- https://twitter.com/ScumBots/status/1610626724257046529
- https://www.virustotal.com/gui/file/d4486b63512755316625230e0c9c81655093be93876e0d80732e7eeaf7d83476/content
- https://www.virustotal.com/gui/file/720a7ee9f2178c70501d7e3f4bcc28a4f456e200486dbd401b25af6da3b4da62/content
- https://learn.microsoft.com/en-us/dotnet/api/system.windows.input.keyboard.iskeydown?view=windowsdesktop-7.0
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_keylogger_activity.yml
Sources and licences
SigmaHQ
"Potential Keylogger Activity" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_susp_keylogger_activity.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Potential Keylogger Activity",
entity page, dataset version ref-e50e3f8387d1, updated 2023-01-04T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/965e2db9-eddb-4cf6-a986-7a967df651e4 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 965e2db9-eddb-4cf6-a986-7a967df651e4, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.