mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-07 09:48:58 +00:00
30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
title: Powershell Keylogging
|
|
id: 34f90d3c-c297-49e9-b26d-911b05a4866c
|
|
status: experimental
|
|
author: frack113
|
|
date: 2021/07/30
|
|
description: Adversaries may log user keystrokes to intercept credentials as the user types them.
|
|
references:
|
|
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md
|
|
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.001/src/Get-Keystrokes.ps1
|
|
tags:
|
|
- attack.collection
|
|
- attack.t1056.001
|
|
logsource:
|
|
product: windows
|
|
service: powershell
|
|
definition: EnableScriptBlockLogging must be set to enable
|
|
detection:
|
|
selection_id:
|
|
EventID: 4104
|
|
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: selection_id and (selection_basic or selection_high)
|
|
falsepositives:
|
|
- Unknown
|
|
level: medium
|