T1125

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.

Microsoft Sentinel / Defender
kusto
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
high severity medium confidence

Data Sources

Driver: Driver Load Process: Process Creation File: File Creation Windows Registry: Windows Registry Key Access Microsoft Defender for Endpoint

Required Tables

DeviceImageLoadEvents DeviceFileEvents DeviceRegistryEvents

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

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections