T1125 Splunk · SPL

Detect Video Capture in Splunk

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.

MITRE ATT&CK

Tactic
Collection
Technique
T1125 Video Capture
Canonical reference
https://attack.mitre.org/techniques/T1125/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational")
(
  (EventCode=7 ImageLoaded IN ("*\\avicap32.dll", "*\\vfw32.dll", "*\\mfreadwrite.dll")
   NOT (Image IN ("*\\Teams.exe", "*\\zoom.exe", "*\\Skype.exe", "*\\slack.exe",
                   "*\\chrome.exe", "*\\msedge.exe", "*\\firefox.exe",
                   "*\\obs64.exe", "*\\obs32.exe", "*\\vlc.exe", "*\\ffmpeg.exe",
                   "*\\WindowsCamera.exe", "*\\webex.exe")))
  OR
  (EventCode=11 TargetFilename IN ("*.avi", "*.mp4", "*.wmv", "*.mkv", "*.mov", "*.m4v")
   (TargetFilename="*\\AppData\\Local\\Temp\\*" OR TargetFilename="*\\AppData\\Roaming\\*"
    OR TargetFilename="*\\ProgramData\\*" OR TargetFilename="*\\Users\\Public\\*"
    OR TargetFilename="*\\Windows\\Temp\\*")
   NOT (Image IN ("*\\Teams.exe", "*\\zoom.exe", "*\\Skype.exe", "*\\slack.exe",
                   "*\\chrome.exe", "*\\msedge.exe", "*\\firefox.exe",
                   "*\\obs64.exe", "*\\obs32.exe", "*\\vlc.exe", "*\\ffmpeg.exe",
                   "*\\WindowsCamera.exe", "*\\webex.exe")))
)
| eval DetectionType=case(
    EventCode=7, "CameraAPILoad",
    EventCode=11, "VideoFileCreation",
    true(), "Unknown"
  )
| eval SuspiciousIndicator=case(
    EventCode=7 AND match(ImageLoaded, "avicap32"), "LegacyCaptureAPI",
    EventCode=7 AND match(ImageLoaded, "vfw32"), "VideoForWindowsAPI",
    EventCode=7 AND match(ImageLoaded, "mfreadwrite"), "MediaFoundationWrite",
    EventCode=11, "VideoFileInSuspiciousPath",
    true(), "Unknown"
  )
| eval FilePath=coalesce(TargetFilename, ImageLoaded)
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
        FilePath, DetectionType, SuspiciousIndicator
| sort - _time
high severity medium confidence

Detects video capture activity using Sysmon events: Event ID 7 (Image Load) for processes loading webcam-related DLLs (avicap32.dll, vfw32.dll for legacy Video for Windows API, mfreadwrite.dll for Windows Media Foundation write operations), and Event ID 11 (File Create) for video file creation in suspicious directories by non-media processes. Known legitimate media applications are excluded. Detection type and suspicious indicator fields help analysts quickly categorize findings.

Data Sources

Driver: Driver LoadFile: File CreationSysmon Event ID 7Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Legitimate video conferencing applications installed to non-default paths that are not covered by the exclusion list
  • Screen recording tools (Camtasia, Loom, ShareX, Bandicam) writing video output to AppData directories
  • Media SDK testing or development tools that exercise webcam APIs
  • Virtualization software (VMware, VirtualBox) that maps host webcam devices through media APIs
  • Driver installation utilities that load camera-related DLLs during device setup
Download portable Sigma rule (.yml)

Other platforms for T1125


Testing Methodology

Validate this detection against 4 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.

  1. Test 1Webcam Access via avicap32.dll (Windows Legacy API)

    Expected signal: Sysmon Event ID 7 (Image Load): Image=powershell.exe, ImageLoaded=C:\Windows\System32\avicap32.dll. Sysmon Event ID 1 (Process Create): CommandLine will contain 'avicap32.dll' and 'capCreateCaptureWindowA'. PowerShell Script Block Log Event ID 4104 with the full P/Invoke code.

  2. Test 2Video File Creation in Temp Directory Simulation

    Expected signal: Sysmon Event ID 11 (File Create): Image=powershell.exe, TargetFilename=C:\Users\<user>\AppData\Local\Temp\capture_<timestamp>.avi. File will contain RIFF header bytes matching AVI format. Sysmon Event ID 1 (Process Create) for the PowerShell process.

  3. Test 3Webcam Capture via Python OpenCV (Cross-Platform)

    Expected signal: Sysmon Event ID 1 (Process Create): Image=python3.exe (or python.exe), CommandLine contains 'cv2.VideoCapture' and 'imwrite'. Sysmon Event ID 7 (Image Load): opencv_videoio*.dll or _cv2.pyd loaded by python3.exe. Sysmon Event ID 11 (File Create): TargetFilename matching frame_<timestamp>.jpg in %TEMP%.

  4. Test 4Webcam Capture Using ffmpeg (Common RAT Dependency)

    Expected signal: Sysmon Event ID 1 (Process Create): Image=ffmpeg.exe, CommandLine contains '-f dshow' and '-i video=' and the output .mp4 path in %TEMP%. Sysmon Event ID 11 (File Create): TargetFilename matching *.mp4 in %TEMP% with Image=ffmpeg.exe. DeviceNetworkEvents (KQL) should be clean for this test — ffmpeg does not make network connections in offline capture mode.

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