Advisor
Wiki Techniques, Tactics & Procedures (TTPs) Defense Evasion Kernel Hooking Techniques

Kernel Hooking Techniques

2 min read
Jump to:

Overview

Kernel hooking techniques involve intercepting or modifying kernel-level functions to alter system behavior. Adversaries use these techniques to gain stealth, persistence, or elevated privileges during various stages of an attack lifecycle. By manipulating kernel operations, attackers can evade detection and maintain control over compromised systems.

Attack Objective

  • Achieve stealth, persistence, privilege escalation, or control over system operations
  • Supports multiple stages including Execution, Persistence, Privilege Escalation, and Defense Evasion
  • Advances attacker position by enabling covert manipulation of system calls, hiding artifacts, or bypassing security mechanisms

How the Technique Works

Kernel hooking modifies or intercepts kernel functions, system calls, or interrupt handlers to redirect execution flow or alter returned data. This allows attackers to manipulate core operating system behavior, such as filtering process listings, hiding files, or intercepting network traffic, without triggering typical user-mode detection mechanisms.

Common Methods & Variations

  • Inline hooking by overwriting kernel function prologues
  • Import Address Table (IAT) or System Service Descriptor Table (SSDT) hooking
  • Interrupt Descriptor Table (IDT) hooking
  • On-premises endpoint-focused implementations are most common, with some adaptations in cloud environments
  • Use of living-off-the-land techniques leveraging legitimate kernel modules or drivers versus custom malicious drivers

Indicators of Compromise (IOCs)

  • Unexpected modifications in kernel memory regions or system call tables
  • Discrepancies between user-mode and kernel-mode process or file listings
  • Unusual driver loads or kernel module signatures
  • Endpoint logs showing anomalous system call behavior or kernel exceptions

Detection Strategies

  • Kernel-level telemetry such as event tracing for Windows (ETW) or Linux audit logs
  • Behavioral detection focusing on inconsistencies in system call responses or kernel data structures
  • Correlation of driver load events with process and network activity anomalies

Mitigation & Prevention

  • Enforce code signing and integrity checks for kernel modules and drivers
  • Use kernel patch protection mechanisms (e.g., PatchGuard on Windows)
  • Apply least privilege principles to limit driver installation and kernel access
  • Implement system and security updates to address known vulnerabilities

Response Considerations

  • Immediate containment by isolating affected systems to prevent lateral movement
  • Conduct memory and kernel state analysis to identify and remove unauthorized hooks
  • Rebuild or restore systems to known good states and harden kernel security configurations

Related Techniques

  • Process Injection and DLL Injection for user-mode persistence and stealth
  • Driver Loading and Unloading as prerequisite or follow-on actions
  • Credential Dumping and Privilege Escalation techniques leveraging kernel access

Mapping & References

  • MITRE ATT&CK: T1014 (Rootkit), T1543 (Create or Modify System Process)
  • Public research on kernel rootkits and hooking methods from security vendors and academic sources
  • Advisories on kernel patch protection and driver signing enforcement
Tags: Attack Techniques Cybersecurity Defense Evasion endpoint security Kernel Hooking Kernel Modules persistence privilege escalation Rootkits System Calls