Skip to content

Commit fafc032

Browse files
committed
add netlogon reg key
1 parent 68a68c6 commit fafc032

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SharpHoundCommonLib.OutputTypes
2+
{
3+
public class StrRegistryAPIResult : APIResult
4+
{
5+
public string Value { get; set; }
6+
}
7+
}

src/CommonLib/OutputTypes/Computer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public class SmbInfo {
6565
public class DCRegistryData {
6666
public IntRegistryAPIResult CertificateMappingMethods { get; set; }
6767
public IntRegistryAPIResult StrongCertificateBindingEnforcement { get; set; }
68+
public StrRegistryAPIResult VulnerableNetlogonSecurityDescriptor { get; set; }
6869
}
6970

7071
public class ComputerStatus {

src/CommonLib/Processors/DCRegistryProcessor.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,36 @@ public IntRegistryAPIResult GetStrongCertificateBindingEnforcement(string target
8181

8282
return ret;
8383
}
84+
85+
/// <summary>
86+
/// This function gets the VulnerableChannelAllowList registry value stored on DCs.
87+
/// </summary>
88+
/// <remarks>https://support.microsoft.com/en-us/topic/how-to-manage-the-changes-in-netlogon-secure-channel-connections-associated-with-cve-2020-1472-f7e8cc17-0309-1d6a-304e-5ba73cd1a11e</remarks>
89+
/// <param name="target"></param>
90+
/// <returns>StrRegistryAPIResult</returns>
91+
[ExcludeFromCodeCoverage]
92+
public StrRegistryAPIResult GetVulnerableNetlogonSecurityDescriptor(string target)
93+
{
94+
var ret = new StrRegistryAPIResult();
95+
const string subKey = @"SYSTEM\CurrentControlSet\Services\Netlogon\Parameters";
96+
const string subValue = "VulnerableChannelAllowList";
97+
var data = Helpers.GetRegistryKeyData(target, subKey, subValue, _log);
98+
99+
ret.Collected = data.Collected;
100+
if (!data.Collected)
101+
{
102+
ret.FailureReason = data.FailureReason;
103+
return ret;
104+
}
105+
106+
if (data.Value == null)
107+
{
108+
return ret;
109+
}
110+
111+
ret.Value = (string)data.Value;
112+
113+
return ret;
114+
}
84115
}
85116
}

0 commit comments

Comments
 (0)