The hypothesis is that an adversary may be manipulating cross-reference table entries to mask malicious activity by exploiting the known behavior of the first entry having a generation number of 65,535. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential tampering or evasion tactics that could indicate advanced persistent threats.
rule invalid_xref_numbers : PDF raw
{
meta:
author = "Glenn Edwards (@hiddenillusion)"
version = "0.1"
description = "The first entry in a cross-reference table is always free and has a generation number of 65,535"
notes = "This can be also be in a stream..."
weight = 1
strings:
$magic = { 25 50 44 46 }
$reg0 = /xref\r?\n?.*\r?\n?.*65535\sf/
$reg1 = /endstream.*\r?\n?endobj.*\r?\n?startxref/
condition:
$magic in (0..1024) and not $reg0 and not $reg1
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Scenario: A backup tool (e.g., Veeam, Commvault) initializes a cross-reference table during a backup job.
Filter/Exclusion: Check if the process is associated with a known backup tool or if the event occurs during scheduled backup windows.
Scenario: A system administrator manually edits the cross-reference table using a tool like dumpbin or odbcconf during maintenance.
Filter/Exclusion: Exclude events where the process is initiated by a known admin tool or user with elevated privileges.
Scenario: A scheduled job (e.g., SQL Server Agent job) runs a script that modifies cross-reference tables as part of database maintenance.
Filter/Exclusion: Filter out events where the process is associated with a known job scheduler or script execution tool.
Scenario: A log management tool (e.g., Splunk, ELK Stack) processes logs and generates a cross-reference table entry as part of its indexing process.
Filter/Exclusion: Exclude entries where the process is associated with a log management tool or its associated services.
Scenario: A virtualization platform (e.g., VMware vCenter, Hyper-V) creates a cross-reference table entry during VM snapshot creation or configuration changes.
Filter/Exclusion: Exclude events where the process is related to virtualization management tools or VM lifecycle operations.