From 98c0a697fcf0f693e58d42177730d42d9c37941c Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Wed, 20 Nov 2024 14:31:49 -0500 Subject: [PATCH 1/2] chore: move group collection to end of our ldap queries --- src/CommonLib/LdapProducerQueryGenerator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CommonLib/LdapProducerQueryGenerator.cs b/src/CommonLib/LdapProducerQueryGenerator.cs index 1fc7ea73..0d6580f8 100644 --- a/src/CommonLib/LdapProducerQueryGenerator.cs +++ b/src/CommonLib/LdapProducerQueryGenerator.cs @@ -59,11 +59,6 @@ public static GeneratedLdapParameters GenerateDefaultPartitionParameters(Collect }; } - if (methods.HasFlag(CollectionMethod.Group)) { - filter = filter.AddGroups(); - properties.AddRange(CommonProperties.GroupResolutionProps); - } - if (methods.IsComputerCollectionSet()) { filter = filter.AddComputers(); properties.AddRange(CommonProperties.ComputerMethodProps); @@ -89,6 +84,11 @@ public static GeneratedLdapParameters GenerateDefaultPartitionParameters(Collect properties.AddRange(CommonProperties.ComputerMethodProps); } + if (methods.HasFlag(CollectionMethod.Group)) { + filter = filter.AddGroups(); + properties.AddRange(CommonProperties.GroupResolutionProps); + } + return new GeneratedLdapParameters { Filter = filter, Attributes = properties.Distinct().ToArray() From ffa65a9bc873e427d931f0dfc579da89d4dd7940 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Thu, 21 Nov 2024 11:24:10 -0500 Subject: [PATCH 2/2] chore: version bump --- src/CommonLib/SharpHoundCommonLib.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommonLib/SharpHoundCommonLib.csproj b/src/CommonLib/SharpHoundCommonLib.csproj index 6c88c8e8..fd5d7aa0 100644 --- a/src/CommonLib/SharpHoundCommonLib.csproj +++ b/src/CommonLib/SharpHoundCommonLib.csproj @@ -9,7 +9,7 @@ Common library for C# BloodHound enumeration tasks GPL-3.0-only https://github.com/BloodHoundAD/SharpHoundCommon - 4.0.8 + 4.0.9 SharpHoundCommonLib SharpHoundCommonLib