The Windows kernel (ntoskrnl.exe) is the core part of the operating system. Its duties include managing memory, scheduling threads to run on the CPU, controlling device I/O, and other tasks. It runs at the most privileged level on the CPU (Ring 0), and has priority over all other processes. Exploits that attack the kernel are extremely powerful. They escalate your privilege, but can also destabilize the system. Advanced persistent threats (APTs) use kernel vulnerabilities to keep their malware hidden. Malicious code that runs in the kernel is hard to detect and even harder to get rid of. GitHub lists over 50 Windows kernel exploits for download. A Metasploit search query search kernel platform:windows returns about 20 results. The following table summarizes some of the more notable Windows kernel exploits. Nearly all are local exploits, meaning that they must be run after you have gained access to the system.
Vulnerability | Description | Exploit |
EternalBlue |
| Metasploit module:
|
Kernel mode drivers |
| |
Secondary Logon Service |
| Metasploit module:
https://github.com/SecWiki/windows-kernel-exploits/tree/master/MS16-032 |
Kernel mode drivers |
| Metasploit module:
|
Null pointer dereference |
| Metasploit module:
https://github.com/sam-b/CVE-2014-4113 https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/sploits/39666.zip |
Kernel vulnerability |
| Metasploit module:
|
Kernel mode drivers |
| Metasploit module:
|
Kernel vulnerability |
| Metasploit module:
|
Note: For an interesting article on the anatomy of kernel exploits, see https://www.lastline.com/labsblog/unmasking-kernel-exploits/