Detect Exploitation for Privilege Escalation in Splunk
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.
MITRE ATT&CK
- Tactic
- Privilege Escalation
- Canonical reference
- https://attack.mitre.org/techniques/T1068/
SPL Detection Query
index=wineventlog (
(sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=6)
OR
(sourcetype="WinEventLog:Security" EventCode=4697)
)
| eval _driver_path=lower(coalesce(ImageLoaded, ServiceFileName, ""))
| eval _driver_name=lower(mvindex(split(_driver_path, "\\"), -1))
| eval IsSuspiciousPath=if(
match(_driver_path, "(\\\\temp\\\\|\\\\tmp\\\\|\\\\downloads\\\\|\\\\appdata\\\\|\\\\users\\\\public\\\\|\\\\programdata\\\\|\\\\perflogs\\\\)"),
1, 0)
| eval IsKnownVulnDriver=if(
match(_driver_name, "(rtcore64|rtcore32|gdrv2?\.sys|asrdrv10[12]?|aswarpot|vboxdrv|dbutil_2_3|dbutildrv2|mhyprot[23]?|iqvw(64|32)e|winring0(x64)?|capcom|msio(64|32)|ms4killer|glckio2|physmem|nvflash|nicm\.sys|nscm\.sys|bs_rcio64)"),
1, 0)
| eval IsUnsignedOrInvalid=if(
(EventCode=6 AND (Signed="false" OR SignatureStatus!="Valid")),
1, 0)
| eval DetectionSignal=case(
IsKnownVulnDriver=1, "KnownVulnerableDriverLoaded",
IsSuspiciousPath=1 AND IsUnsignedOrInvalid=1, "UnsignedDriverFromSuspiciousPath",
IsSuspiciousPath=1, "DriverLoadedFromSuspiciousPath",
EventCode=4697, "KernelDriverServiceInstalled",
true(), "Other")
| where IsKnownVulnDriver=1 OR IsSuspiciousPath=1 OR (EventCode=4697 AND match(_driver_path, "\.sys$"))
| eval DriverPath=coalesce(ImageLoaded, ServiceFileName)
| eval Signed=coalesce(Signed, "N/A")
| eval SignatureStatus=coalesce(SignatureStatus, "N/A")
| eval UserAccount=coalesce(User, SubjectUserName, "N/A")
| table _time, host, UserAccount, EventCode, DetectionSignal, DriverPath,
Signed, SignatureStatus, Hashes, IsKnownVulnDriver, IsSuspiciousPath, IsUnsignedOrInvalid
| sort - _time Multi-signal SPL detection for T1068 BYOVD and kernel driver exploitation. Combines Sysmon Event ID 6 (Driver Loaded — includes Signed, SignatureStatus, and Hashes fields) with Windows Security Event ID 4697 (A new service was installed in the system) filtered to kernel driver service type. Evaluates three signal dimensions: known vulnerable driver names from the LOLDrivers catalog, suspicious filesystem paths indicating user-writable locations, and unsigned or invalid signature status. The DetectionSignal field categorizes the finding type for analyst triage.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Virtualization software installation loading VBoxDrv.sys, vmx86.sys, or similar legitimate hypervisor drivers
- Hardware vendor utilities (MSI Afterburner, ASUS ROG software, Dell BIOS Update) loading their respective signed but vulnerable drivers for legitimate purposes
- Security tools and endpoint agents that use kernel drivers for behavioral monitoring (CrowdStrike csagent.sys, Carbon Black cbdaemon.sys) from their standard install paths
- Kernel developers or security researchers running authorized driver testing in lab environments with test signing enabled
- Enterprise software using kernel drivers deployed via SCCM/Intune that extract to temp directories as part of their installer workflow
Other platforms for T1068
Testing Methodology
Validate this detection against 5 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.
- Test 1BYOVD — Drop and Register Known Vulnerable Driver (RTCore64.sys Simulation)
Expected signal: Windows Security Event ID 4697 (New Service Installed): ServiceName=RTCore64, ServiceFileName=C:\Windows\Temp\RTCore64.sys, ServiceType=0x1 (Kernel Driver). Sysmon Event ID 1 (Process Create): Image=sc.exe, CommandLine containing 'create RTCore64 type= kernel'. DeviceRegistryEvents: RegistryKey containing \Services\RTCore64, RegistryValueName=ImagePath, RegistryValueData=C:\Windows\Temp\RTCore64.sys.
- Test 2Suspicious Driver Load Path — Copy System Driver to Temp and Reload
Expected signal: Sysmon Event ID 11 (File Create): TargetFilename=C:\Users\Public\null_test.sys. Security Event ID 4697: ServiceFileName=C:\Users\Public\null_test.sys, ServiceType=0x1. DeviceRegistryEvents: RegistryKey containing \Services\TestPathDriver, ImagePath=C:\Users\Public\null_test.sys.
- Test 3SeLoadDriverPrivilege Assignment via sc.exe (Privilege Telemetry)
Expected signal: Security Event ID 4697: ServiceName=FakePrivTest, ServiceType=0x1. Security Event ID 4672: PrivilegeList containing SeLoadDriverPrivilege assigned to the calling session's SubjectLogonId. System Event ID 7045 (New Service Installed) in System event log. sc.exe Process Create in Sysmon Event ID 1.
- Test 4Linux Kernel Module Load from Non-Standard Path (Container/Linux)
Expected signal: Auditd SYSCALL record with syscall=finit_module or init_module, uid/euid of calling process. Syslog/kern.log message: 'df00tech_test: disagrees about version of symbol module_layout' or 'insmod: ERROR: could not insert module'. Auditd WATCH record for file access to /tmp/df00tech_test.ko. /var/log/audit/audit.log entries with key=t1068_test.
- Test 5BYOVD — Enumerate Loaded Drivers for Vulnerable Candidates
Expected signal: Sysmon Event ID 1 (Process Create): driverquery.exe, sc.exe, powershell.exe executions with respective command lines. Security Event ID 4688 (if command-line auditing enabled) for same processes. WMI Activity log entries for Win32_SystemDriver query in Microsoft-Windows-WMI-Activity/Operational.
References (12)
- https://attack.mitre.org/techniques/T1068/
- https://www.loldrivers.io/
- https://learn.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-driver-block-rules
- https://www.welivesecurity.com/wp-content/uploads/2020/06/ESET_InvisiMole.pdf
- https://unit42.paloaltonetworks.com/acidbox-rare-malware/
- https://www.welivesecurity.com/en/eset-research/embargo-ransomware-rockyou2024-data-leak-ms4killer/
- https://github.com/wavestone-cdt/EDRSandblast
- https://github.com/Idov31/Nidhogg
- https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceimageloadevents-table
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1068/T1068.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/driver_load
Unlock Pro Content
Get the full detection package for T1068 including response playbook, investigation guide, and atomic red team tests.