Windows PowerShell Screen Capture via CopyFromScreen

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

FreeUnreviewedSigmamediumv1
title: Windows PowerShell Screen Capture via CopyFromScreen
id: edbca12f-886c-41a4-b084-15ef5489fd75
status: test
description: This rule identifies PowerShell script content that calls the .CopyFromScreen method to capture the desktop. Screen capture is a common tactic to collect information during an operation and may be used by remote access or post-compromise tooling. The detection relies on script block text telemetry from PowerShell (with Script Block Logging enabled) matching the presence of .CopyFromScreen.
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

What it detects

This rule identifies PowerShell script content that calls the .CopyFromScreen method to capture the desktop. Screen capture is a common tactic to collect information during an operation and may be used by remote access or post-compromise tooling. The detection relies on script block text telemetry from PowerShell (with Script Block Logging enabled) matching the presence of .CopyFromScreen.

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.