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 asCopyFromScreen
,xwd
, orscreencapture
.(Citation: CopyFromScreen .NET)(Citation: Antiquated Mac Malware)
Use screencapture command to collect a full desktop screenshot
Supported Platforms: macOS
Name | Description | Type | Default Value |
---|---|---|---|
output_file | Output file path | Path | /tmp/T1113_desktop.png |
screencapture #{output_file}
rm #{output_file}
Use screencapture command to collect a full desktop screenshot
Supported Platforms: macOS
Name | Description | Type | Default Value |
---|---|---|---|
output_file | Output file path | Path | /tmp/T1113_desktop.png |
screencapture -x #{output_file}
rm #{output_file}
Use xwd command to collect a full desktop screenshot and review file with xwud
Supported Platforms: Linux
Name | Description | Type | Default Value |
---|---|---|---|
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 |
xwd -root -out #{output_file}
xwud -in #{output_file}
rm #{output_file}
if #{package_checker} > /dev/null; then exit 0; else exit 1; fi
sudo #{package_installer}
Use import command from ImageMagick to collect a full desktop screenshot
Supported Platforms: Linux
Name | Description | Type | Default Value |
---|---|---|---|
output_file | Output file path | Path | /tmp/T1113_desktop.png |
import -window root #{output_file}
rm #{output_file}
if import --version; then exit 0; else exit 1; fi
sudo apt-get -y install imagemagick
Use Psr.exe binary to collect screenshots of user display. Test will do left mouse click to simulate user behaviour
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
output_file | Output file path | Path | c:\temp\T1113_desktop.zip |
recording_time | Time to take screenshots | String | 5 |
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"
rm #{output_file} -ErrorAction Ignore