mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Merge pull request #1000 from idarlund/patch-1
added powershell command to show wsus config
This commit is contained in:
commit
7bcc425cf1
@ -174,20 +174,34 @@ Get-PSDrive | where {$_.Provider -like "Microsoft.PowerShell.Core\FileSystem"}|
|
||||
|
||||
You can compromise the system if the updates are not requested using http**S** but http.
|
||||
|
||||
You start by checking if the network uses a non-SSL WSUS update by running the following:
|
||||
You start by checking if the network uses a non-SSL WSUS update by running the following in cmd:
|
||||
|
||||
```
|
||||
reg query HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v WUServer
|
||||
```
|
||||
|
||||
If you get a reply such as:
|
||||
Or the following in PowerShell:
|
||||
|
||||
```
|
||||
Get-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Name "WUServer"
|
||||
```
|
||||
|
||||
If you get a reply such as one of these:
|
||||
|
||||
```bash
|
||||
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate
|
||||
WUServer REG_SZ http://xxxx-updxx.corp.internal.com:8535
|
||||
```
|
||||
```bash
|
||||
WUServer : http://xxxx-updxx.corp.internal.com:8530
|
||||
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\policies\microsoft\windows\windowsupdate
|
||||
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\software\policies\microsoft\windows
|
||||
PSChildName : windowsupdate
|
||||
PSDrive : HKLM
|
||||
PSProvider : Microsoft.PowerShell.Core\Registry
|
||||
```
|
||||
|
||||
And if `HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v UseWUServer` is equals to `1`.
|
||||
And if `HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v UseWUServer` or `Get-ItemProperty -Path hklm:\software\policies\microsoft\windows\windowsupdate\au -name "usewuserver"` is equals to `1`.
|
||||
|
||||
Then, **it is exploitable.** If the last registry is equals to 0, then, the WSUS entry will be ignored.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user