Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions SharpUp/Checks/WSUSOverHTTP.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using SharpUp.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static SharpUp.Utilities.RegistryUtils;

namespace SharpUp.Checks
{
public class WSUSOverHTTP : VulnerabilityCheck
{
private static string _regPath = "Software\\Policies\\Microsoft\\Windows\\WindowsUpdate";
private static string _regName = "WUServer";
private static string _regPathEnabled = "Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU";
private static string _regNameEnabled = "UseWUServer";

public WSUSOverHTTP()
{
_name = "WSUS updates over HTTP";
string WSUSOverHTTPHKLM = GetRegValue("HKLM", _regPath, _regName);
string WSUSEnabledHKLM = GetRegValue("HKLM", _regPathEnabled, _regNameEnabled);

if (WSUSOverHTTPHKLM.ToLower().StartsWith("http://") & (WSUSEnabledHKLM == "1"))
{
_details.Add($"WUServer: {WSUSOverHTTPHKLM}");
_isVulnerable = true;
}
}
}
}
1 change: 1 addition & 0 deletions SharpUp/SharpUp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<Compile Include="Checks\TokenPrivileges.cs" />
<Compile Include="Checks\UnattendedInstallFiles.cs" />
<Compile Include="Checks\UnquotedServicePath.cs" />
<Compile Include="Checks\WSUSOverHTTP.cs" />
<Compile Include="Classes\VulnerabilityCheck.cs" />
<Compile Include="Interfaces\IVulnerabilityCheck.cs" />
<Compile Include="Native\Win32.cs" />
Expand Down