diff --git a/Sharphound.csproj b/Sharphound.csproj index 476cb39..da8c3ab 100644 --- a/Sharphound.csproj +++ b/Sharphound.csproj @@ -6,8 +6,8 @@ latest full favicon.ico - 2.5.1 - 2.5.1 + 2.5.2 + 2.5.2 SpecterOps SharpHound SharpHound @@ -24,8 +24,8 @@ - - + + diff --git a/src/Runtime/ObjectProcessors.cs b/src/Runtime/ObjectProcessors.cs index 4e289ad..566135b 100644 --- a/src/Runtime/ObjectProcessors.cs +++ b/src/Runtime/ObjectProcessors.cs @@ -580,15 +580,11 @@ private async Task ProcessEnterpriseCA(IDirectoryObject entry, var caName = entry.GetProperty(LDAPProperties.Name); var dnsHostName = entry.GetProperty(LDAPProperties.DNSHostName); if (caName != null && dnsHostName != null) { - _log.LogWarning("CA {Name} host ({Dns}) could not be resolved to a SID.", caName, dnsHostName); if (await _context.LDAPUtils.ResolveHostToSid(dnsHostName, resolvedSearchResult.DomainSid) is (true, var sid) && sid.StartsWith("S-1-")) { ret.HostingComputer = sid; - } - - // If ResolveHostToSid does not return a valid SID, we don't want to record this host - if (ret.HostingComputer != null && !ret.HostingComputer.StartsWith("S-1-")) { - ret.HostingComputer = null; + } else { + _log.LogWarning("CA {Name} host ({Dns}) could not be resolved to a SID.", caName, dnsHostName); } CARegistryData cARegistryData = new() {