Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

SharpHound can hang when using GPOLocalGroup due to bad regex in LocalGroupHelpers.cs #87

Open
m0noc opened this issue Oct 10, 2019 · 0 comments

Comments

@m0noc
Copy link

m0noc commented Oct 10, 2019

When using the GPOLocalGroup collection method Sharphound threads can hang due to some GPOs having a lowercase "S" in the SID in the GptTmpl.inf file.

The following fixes the issue and is consistent with the previous regex's in the file using 'IgnoreCase':-

paul@kali2017-1:~/tools/SharpHound/Sharphound2/Enumeration$ diff LocalGroupHelpers.cs LocalGroupHelpers.cs.orig
29c29
<         private static readonly Regex ExtractRid = new Regex(@"S-1-5-32-([0-9]{3})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
---
>         private static readonly Regex ExtractRid = new Regex(@"S-1-5-32-([0-9]{3})", RegexOptions.Compiled);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant