WSUS
Windows Server Update Services (WSUS)
Windows Server Update Services (WSUS) is a Microsoft service used to centrally distribute updates and patches for Microsoft products within an organisation. It allows internal systems to receive updates without direct internet access and is commonly deployed in corporate Windows environments.
Access to WSUS requires administrative privileges on the WSUS server, typically membership in the local Administrators or the WSUS Administrators group. For lateral movement via WSUS, the target systems must be configured to receive updates from the compromised WSUS server.
Enumeration
Alternatives to SharpWSUS β WSUSpendu (PowerShell) and Thunder_Woosus (C#).
Enumerate if there is a WSUS Server using reg.exe or SharpWSUS.
# Query the registry key of the service
> reg query HKLM\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate /v WUServer
# Locate the WSUS service via SharpWSUS
.\SharpWSUS.exe locateConnect to the WSUS server and get information about computers, groups, etc.
# List WSUS information (privileged shell)
.\SharpWSUS.exe inspectLateral Movement
The objective is to create an update that enables command execution on the target system. Since WSUS only allows Microsoft-signed binaries, the update must appear legitimate and use approved components to achieve execution. The process is as follows:
Create a malicious patch
Approve the patch for deployment
Wait for the target to download the patch
Clean up post-compromise
Create a malicious patch that adds the compromised user to the local Administrator group.
-sβ run as SYSTEM,-accepteulaβ avoid pop-ups,-dβ return right away
Check if the update was added into the server via WSUS.

Next, approve the patch for deployment by specifying which computers this patch will apply to and associate those computers with a group.
Sometimes SharpWSUS won't automatically approve the update or errors can pop up when uploading PSExec64.exe once the update is approved. In this case, we have to approve the patch manually.


If the WSUS Administrator account we are using is not a member of the WSUS Administrators group, when we approve the update, it will fail to download the binary.

To fix this, check how WSUS expect the file to be named and copy the renamed binary to the WSUScontent directory.
Now, we go to the WSUS Service GUI, select the update with the error, and click Retry Download.
If we perform the above step, i.e., copied PsExec64.exe into the WsusContent directory, it is recommended that we create another update with a different title but the same payload to force the update quickly.
Wait for the target to download and install the patch. If access to it is available, force an update.
Last updated