This detection rule identifies anomalous execution patterns associated with Vidgrab code tricks, which adversaries may leverage to establish persistence or execute custom payloads within the environment. Proactively hunting for these specific behaviors in Azure Sentinel is essential to uncover stealthy initial access attempts that might otherwise remain undetected due to their low-severity classification and lack of standard MITRE mapping.
rule VidgrabCode : Vidgrab Family
{
meta:
description = "Vidgrab code tricks"
author = "Seth Hardy"
last_modified = "2014-06-20"
strings:
$divbyzero = { B8 02 00 00 00 48 48 BA 02 00 00 00 83 F2 02 F7 F0 }
// add eax, ecx; xor byte ptr [eax], ??h; inc ecx
$xorloop = { 03 C1 80 30 (66 | 58) 41 }
$junk = { 8B 4? ?? 8B 4? ?? 03 45 08 52 5A }
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Vidgrab code tricks detection rule, including suggested filters and exclusions tailored for an enterprise environment:
Scheduled Media Asset Ingestion via PowerShell Scripts
PowerShell script (e.g., Sync_VideoAssets.ps1) on the file server to ingest high-resolution video files from external contractors. This process triggers the Vidgrab logic as it rapidly creates, reads, and modifies temporary video codec metadata files in a dedicated staging folder (C:\Staging\Ingest).SYSTEM or specific service accounts (e.g., svc_media_ingest) where the working directory matches the known ingestion path. Add a filter to ignore events occurring during the maintenance window (02:00–04:00 UTC).Automated Video Conference Recording Archiving
TeamsHost.exe or ZoomService.exe) processes a large batch of recordings, it utilizes Vidgrab-style code tricks to optimize storage by re-encoding segments and updating manifest files. This is often triggered immediately after business hours when meeting volumes peak.C:\Program Files\Microsoft Teams\* or C:\Program Files\Zoom\bin\*) combined with a user context of LocalSystem. Additionally, filter out events where the parent process is identified as a known scheduled task (e.g., Task Name: “Archive_Daily_Recordings”).Endpoint DLP Agent Scanning and Policy Enforcement