{"id":"34f90d3c-c297-49e9-b26d-911b05a4866c","title":"Powershell Keylogging","description":"Adversaries may log user keystrokes to intercept credentials as the user types them.","author":"frack113","status":"test","level":"medium","date":"2021-07-30","modified":"2022-07-11","tags":["attack.credential-access","attack.collection","attack.t1056.001"],"technique_ids":["T1056.001"],"logsource":{"product":"windows","category":"ps_script","definition":"Requirements: Script Block Logging must be enabled"},"falsepositives":["Unknown"],"references":["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"],"source_path":"rules/windows/powershell/powershell_script/posh_ps_keylogging.yml","source_sha256":"dd24faf45e48ac8cb54037c3d929a8456573f15c15bf8db61e7213a6507610b0","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/powershell/powershell_script/posh_ps_keylogging.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Powershell Keylogging\nid: 34f90d3c-c297-49e9-b26d-911b05a4866c\nstatus: test\ndescription: Adversaries may log user keystrokes to intercept credentials as the user types them.\nreferences:\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218/T1218.md\n    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1056.001/src/Get-Keystrokes.ps1\nauthor: frack113\ndate: 2021-07-30\nmodified: 2022-07-11\ntags:\n    - attack.credential-access\n    - attack.collection\n    - attack.t1056.001\nlogsource:\n    product: windows\n    category: ps_script\n    definition: 'Requirements: Script Block Logging must be enabled'\ndetection:\n    selection_basic:\n        ScriptBlockText|contains: 'Get-Keystrokes'\n    selection_high: # want to run in background and keyboard\n        ScriptBlockText|contains|all:\n            - 'Get-ProcAddress user32.dll GetAsyncKeyState'\n            - 'Get-ProcAddress user32.dll GetForegroundWindow'\n    condition: 1 of selection_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1056.001","id":"T1056.001","name":"Keylogging","page":"techniques/enterprise/T1056.001/"}],"data_path":"data/detection-rules/34f90d3c-c297-49e9-b26d-911b05a4866c.json","kind":"sigma"}
