Detect Screen Capture in CrowdStrike LogScale
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/
LogScale Detection Query
// Branches 1 & 2: Screenshot utility or scripting engine API usage via process events
#event_simpleName in ("ProcessRollup2", "SyntheticProcessRollup2")
| eval FileName_lower = lower(FileName)
| eval ParentBaseFileName_lower = lower(ParentBaseFileName)
| eval CommandLine_lower = lower(CommandLine)
| eval is_screenshot_tool = if(
FileName_lower = /scrot|xwd|gnome-screenshot|ksnapshot|spectacle|screencapture|psr\.exe|snippingtool\.exe|snipingtool\.exe|screenshot\.exe|xrandr/,
1, 0)
| eval is_script_engine = if(
FileName_lower = /powershell\.exe|pwsh\.exe|cscript\.exe|wscript\.exe|mshta\.exe/,
1, 0)
| eval has_screenshot_api = if(
is_script_engine = 1 and CommandLine_lower = /copyfromscreen|system\.drawing\.graphics|system\.windows\.forms\.screen|printwindow|vk_snapshot|keybd_event|0x2c/,
1, 0)
| eval suspicious_parent = if(
ParentBaseFileName_lower = /cmd\.exe|powershell\.exe|pwsh\.exe|wscript\.exe|cscript\.exe|mshta\.exe|regsvr32\.exe|rundll32\.exe/,
1, 0)
| eval DetectionBranch = case(
is_screenshot_tool = 1 and suspicious_parent = 1,
"ScreenshotUtilFromSuspiciousParent",
has_screenshot_api = 1,
"ScriptingEngineScreenshotAPI",
true(),
null())
| where DetectionBranch != null
| eval SuspicionScore = is_screenshot_tool + has_screenshot_api + suspicious_parent
| select([
@timestamp, ComputerName, UserName, UserSid, FileName, CommandLine,
ParentBaseFileName, ParentCommandLine, DetectionBranch, SuspicionScore])
| sort(field=@timestamp, order=desc) Detects screen capture (T1113) using CrowdStrike Falcon ProcessRollup2 and SyntheticProcessRollup2 events. Implements two detection branches: (1) ScreenshotUtilFromSuspiciousParent — known screenshot utilities (scrot, xwd, psr.exe, screencapture, snippingtool.exe) executed with a suspicious scripting engine as the parent process; (2) ScriptingEngineScreenshotAPI — PowerShell, cscript, wscript, or mshta command lines that reference CopyFromScreen, PrintWindow, VK_SNAPSHOT, or keybd_event with scan code 0x2C. A SuspicionScore field aggregates contributing signals for analyst triage.
Data Sources
Required Tables
False Positives & Tuning
- IT administrators or sysadmins running ad-hoc PowerShell scripts that use System.Drawing.Graphics.CopyFromScreen for automated UI documentation, report generation, or help desk tooling in managed enterprise environments
- Security testing and vulnerability assessment tools (Nessus credentialed scans, Qualys agent, custom DAST tooling) that spawn screenshot utilities from their service processes during host assessment tasks
- Help desk and ITSM self-service portals with screen capture integrations (ServiceNow agent, Jira Service Management desktop connector) that invoke screenshotting from background service parent processes to attach evidence to tickets
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.
- 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.
- 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.
- 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.
- 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.
- 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.
References (13)
- https://attack.mitre.org/techniques/T1113/
- https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen?view=netframework-4.8
- https://blog.malwarebytes.com/threat-analysis/2017/01/new-mac-backdoor-using-antiquated-code/
- https://researchcenter.paloaltonetworks.com/2017/02/unit-42-title-gamaredon-group-toolset-evolution/
- https://unit42.paloaltonetworks.com/gamaredon-february-2022/
- https://securelist.com/griffon-the-javascript-backdoor-used-by-fin7/90515/
- https://www.talos-sec.com/blogs/agent-tesla
- https://www.us-cert.gov/ncas/alerts/TA18-074A
- https://www.symantec.com/connect/blogs/dragonfly-western-energy-sector-targeted-sophisticated-attack-group
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1113/T1113.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicefileevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceimageloadevents-table
Unlock Pro Content
Get the full detection package for T1113 including response playbook, investigation guide, and atomic red team tests.