Video Capture
Adversaries may leverage a computer's peripheral devices (e.g., integrated cameras or webcams) or applications (e.g., video call services) to capture video recordings for the purpose of gathering information. Images may also be captured from devices or applications, potentially in specified intervals, in lieu of video files. Malware or scripts may interact with webcam devices through OS or application APIs such as the Windows Video Capture API (avicap32.dll), DirectShow, Windows Media Foundation, or platform-specific libraries on macOS and Linux. Captured video or image files may be written to disk and exfiltrated later. Threat actors including Transparent Tribe (Crimson RAT), Silence Group, and tools such as Empire, NanoCore, Agent Tesla, and PoetRAT have demonstrated active use of this technique.
let KnownMediaApps = dynamic([
"Teams.exe", "zoom.exe", "Skype.exe", "slack.exe", "webex.exe",
"chrome.exe", "msedge.exe", "firefox.exe", "obs64.exe", "obs32.exe",
"CameraApp.exe", "VideoCapture.exe", "vlc.exe", "ffmpeg.exe",
"WindowsCamera.exe", "SnippingTool.exe", "mspaint.exe"
]);
let SuspiciousVideoPaths = dynamic([
"\\AppData\\Local\\Temp\\", "\\AppData\\Roaming\\",
"\\ProgramData\\", "\\Users\\Public\\",
"\\Windows\\Temp\\", "\\Temp\\"
]);
let VideoExtensions = dynamic([".avi", ".mp4", ".wmv", ".mkv", ".mov", ".flv", ".m4v"]);
// Branch 1: Suspicious DLL image load of avicap32.dll by non-media processes
let AvicapLoads = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where FileName =~ "avicap32.dll" or FileName =~ "vfw32.dll"
| where not(InitiatingProcessFileName has_any (KnownMediaApps))
| project Timestamp, DeviceName, AccountName,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessParentFileName, FileName,
DetectionSource = "AvicapDLLLoad";
// Branch 2: Video file creation in suspicious paths by non-media processes
let VideoFileCreation = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType == "FileCreated"
| where FileName has_any (VideoExtensions)
| where FolderPath has_any (SuspiciousVideoPaths)
| where not(InitiatingProcessFileName has_any (KnownMediaApps))
| project Timestamp, DeviceName, AccountName,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessParentFileName,
FileName = strcat(FolderPath, "\\", FileName),
DetectionSource = "SuspiciousVideoFileCreation";
// Branch 3: Process accessing camera device objects (via registry device enumeration)
let CameraRegistryAccess = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any ("KSCATEGORY_VIDEO_CAMERA", "KSCATEGORY_CAPTURE",
"USB\\VID_", "Image\\Windows\\CurrentVersion\\Uninstall")
| where RegistryKey has "Camera" or RegistryKey has "Webcam" or RegistryKey has "VideoCapture"
| where not(InitiatingProcessFileName has_any (KnownMediaApps))
| where not(InitiatingProcessFileName has_any ("svchost.exe", "System", "WmiPrvSE.exe", "DeviceEnumerator.exe"))
| project Timestamp, DeviceName, AccountName,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessParentFileName,
FileName = RegistryKey,
DetectionSource = "CameraRegistryAccess";
union AvicapLoads, VideoFileCreation, CameraRegistryAccess
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Legitimate video conferencing applications (Zoom, Teams, Webex, Skype) that may not be in the exclusion list if installed to non-default paths
- Screen recording and productivity tools (OBS Studio, Camtasia, Loom, ShareX) used by developers or content creators
- IT asset management or device inventory tools that enumerate camera hardware through registry keys
- Security camera management software or driver update utilities that interact with webcam device APIs
- Development/testing environments where developers are building applications that interact with webcam APIs
References (11)
- https://attack.mitre.org/techniques/T1125/
- https://objective-see.com/blog/blog_0x25.html
- https://learn.microsoft.com/en-us/windows/win32/multimedia/video-capture
- https://learn.microsoft.com/en-us/windows/win32/medfound/microsoft-media-foundation-sdk
- https://www.proofpoint.com/us/threat-insight/post/new-poison-ivy-rat-variant-targets-us-government-employees
- https://securelist.com/the-machete-apt/98121/
- https://blog.talosintelligence.com/2020/04/poetrat-targets-azerbaijan.html
- https://www.group-ib.com/resources/threat-research/silence_moving_into_the_darkside.pdf
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1125/T1125.md
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceimageloadevents-table
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicefileevents-table
Unlock Pro Content
Get the full detection package for T1125 including response playbook, investigation guide, and atomic red team tests.