Windows PowerShell Screen Capture via CopyFromScreen

Flags PowerShell scripts containing .CopyFromScreen, indicative of desktop screen capture activity.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-12-28
Updated
2026-07-31
title: Windows PowerShell Screen Capture via CopyFromScreen
id: edbca12f-886c-41a4-b084-15ef5489fd75
status: test
description: This rule flags PowerShell script content that includes the .CopyFromScreen method, which can be used to capture the desktop. Screen capture is a common post-compromise behavior used to collect sensitive information visible on the screen. The detection relies on script block text telemetry that records the presence of .CopyFromScreen in executed PowerShell.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1113/T1113.md#atomic-test-6---windows-screen-capture-copyfromscreen
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_capture_screenshots.yml
author: frack113, Huntrule Team
date: 2021-12-28
modified: 2022-07-07
tags:
  - attack.collection
  - attack.t1113
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection:
    ScriptBlockText|contains: .CopyFromScreen
  condition: selection
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: d4a11f63-2390-411c-9adf-d791fd152830
    type: derived