Skip to content
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

Add NTLMv1 flag on GPO #87

Open
wants to merge 1 commit into
base: 2.X
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions src/Runtime/ObjectProcessors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ObjectProcessors
private readonly GroupProcessor _groupProcessor;
private readonly LDAPPropertyProcessor _ldapPropertyProcessor;
private readonly GPOLocalGroupProcessor _gpoLocalGroupProcessor;
private readonly GPOLmCompatibilityLevelProcessor _gpoLmCompatibilityLevelProcessor;
private readonly UserRightsAssignmentProcessor _userRightsAssignmentProcessor;
private readonly LocalGroupProcessor _localGroupProcessor;
private readonly ILogger _log;
Expand All @@ -52,6 +53,7 @@ public ObjectProcessors(IContext context, ILogger log)
_groupProcessor = new GroupProcessor(context.LDAPUtils);
_containerProcessor = new ContainerProcessor(context.LDAPUtils);
_gpoLocalGroupProcessor = new GPOLocalGroupProcessor(context.LDAPUtils);
_gpoLmCompatibilityLevelProcessor = new GPOLmCompatibilityLevelProcessor(context.LDAPUtils);
_userRightsAssignmentProcessor = new UserRightsAssignmentProcessor(context.LDAPUtils);
_localGroupProcessor = new LocalGroupProcessor(context.LDAPUtils);
_methods = context.ResolvedCollectionMethods;
Expand All @@ -71,7 +73,7 @@ internal async Task<OutputBase> ProcessObject(ISearchResultEntry entry,
case Label.Group:
return ProcessGroupObject(entry, resolvedSearchResult);
case Label.GPO:
return ProcessGPOObject(entry, resolvedSearchResult);
return await ProcessGPOObject(entry, resolvedSearchResult);
case Label.Domain:
return await ProcessDomainObject(entry, resolvedSearchResult);
case Label.OU:
Expand Down Expand Up @@ -407,7 +409,7 @@ private async Task<Domain> ProcessDomainObject(ISearchResultEntry entry,
return ret;
}

private GPO ProcessGPOObject(ISearchResultEntry entry,
private async Task<GPO> ProcessGPOObject(ISearchResultEntry entry,
ResolvedSearchResult resolvedSearchResult)
{
var ret = new GPO
Expand Down Expand Up @@ -436,6 +438,8 @@ private GPO ProcessGPOObject(ISearchResultEntry entry,
ret.Properties);
}
}
ret.NTLMv1Enabled = await _gpoLmCompatibilityLevelProcessor.ReadGPOLmCompatibilityLevel(entry);
ret.Properties.Add("ntlmv1", ret.NTLMv1Enabled);

return ret;
}
Expand Down
Loading