From b3bba2c8391c3a2be337ac87ff1e7aedb3b8df34 Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Tue, 3 Sep 2024 12:02:25 -0400 Subject: [PATCH] chore: up default port scan timeout (#113) chore: bump commonlib version chore: bump version --- Sharphound.csproj | 4 ++-- src/Options.cs | 2 +- src/Runtime/ObjectProcessors.cs | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Sharphound.csproj b/Sharphound.csproj index 1434395..71bbe31 100644 --- a/Sharphound.csproj +++ b/Sharphound.csproj @@ -6,8 +6,8 @@ latest full favicon.ico - 2.5.4 - 2.5.4 + 2.5.6 + 2.5.6 SpecterOps SharpHound SharpHound diff --git a/src/Options.cs b/src/Options.cs index 6cd6e38..9b4ca53 100644 --- a/src/Options.cs +++ b/src/Options.cs @@ -109,7 +109,7 @@ public class Options [Option(HelpText = "Skip checking if 445 is open", Default = false)] public bool SkipPortCheck { get; set; } - [Option(HelpText = "Timeout for port checks in milliseconds", Default = 500)] + [Option(HelpText = "Timeout for port checks in milliseconds", Default = 10000)] public int PortCheckTimeout { get; set; } [Option(HelpText = "Skip check for PwdLastSet when enumerating computers", Default = false)] diff --git a/src/Runtime/ObjectProcessors.cs b/src/Runtime/ObjectProcessors.cs index b427f44..61a242b 100644 --- a/src/Runtime/ObjectProcessors.cs +++ b/src/Runtime/ObjectProcessors.cs @@ -114,6 +114,8 @@ private static Dictionary GetCommonProperties(IDirectoryObject e return props; } + + private async Task ProcessUserObject(IDirectoryObject entry, ResolvedSearchResult resolvedSearchResult) { @@ -315,7 +317,7 @@ private async Task ProcessGroupObject(IDirectoryObject entry, ret.Properties.Add("samaccountname", entry.GetProperty(LDAPProperties.SAMAccountName)); if ((_methods & CollectionMethod.ACL) != 0) { - ret.Aces = await _aclProcessor.ProcessACL(resolvedSearchResult, entry).ToArrayAsync(); + ret.Aces = await _aclProcessor.ProcessACL(resolvedSearchResult, entry).ToArrayAsync(cancellationToken: _cancellationToken); ret.IsACLProtected = _aclProcessor.IsACLProtected(entry); ret.Properties.Add("isaclprotected", ret.IsACLProtected); } @@ -323,7 +325,7 @@ private async Task ProcessGroupObject(IDirectoryObject entry, if ((_methods & CollectionMethod.Group) != 0) ret.Members = await _groupProcessor .ReadGroupMembers(resolvedSearchResult, entry) - .ToArrayAsync(); + .ToArrayAsync(cancellationToken: _cancellationToken); if ((_methods & CollectionMethod.ObjectProps) != 0) { var groupProps = LdapPropertyProcessor.ReadGroupProperties(entry);