> For the complete documentation index, see [llms.txt](https://notes.cavementech.com/pentesting-quick-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.cavementech.com/pentesting-quick-reference/privilege-escalation/windows-priv-esc/kernel-exploits.md).

# Kernel Exploits

{% embed url="<https://github.com/SecWiki/windows-kernel-exploits>" %}

### What is Kernel

<figure><img src="/files/6ydzVEUexJg7z47mO1Rs" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ZLkw6MgjElUkTgwQ4Z7n" alt=""><figcaption></figcaption></figure>

### Kernel exploits <a href="#lecture_heading" id="lecture_heading"></a>

Kernel exploits should be our last resource, since it might but the machine in an unstable state or create some other problem with the machine.

**Identify the hotfixes/patches**

```bash
systeminfo
# or
wmic qfe get Caption,Description,HotFixID,InstalledOn
```

**Python to Binary**

If we have an exploit written in python but we don't have python installed on the victim-machine we can always transform it into a binary with pyinstaller. Good trick to know.

### Escalation with Metasploit <a href="#lecture_heading" id="lecture_heading"></a>

Check for exploits

```
run post/multi/recon/local_exploit_suggester
```

#### Syntax Breakdown

* `run`: A Meterpreter command used to execute a script or a post-exploitation module within the current session.
* `post/`: Indicates that this is a post-exploitation module, designed to be used after a system has already been compromised.
* `multi/recon/`: Specifies the category of the module. Multi means it works across multiple platforms (e.g., Windows, Linux, Android), and Recon indicates it is used for reconnaissance/gathering information.
* `local_exploit_suggester`: The specific name of the module (sometimes nicknamed "Lester").

<figure><img src="/files/z4dr4lZnGWRAKAnKtv3l" alt=""><figcaption><p>Kitrapod is very good. Try it for a few times</p></figcaption></figure>

Kitrap0d Information - <https://seclists.org/fulldisclosure/2010/Jan/341>

### Manual Kernel Exploitation

MS10-059 Exploit - <https://github.com/SecWiki/windows-kernel-exploits/tree/master/MS10-059>
