diff --git a/Sharphound.csproj b/Sharphound.csproj index a04e8d4..ae75dac 100644 --- a/Sharphound.csproj +++ b/Sharphound.csproj @@ -6,8 +6,8 @@ latest full favicon.ico - 2.5.3 - 2.5.3 + 2.5.4 + 2.5.4 SpecterOps SharpHound SharpHound @@ -24,8 +24,8 @@ - - + + diff --git a/src/Runtime/LDAPConsumer.cs b/src/Runtime/LDAPConsumer.cs index 4aa4046..952b0f9 100644 --- a/src/Runtime/LDAPConsumer.cs +++ b/src/Runtime/LDAPConsumer.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; using Sharphound.Client; using SharpHoundCommonLib; +using SharpHoundCommonLib.Enums; using SharpHoundCommonLib.OutputTypes; namespace Sharphound.Runtime @@ -24,11 +25,14 @@ internal static async Task ConsumeSearchResults(Channel inputC await foreach (var item in inputChannel.Reader.ReadAllAsync()) try { - if (await LdapUtils.ResolveSearchResult(item, context.LDAPUtils) is not (true, var res) || res == null) { + if (await LdapUtils.ResolveSearchResult(item, context.LDAPUtils) is not (true, var res) || res == null || res.ObjectType == Label.Base) { + if (item.TryGetDistinguishedName(out var dn)) { + log.LogTrace("Consumer failed to resolve entry for {item} or label was Base", dn); + } continue; } - log.LogTrace("Consumer {ThreadID} started processing {obj}", threadId, res.DisplayName); + log.LogTrace("Consumer {ThreadID} started processing {obj} ({type})", threadId, res.DisplayName, res.ObjectType); watch.Start(); var processed = await processor.ProcessObject(item, res, computerStatusChannel); watch.Stop();