> 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/print-spooler.md).

# Print Spooler

We need to escalate our privileges. Let’s check our current privileges using the command:&#x20;

```
whoami /priv
```

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*qOXSWBAgpXTvkYxPAeBcTQ.png" alt="" height="174" width="700"><figcaption></figcaption></figure>

We have `SeImpersonatePrivilege`, so we can easily elevate our privileges using PrintSpoofer. The PrintSpoofer executable is already available on our local machine in the `/root/Desktop` directory.

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*DcBWnynwOynhBrW0PPlGag.png" alt="" height="90" width="700"><figcaption></figcaption></figure>

Let’s copy it to our SSH session using the command:

```
scp PrintSpoofer64.exe david@target.ine.local:"C:\\Users\\david\\"
```

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*JbpNmlnUA244pAEsXUbZ_A.png" alt="" height="62" width="700"><figcaption></figcaption></figure>

And we have successfully transferred the file. Let’s confirm it by using the `dir` command.

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*92sPyeUSYXuZW26enE7Upg.png" alt="" height="380" width="700"><figcaption></figcaption></figure>

Let’s execute the file using the command:&#x20;

```
PrintSpoofer64.exe -i -c cmd
```

> The command `PrintSpoofer64.exe -i -c cmd` is used to exploit **SeImpersonatePrivilege** in Windows to escalate privileges. Here's a breakdown of its components:
>
> **`PrintSpoofer64.exe`** → This is the executable file for the **PrintSpoofer** exploit, which leverages the **Print Spooler service** to escalate privileges.
>
> **`-i`** → Runs the command in **interactive mode**, allowing the user to interact with the elevated session.
>
> **`-c cmd`** → Specifies the command to execute; in this case, it launches **cmd.exe** (Command Prompt) with elevated privileges.

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*0_iz3-Y92gETvBXnj2seaw.png" alt="" height="150" width="700"><figcaption></figcaption></figure>

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*CVr7GpJ1rng27Nj3MvggaA.png" alt="" height="75" width="700"><figcaption></figcaption></figure>

So we need to enter the config directory using the command `cd config` and then type `dir` to list its contents.

<figure><img src="https://miro.medium.com/v2/resize:fit:875/1*zcJnPeoUvaxebzlZC0ULZw.png" alt="" height="351" width="700"><figcaption></figcaption></figure>
