Safeguard
Application Security•

Detecting and Mitigating PubPrn Proxy Execution (T1216.001)

PubPrn.vbs is a signed Microsoft script that can be abused to run remote scriptlets. What T1216.001 documents, how to spot it and how to block it.

Safeguard Security Team
2 min read

PubPrn.vbs is a Visual Basic script that publishes a printer to Active Directory Domain Services. It may be signed by Microsoft and is commonly run through Cscript.exe. MITRE ATT&CK tracks its abuse as T1216.001, PubPrn, under System Script Proxy Execution in the Stealth tactic. The platform is Windows.

How attackers use it

MITRE describes adversaries setting the second parameter of the script to the script: moniker, pointing at a scriptlet file (.sct) hosted on a remote site. The signed script then fetches and runs the remote content. Because the script is signed, this can bypass signature validation and application control tools that do not account for it.

Newer Windows versions limit that parameter to LDAP://, which removes the remote proxying route. Older systems are the concern.

How to detect it

The MITRE detection strategy is specific: look for PubPrn.vbs executed through cscript.exe with the script: moniker loading a remote .sct file. Process creation logs with full command lines are the data you need. Sysmon event ID 1 or Windows Security event 4688 with command line auditing both work.

How to reduce the risk

  • Use application control to block execution of this script if your environment does not need it.
  • On Windows 10, update Windows Defender Application Control policies to include rules that block the older, vulnerable versions of PubPrn.

Quick check

What change in newer Windows versions limits this abuse?

PubPrn.vbs now restricts the second parameter to the LDAP:// protocol instead of allowing the script: moniker that could reference code over HTTP or HTTPS.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.