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

commonlib + version bumps #110

Merged
merged 1 commit into from
Jul 31, 2024
Merged
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
8 changes: 4 additions & 4 deletions Sharphound.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<LangVersion>latest</LangVersion>
<DebugType>full</DebugType>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Version>2.5.3</Version>
<FileVersion>2.5.3</FileVersion>
<Version>2.5.4</Version>
<FileVersion>2.5.4</FileVersion>
<Company>SpecterOps</Company>
<Product>SharpHound</Product>
<AssemblyName>SharpHound</AssemblyName>
Expand All @@ -24,8 +24,8 @@
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpHoundCommon" Version="4.0.3" />
<PackageReference Include="SharpHoundRPC" Version="4.0.3" />
<PackageReference Include="SharpHoundCommon" Version="4.0.4" />
<PackageReference Include="SharpHoundRPC" Version="4.0.4" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
Expand Down
8 changes: 6 additions & 2 deletions src/Runtime/LDAPConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.Logging;
using Sharphound.Client;
using SharpHoundCommonLib;
using SharpHoundCommonLib.Enums;
using SharpHoundCommonLib.OutputTypes;

namespace Sharphound.Runtime
Expand All @@ -24,11 +25,14 @@ internal static async Task ConsumeSearchResults(Channel<IDirectoryObject> 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();
Expand Down
Loading