T1014

Rootkit

Adversaries may use rootkits to hide the presence of programs, files, network connections, services, drivers, and other system components. Rootkits intercept and modify operating system API calls to conceal malware activity and can reside at user-space, kernel-space, or firmware levels. Real-world deployments include Drovorub (GRU-attributed Linux kernel rootkit using LKMs), Skidmap (cryptocurrency miner with kernel-mode hooking), TeamTNT's Diamorphine (open-source LKM), Ebury (SSH userland rootkit), Rocke (ld.so.preload hijacking), Umbreon (libc hooking), and Windows-based rootkits from Carberp and Stuxnet. Linux kernel rootkits typically leverage loadable kernel modules (LKMs) or shared library preloading via /etc/ld.so.preload. Windows kernel rootkits abuse driver loading mechanisms. Detection is most effective at installation and loading time — once active, rootkits actively conceal themselves from OS-level enumeration.

Microsoft Sentinel / Defender
kusto
// T1014 Rootkit — Multi-signal, multi-platform detection
// Signal 1: Windows kernel driver service installation from suspicious path (Security Event ID 4697)
let KernelDriverInstall = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4697
| extend ServiceName = extract(@'<Data Name="ServiceName">([^<]+)</Data>', 1, EventData)
| extend ServiceFileName = extract(@'<Data Name="ServiceFileName">([^<]+)</Data>', 1, EventData)
| extend ServiceType = extract(@'<Data Name="ServiceType">([^<]+)</Data>', 1, EventData)
| where ServiceType in~ ("0x00000001", "0x1", "Kernel Driver")
| extend IsSuspiciousPath = (
    ServiceFileName has_any (@"\\Temp\\", @"\\tmp\\", @"\\Users\\Public\\", @"\\AppData\\", @"\\Downloads\\", @"\\ProgramData\\")
    or not(ServiceFileName startswith @"C:\\Windows\\"))
| where IsSuspiciousPath
| project TimeGenerated, Host = Computer, Account,
          DetectionType = "KernelDriverInstall",
          Indicator = ServiceName,
          Detail = ServiceFileName;
// Signal 2: Driver (.sys) file loaded from non-standard filesystem path (MDE DeviceImageLoadEvents)
let SuspiciousDriverLoad = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where FileName endswith ".sys"
| where not(FolderPath has_any (
    @"C:\\Windows\\System32\\",
    @"C:\\Windows\\SysWOW64\\",
    @"C:\\Windows\\WinSxS\\",
    @"C:\\Program Files\\",
    @"C:\\Program Files (x86)\\",
    @"C:\\Windows\\servicing\\"
  ))
| project TimeGenerated = Timestamp, Host = DeviceName, Account = AccountName,
          DetectionType = "SuspiciousDriverLoad",
          Indicator = FileName,
          Detail = FolderPath;
// Signal 3: Linux kernel module loading outside package manager context (MDE for Linux)
let LinuxKernelModuleLoad = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("insmod", "modprobe")
| where not(InitiatingProcessFileName in~ (
    "systemd", "apt-get", "apt", "dpkg", "rpm", "yum", "dnf",
    "snap", "pacman", "zypper", "kmod", "update-initramfs", "dracut"
  ))
| project TimeGenerated = Timestamp, Host = DeviceName, Account = AccountName,
          DetectionType = "LinuxKernelModuleLoad",
          Indicator = FileName,
          Detail = ProcessCommandLine;
// Signal 4: Modification of /etc/ld.so.preload — userland rootkit hook point (Rocke, Umbreon, Ebury TTP)
let LdPreloadModification = DeviceFileEvents
| where Timestamp > ago(24h)
| where FolderPath =~ "/etc" and FileName =~ "ld.so.preload"
| where ActionType in~ ("FileCreated", "FileModified")
| project TimeGenerated = Timestamp, Host = DeviceName, Account = AccountName,
          DetectionType = "LdPreloadModification",
          Indicator = FileName,
          Detail = InitiatingProcessCommandLine;
// Combine all signals
union KernelDriverInstall, SuspiciousDriverLoad, LinuxKernelModuleLoad, LdPreloadModification
| sort by TimeGenerated desc
critical severity medium confidence

Data Sources

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

Required Tables

SecurityEvent DeviceImageLoadEvents DeviceProcessEvents DeviceFileEvents

False Positives

  • Legitimate third-party kernel drivers (VPN clients, hardware manufacturers, security software) installed from staging directories before being moved to C:\Windows\System32\drivers\
  • Linux infrastructure provisioning via configuration management tools (Ansible, Puppet, Chef) loading expected kernel modules such as nf_tables, overlay, or br_netfilter on new nodes
  • Containerization and virtualization software (Docker, VirtualBox, VMware) loading kernel modules (vboxdrv.ko, vmwgfx.ko, overlay.ko) during service startup outside package manager context
  • Security hardening and compliance scanning tools that inspect or recreate /etc/ld.so.preload as part of CIS benchmark enforcement or file integrity verification workflows
  • Custom in-house kernel modules loaded on specialized appliances, HPC systems, or network gear where non-standard module paths are expected by design

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections