T1113 Splunk · SPL

Detect Screen Capture in Splunk

Adversaries may attempt to take screen captures of the desktop to gather information over the course of an operation. Screen capturing functionality may be included as a feature of a remote access tool used in post-compromise operations. Taking a screenshot is also typically possible through native utilities or API calls, such as CopyFromScreen (.NET), xwd (Linux), or screencapture (macOS). Threat actors including Dragonfly, Gamaredon (Pteranodon), APT33 (TURNEDUP), Agent Tesla, and BlackEnergy have all used screen capture as part of post-compromise collection operations.

MITRE ATT&CK

Tactic
Collection
Technique
T1113 Screen Capture
Canonical reference
https://attack.mitre.org/techniques/T1113/

SPL Detection Query

Splunk (SPL)
spl
| union
[
  search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  | eval Image_lower=lower(Image)
  | eval ParentImage_lower=lower(ParentImage)
  | eval is_screenshot_tool=if(
      match(Image_lower, "(scrot|xwd|screencapture|psr\.exe|snippingtool\.exe|snipingtool\.exe|screenshot\.exe)"),
      1, 0
    )
  | eval is_script_engine=if(
      match(Image_lower, "(powershell\.exe|pwsh\.exe|cscript\.exe|wscript\.exe|mshta\.exe)"),
      1, 0
    )
  | eval has_screenshot_api=if(
      is_script_engine=1 AND match(lower(CommandLine),
        "(copyfromscreen|system\.drawing\.graphics|system\.windows\.forms\.screen|printwindow|vk_snapshot|keybd_event|0x2c)"),
      1, 0
    )
  | eval suspicious_parent=if(
      match(ParentImage_lower,
        "(cmd\.exe|powershell\.exe|pwsh\.exe|wscript\.exe|cscript\.exe|mshta\.exe|regsvr32\.exe|rundll32\.exe)"),
      1, 0
    )
  | eval detection_branch=case(
      is_screenshot_tool=1 AND suspicious_parent=1, "ScreenshotUtilFromSuspiciousParent",
      has_screenshot_api=1, "ScriptingEngineScreenshotAPI",
      true(), null()
    )
  | where isnotnull(detection_branch)
  | eval SuspicionScore=is_screenshot_tool + has_screenshot_api + suspicious_parent
  | table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
          detection_branch, SuspicionScore
],
[
  search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11
  | eval TargetFilename_lower=lower(TargetFilename)
  | eval Image_lower=lower(Image)
  | eval is_image_extension=if(
      match(TargetFilename_lower, "\.(png|jpg|jpeg|bmp|gif)$"),
      1, 0
    )
  | eval is_staging_path=if(
      match(TargetFilename_lower,
        "(\\\\temp\\\\|\\\\appdata\\\\local\\\\temp\\\\|\\\\programdata\\\\|\\\\users\\\\public\\\\)"),
      1, 0
    )
  | eval is_ui_process=if(
      match(Image_lower,
        "(explorer\.exe|chrome\.exe|firefox\.exe|msedge\.exe|iexplore\.exe|outlook\.exe|teams\.exe|slack\.exe|zoom\.exe|mspaint\.exe|onedrive\.exe|snagit\.exe)"),
      1, 0
    )
  | where is_image_extension=1 AND is_staging_path=1 AND is_ui_process=0
  | eval detection_branch="SuspiciousScreenshotFileInTempPath"
  | eval SuspicionScore=2
  | table _time, host, User, Image, TargetFilename, detection_branch, SuspicionScore
]
| sort - _time
medium severity medium confidence

Detects screen capture activity using Sysmon Event ID 1 (Process Creation) and Event ID 11 (File Create). The query evaluates three patterns via a union: (1) known screenshot utilities launched from suspicious scripting engine parents, (2) scripting engines invoking .NET screenshot APIs (CopyFromScreen, PrintWindow, VK_SNAPSHOT), and (3) image files created in staging paths (Temp, ProgramData, Public) by non-UI processes. A SuspicionScore field aids analyst triage prioritization.

Data Sources

Process: Process CreationFile: File CreationSysmon Event ID 1Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • IT helpdesk tools (GoToAssist, TeamViewer, AnyDesk) that legitimately capture screens for remote support sessions
  • Monitoring and observability agents taking periodic UI screenshots for SLA verification
  • Automated UI testing frameworks (Selenium, Playwright, AutoIt) executing screenshot commands during test runs
  • User-invoked screenshot utilities started directly by users through Windows Explorer
  • Video conferencing tools capturing screen content for screen sharing or recording
Download portable Sigma rule (.yml)

Other platforms for T1113


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Windows Screen Capture via PowerShell CopyFromScreen

    Expected signal: Sysmon Event ID 1: Process Create — Image=powershell.exe, CommandLine containing 'CopyFromScreen', 'System.Drawing.Graphics', 'System.Windows.Forms.Screen'. Sysmon Event ID 11: File Create — TargetFilename=C:\Users\<user>\AppData\Local\Temp\df00tech-capture.png, Image=powershell.exe. PowerShell ScriptBlock Log Event ID 4104 with full script content. Sysmon Event ID 7: Image Load — gdi32.dll loaded by powershell.exe.

  2. Test 2Windows Screen Capture via PSR.exe (Problem Steps Recorder)

    Expected signal: Sysmon Event ID 1: Process Create — Image=C:\Windows\System32\psr.exe, CommandLine containing '/start /output ... /sc 1 /maxsc 5'. Second Event ID 1 for the /stop invocation. Sysmon Event ID 11: File Create — TargetFilename ending in .zip in TEMP path, created by psr.exe. Security Event ID 4688 (if command line auditing enabled) for psr.exe execution.

  3. Test 3Linux Screen Capture via xwd (X Window Dump)

    Expected signal: Linux auditd syscall log: execve syscall for xwd with arguments '-root -silent -out /tmp/df00tech-capture.xwd'. File creation event in /tmp/. Syslog entry if auditd is configured with -a always,exit -F arch=b64 -S execve rule. Process accounting record for xwd execution. /var/log/auth.log may show the user context.

  4. Test 4macOS Screen Capture via screencapture Utility

    Expected signal: macOS Unified Log: log show --predicate 'process == "screencapture"' will show the invocation. Endpoint security framework (ESF) event for ES_EVENT_TYPE_NOTIFY_EXEC for screencapture. File creation event in /tmp/ for the PNG file. If Defender for Endpoint macOS agent is deployed: DeviceProcessEvents with FileName=screencapture and DeviceFileEvents for the output file.

  5. Test 5Windows VK_SNAPSHOT Keyboard Simulation Screenshot

    Expected signal: Sysmon Event ID 1: Process Create — Image=powershell.exe, CommandLine containing 'keybd_event', '0x2C', 'VK_SNAPSHOT'. PowerShell ScriptBlock Log Event ID 4104 with full P/Invoke code. Sysmon Event ID 7: Image Load — user32.dll loaded by powershell.exe. Sysmon Event ID 11: File Create for .png in TEMP if clipboard contained image data.

Unlock Pro Content

Get the full detection package for T1113 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections