You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/windows-hardening/active-directory-methodology/printers-spooler-service-abuse.md
+47-5Lines changed: 47 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@
11
11
If the _**Print Spooler**_ service is **enabled,** you can use some already known AD credentials to **request** to the Domain Controller’s print server an **update** on new print jobs and just tell it to **send the notification to some system**.\
12
12
Note when printer send the notification to an arbitrary systems, it needs to **authenticate against** that **system**. Therefore, an attacker can make the _**Print Spooler**_ service authenticate against an arbitrary system, and the service will **use the computer account** in this authentication.
13
13
14
+
Under the hood, the classic **PrinterBug** primitive abuses **`RpcRemoteFindFirstPrinterChangeNotificationEx`** over **`\\PIPE\\spoolss`**. The attacker first opens a printer/server handle and then supplies a fake client name in `pszLocalMachine`, so the target spooler creates a notification channel **back to the attacker-controlled host**. This is why the effect is **outbound authentication coercion** rather than direct code execution.\
15
+
If you are looking for **RCE/LPE** in the spooler itself, check [PrintNightmare](printnightmare.md). This page is focused on **coercion and relay**.
16
+
14
17
### Finding Windows Servers on the domain
15
18
16
19
Using PowerShell, get a list of Windows boxes. Servers are usually priority, so lets focus there:
@@ -28,12 +31,27 @@ Using a slightly modified @mysmartlogin's (Vincent Le Toux's) [SpoolerScanner](h
This is useful because seeing the endpoint in EPM only tells you that the print RPC interface is registered. It does **not** guarantee that every coercion method is reachable with your current privileges or that the host will emit a usable authentication flow.
54
+
37
55
### Ask the service to authenticate against an arbitrary host
38
56
39
57
You can compile [SpoolSample from here](https://github.com/NotMedic/NetNTLMtoSilverTicket).
Classic PrinterBug usually yields an **SMB** authentication to `\\attacker\share`, which is still useful for**capture**, **relay to HTTP targets** or **relay where SMB signing is absent**.\
80
+
However, in modern environments, relaying **SMB to SMB** is frequently blocked by **SMB signing**, so operators often prefer to force **HTTP/WebDAV** authentication instead.
81
+
82
+
If the target has the **WebClient** service running, the listener can be specified in a form that makes Windows use **WebDAV over HTTP**:
This is especially useful when chaining with **`ntlmrelayx --adcs`** or other HTTP relay targets because it avoids relying on SMB relayability on the coerced connection. The important caveat is that **WebClient must be running** on the victim for the HTTP/WebDAV variant to work.
90
+
52
91
### Combining with Unconstrained Delegation
53
92
54
93
If an attacker has already compromised a computer with [Unconstrained Delegation](unconstrained-delegation.md), the attacker could **make the printer authenticate against this computer**. Due to the unconstrained delegation, the **TGT** of the **computer account of the printer** will be **saved in** the **memory** of the computer with unconstrained delegation. As the attacker has already compromised this host, he will be able to **retrieve this ticket** and abuse it ([Pass the Ticket](pass-the-ticket.md)).
@@ -62,11 +101,11 @@ If an attacker has already compromised a computer with [Unconstrained Delegation
- Notes: asynchronous print interface on the same spooler pipe; use Coercer to enumerate reachable methods on a given host
70
109
- MS-EFSR (Encrypting File System Remote Protocol)
71
110
- Pipes: \\PIPE\\efsrpc (also via \\PIPE\\lsarpc, \\PIPE\\samr, \\PIPE\\lsass, \\PIPE\\netlogon)
72
111
- IF UUIDs: c681d488-d850-11d0-8c52-00c04fd90f7e ; df1941c5-fe89-4e79-bf10-463657acf44d
@@ -88,7 +127,8 @@ If an attacker has already compromised a computer with [Unconstrained Delegation
88
127
- Opnum: 9 ElfrOpenBELW
89
128
- Tool: CheeseOunce
90
129
91
-
Note: These methods accept parameters that can carry a UNC path (e.g., `\\attacker\share`). When processed, Windows will authenticate (machine/user context) to that UNC, enabling NetNTLM capture or relay.
130
+
Note: These methods accept parameters that can carry a UNC path (e.g., `\\attacker\share`). When processed, Windows will authenticate (machine/user context) to that UNC, enabling NetNTLM capture or relay.\
131
+
For spooler abuse, **MS-RPRN opnum 65** remains the most common and best-documented primitive because the protocol specification explicitly states that the server creates a notification channel back to the client specified by `pszLocalMachine`.
92
132
93
133
### MS-EVEN: ElfrOpenBELW (opnum 9) coercion
94
134
- Interface: MS-EVEN over \\PIPE\\even (IF UUID 82273fdc-e32a-18c3-3f78-827929dc23ea)
@@ -175,11 +215,13 @@ _Remember that in order to crack NTLMv1 you need to set Responder challenge to "
0 commit comments