Files
blue-team-tools/rules/windows/powershell/powershell_script/powershell_keylogging.yml
T

29 lines
1.0 KiB
YAML
Raw Normal View History

2021-07-30 08:28:19 +02:00
title: Powershell Keylogging
id: 34f90d3c-c297-49e9-b26d-911b05a4866c
status: experimental
author: frack113
date: 2021/07/30
2021-10-16 08:18:49 +02:00
modified: 2021/10/16
2021-07-30 08:28:19 +02:00
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
2021-10-16 08:18:49 +02:00
category: ps_script
2021-07-30 08:28:19 +02:00
definition: EnableScriptBlockLogging must be set to enable
detection:
selection_basic:
ScriptBlockText|contains: 'Get-Keystrokes'
2021-08-18 18:58:20 +00:00
selection_high: # want to run in background and keyboard
2021-07-30 08:28:19 +02:00
ScriptBlockText|contains|all:
- 'Get-ProcAddress user32.dll GetAsyncKeyState'
- 'Get-ProcAddress user32.dll GetForegroundWindow'
2021-10-16 08:18:49 +02:00
condition: selection_basic or selection_high
2021-07-30 08:28:19 +02:00
falsepositives:
- Unknown
level: medium