2021-07-30 08:28:19 +02:00
|
|
|
title: Powershell Keylogging
|
|
|
|
|
id: 34f90d3c-c297-49e9-b26d-911b05a4866c
|
2023-10-17 14:35:26 +02:00
|
|
|
status: test
|
2021-07-30 08:28:19 +02:00
|
|
|
description: Adversaries may log user keystrokes to intercept credentials as the user types them.
|
|
|
|
|
references:
|
2022-07-11 14:11:53 +01:00
|
|
|
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218/T1218.md
|
|
|
|
|
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1056.001/src/Get-Keystrokes.ps1
|
2022-10-26 09:43:39 +02:00
|
|
|
author: frack113
|
2024-08-12 12:02:50 +02:00
|
|
|
date: 2021-07-30
|
|
|
|
|
modified: 2022-07-11
|
2021-07-30 08:28:19 +02:00
|
|
|
tags:
|
|
|
|
|
- attack.collection
|
|
|
|
|
- attack.t1056.001
|
|
|
|
|
logsource:
|
|
|
|
|
product: windows
|
2021-10-16 08:18:49 +02:00
|
|
|
category: ps_script
|
2023-01-04 17:49:32 +01:00
|
|
|
definition: 'Requirements: Script Block Logging must be enabled'
|
2021-07-30 08:28:19 +02:00
|
|
|
detection:
|
|
|
|
|
selection_basic:
|
2022-07-07 19:13:01 +01:00
|
|
|
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'
|
2022-07-11 14:11:53 +01:00
|
|
|
condition: 1 of selection_*
|
2021-07-30 08:28:19 +02:00
|
|
|
falsepositives:
|
|
|
|
|
- Unknown
|
|
|
|
|
level: medium
|