BloodHoundAD / SharpHound2

The Old BloodHound C# Ingestor (Deprecated)
509 stars 113 forks source link

Sharphound crash #39

Closed johnmccash closed 6 years ago

johnmccash commented 6 years ago

When rerunning sharphound against the same domain a 2nd time:

Unhandled Exception: System.AggregateException: AggregateException_ctor_DefaultMessage ---> System.ArgumentException: Item has already been added. Key in dictionary: 'rootdomainnamingcontext' Key being added: 'rootdomainnamingcontext' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.SyncHashtable.Add(Object key, Object value) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName) at System.DirectoryServices.ActiveDirectory.Domain.get_Forest() at Sharphound2.Utils.GetForest(String domain) at Sharphound2.Enumeration.AclHelpers.GetObjectAces(SearchResultEntry entry, ResolvedEntry resolved, Gpo& g) at Sharphound2.Enumeration.EnumerationRunner.<>cDisplayClass19_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout) at System.Threading.Tasks.Task.WaitAll(Task[] tasks) at Sharphound2.Enumeration.EnumerationRunner.StartEnumeration() at Sharphound2.Sharphound.Main(String[] args) ---> (Inner Exception #0) System.ArgumentException: Item has already been added. Key in dictionary: 'rootdomainnamingcontext' Key being added: 'rootdomainnamingcontext' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.SyncHashtable.Add(Object key, Object value) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at System.DirectoryServices.ActiveDirectory.PropertyManager.GetPropertyValue(DirectoryContext context, DirectoryEntry directoryEntry, String propertyName) at System.DirectoryServices.ActiveDirectory.Domain.get_Forest() at Sharphound2.Utils.GetForest(String domain) at Sharphound2.Enumeration.AclHelpers.GetObjectAces(SearchResultEntry entry, ResolvedEntry resolved, Gpo& g) at Sharphound2.Enumeration.EnumerationRunner.<>cDisplayClass19_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---

johnmccash commented 6 years ago

The commandline was:

./sharphound.exe -c acl -d redacted -t 120 -v

rvazarkar commented 6 years ago

This should be fixed already 👍