| | 1 | | namespace SharpHoundCommonLib.LDAPQueries |
| | 2 | | { |
| | 3 | | public static class CommonFilters |
| | 4 | | { |
| 0 | 5 | | public static string EnabledOnly => "(!(UserAccountControl:1.2.840.113556.1.4.803:=2))"; |
| | 6 | |
|
| 0 | 7 | | public static string NeedsGPCFilePath => "(gpcfilesyspath=*)"; |
| | 8 | |
|
| 0 | 9 | | public static string NeedsSPN => "(serviceprincipalname=*)"; |
| | 10 | |
|
| 0 | 11 | | public static string ExcludeDomainControllers => "(!(userAccountControl:1.2.840.113556.1.4.803:=8192))"; |
| | 12 | |
|
| 0 | 13 | | public static string DomainControllers => "(userAccountControl:1.2.840.113556.1.4.803:=8192)"; |
| | 14 | |
|
| 2 | 15 | | public static string TrustedDomains => "(objectclass=trusteddomain)"; |
| | 16 | |
|
| | 17 | | public static string SpecificSID(string sid) |
| 0 | 18 | | { |
| 0 | 19 | | var hSid = Helpers.ConvertSidToHexSid(sid); |
| 0 | 20 | | return $"(objectsid={hSid})"; |
| 0 | 21 | | } |
| | 22 | |
|
| | 23 | | public static string SpecificGUID(string guid) |
| 0 | 24 | | { |
| 0 | 25 | | var hGuid = Helpers.ConvertGuidToHexGuid(guid); |
| 0 | 26 | | return $"(objectguid={hGuid})"; |
| 0 | 27 | | } |
| | 28 | | } |
| | 29 | | } |