Skip to content
Access control Write-up Advanced

Coercing WSUS Computer Accounts to Own the Update Server Database

A WSUS server configured with a remote SQL database can be coerced into authenticating to an attacker, and that NTLM authentication can be relayed to the SQL server to gain a database session. The WSUS machine account has EXECUTE rights on stored procedures that let an attacker publish and deploy a malicious update to a chosen target group.

coy0te Follow

Published on coy0te.medium.com

WSUS pushes signed content to every managed endpoint in the environment. If you own the mechanism that decides which files those endpoints download and execute, you own the endpoints.

coy0te, on coy0te.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the WSUS server's machine account is a valid SQL principal with EXECUTE rights on update-publishing stored procedures, and NTLM authentication can be relayed to the SQL server because SMB signing and channel binding are not enforced.

Impact

An attacker could publish and deploy a malicious update to a chosen target group, but the text notes that payload download nuances and file signature verification are real obstacles covered in Part 2, so this is a delivery mechanism rather than a complete execution guarantee.

What the attacker needed

WSUS uses a standalone remote SQL database; SMB signing and channel binding not enforced; Attacker can reach the WSUS server and SQL server; WSUS machine account has EXECUTE on procedures

The fix

Enforce SMB signing and channel binding (EPA) on the SQL endpoint, use a Windows Internal Database where possible, tightly scope the WSUS account's rights, and monitor SUSDB for execution of the publishing procedures.

How it was found

  1. Set up an SMB listener that relays incoming authentication to the WSUS SQL server.
  2. Use PetitPotam to coerce the upstream WSUS server into authenticating to the attacker.
  3. The relayed authentication establishes an MSSQL session as the WSUS computer account.
  4. Enumerate the account's database role and stored-procedure permissions.
  5. Call the WSUS publishing stored procedures to import a bundled update, save its XML fragments, set the payload URL, create a target group, add the victim computer, and deploy the update.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

WSUS is a Microsoft tool that lets administrators push software updates to Windows computers. When its database sits on a separate SQL server, the WSUS server must log in to that database automatically. An attacker can trick the WSUS server into logging in to the attacker instead, then pass that login on to the real database. Once inside, the attacker can use the database's own update-publishing commands to send a malicious update to selected computers.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by coy0te

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.