diff --git a/Sharphound.csproj b/Sharphound.csproj index da8c3ab..a04e8d4 100644 --- a/Sharphound.csproj +++ b/Sharphound.csproj @@ -6,8 +6,8 @@ latest full favicon.ico - 2.5.2 - 2.5.2 + 2.5.3 + 2.5.3 SpecterOps SharpHound SharpHound @@ -24,8 +24,8 @@ - - + + diff --git a/src/Runtime/ObjectProcessors.cs b/src/Runtime/ObjectProcessors.cs index 566135b..f8ff61c 100644 --- a/src/Runtime/ObjectProcessors.cs +++ b/src/Runtime/ObjectProcessors.cs @@ -349,6 +349,10 @@ private async Task ProcessDomainObject(IDirectoryObject entry, var ret = new Domain { ObjectIdentifier = resolvedSearchResult.ObjectId }; + + if (await _context.LDAPUtils.GetForest(resolvedSearchResult.DisplayName) is (true, var forest) && await _context.LDAPUtils.GetDomainSidFromDomainName(forest) is (true, var forestSid)) { + ret.ForestRootIdentifier = forestSid; + } ret.Properties = new Dictionary(GetCommonProperties(entry, resolvedSearchResult));