T1068

Exploitation for Privilege Escalation

Adversaries may exploit software vulnerabilities in an attempt to elevate privileges. Exploitation of a software vulnerability occurs when an adversary takes advantage of a programming error in a program, service, or within the operating system software or kernel itself to execute adversary-controlled code. Security constructs such as permission levels will often hinder access to information and use of certain techniques, so adversaries will likely need to perform privilege escalation to include use of software exploitation to circumvent those restrictions. When initially gaining access to a system, an adversary may be operating within a lower privileged process which will prevent them from accessing certain resources on the system. Vulnerabilities may exist, usually in operating system components and software commonly running at higher permissions, that can be exploited to gain higher levels of access on the system. A key sub-technique is Bring Your Own Vulnerable Driver (BYOVD), where adversaries drop a legitimately signed but vulnerable kernel driver onto a compromised machine and then exploit it to execute code in kernel mode, bypassing Driver Signature Enforcement. Real-world examples include Embargo ransomware using MS4Killer, ZeroCleare using VBoxDrv.sys, APT29 exploiting CVE-2021-36934, and Turla exploiting VBoxDrv.sys vulnerabilities.

Microsoft Sentinel / Defender
kusto
let SuspiciousDriverPaths = dynamic([
  "\\temp\\", "\\tmp\\", "\\downloads\\", "\\appdata\\local\\",
  "\\appdata\\roaming\\", "\\users\\public\\", "\\programdata\\",
  "\\$recycle.bin\\", "\\windows\\tasks\\", "\\perflogs\\"
]);
let KnownVulnerableDriverNames = dynamic([
  "rtcore64.sys", "rtcore32.sys", "gdrv.sys", "gdrv2.sys",
  "asrdrv10.sys", "asrdrv101.sys", "asrdrv102.sys",
  "aswarpot.sys", "vboxdrv.sys",
  "dbutil_2_3.sys", "dbutildrv2.sys",
  "mhyprot2.sys", "mhyprot3.sys",
  "iqvw64e.sys", "iqvw32e.sys",
  "winring0x64.sys", "winring0.sys",
  "capcom.sys", "msio64.sys", "msio32.sys",
  "ms4killer.sys", "glckio2.sys",
  "physmem.sys", "nvflash.sys",
  "nicm.sys", "nscm.sys",
  "spwizeng.sys", "bs_rcio64.sys"
]);
// Signal 1: Known vulnerable driver loaded (BYOVD)
let BYOVDDriverLoad = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where tolower(FileName) in (KnownVulnerableDriverNames)
| extend DetectionSignal = "KnownVulnerableDriverLoaded"
| project Timestamp, DeviceName, AccountName, DetectionSignal,
  DriverFile=FileName, DriverPath=FolderPath,
  SHA256, InitiatingProcessFileName, InitiatingProcessCommandLine,
  InitiatingProcessAccountName;
// Signal 2: Driver (.sys) loaded from user-writable or suspicious path
let SuspiciousPathDriverLoad = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where FileName endswith ".sys"
| where tolower(FolderPath) has_any (SuspiciousDriverPaths)
| extend DetectionSignal = "DriverLoadedFromSuspiciousPath"
| project Timestamp, DeviceName, AccountName, DetectionSignal,
  DriverFile=FileName, DriverPath=FolderPath,
  SHA256, InitiatingProcessFileName, InitiatingProcessCommandLine,
  InitiatingProcessAccountName;
// Signal 3: New driver service registered pointing to suspicious path (pre-load step)
let SuspiciousDriverService = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where ActionType == "RegistryValueSet"
| where RegistryKey has "\\SYSTEM\\CurrentControlSet\\Services\\"
| where RegistryValueName == "ImagePath"
| where tolower(RegistryValueData) endswith ".sys"
| where tolower(RegistryValueData) has_any (SuspiciousDriverPaths)
  or tolower(RegistryValueData) has_any (KnownVulnerableDriverNames)
| extend DetectionSignal = "SuspiciousDriverServiceRegistered"
| project Timestamp, DeviceName, AccountName=InitiatingProcessAccountName,
  DetectionSignal, DriverFile=tostring(split(RegistryValueData, "\\")[-1]),
  DriverPath=RegistryValueData, SHA256="",
  InitiatingProcessFileName, InitiatingProcessCommandLine,
  InitiatingProcessAccountName;
// Signal 4: Security Event 4697 — new kernel driver service installed
let NewDriverServiceInstalled = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4697
| where ServiceType == "0x1" // Kernel driver
| where tolower(ServiceFileName) has_any (SuspiciousDriverPaths)
  or tolower(ServiceFileName) has_any (KnownVulnerableDriverNames)
| extend DetectionSignal = "KernelDriverServiceInstalled_4697"
| project Timestamp=TimeGenerated, DeviceName=Computer,
  AccountName=SubjectUserName, DetectionSignal,
  DriverFile=ServiceName, DriverPath=ServiceFileName, SHA256="",
  InitiatingProcessFileName="", InitiatingProcessCommandLine="",
  InitiatingProcessAccountName=SubjectUserName;
// Union all signals
BYOVDDriverLoad
| union SuspiciousPathDriverLoad
| union SuspiciousDriverService
| union NewDriverServiceInstalled
| sort by Timestamp desc
critical severity medium confidence

Data Sources

Driver: Driver Load Process: Process Creation Windows Registry: Windows Registry Key Modification Microsoft Defender for Endpoint Windows Security Event Log

Required Tables

DeviceImageLoadEvents DeviceRegistryEvents SecurityEvent

False Positives

  • Legitimate use of virtualization software (VMware, VirtualBox) loading VBoxDrv.sys or vmware*.sys during installation or normal operation
  • Security research or penetration testing tools that use signed vulnerable drivers in controlled environments
  • Overclocking or hardware monitoring utilities (MSI Afterburner loading RTCore64.sys, ASUS GPU Tweak loading AsrDrv) on gaming or engineering workstations
  • Dell BIOS update utilities legitimately loading dbutil_2_3.sys or dbutildrv2.sys as part of authorized firmware updates
  • Kernel debugging sessions by authorized developers loading unsigned or test-signed drivers via WinDbg or similar
  • Software deployment tools (SCCM, PDQ Deploy) installing legitimate hardware vendor drivers that happen to match path patterns

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections