Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bed-4487: fix handling for unicode control characters #141

Merged
merged 11 commits into from
Jul 26, 2024
Prev Previous commit
Next Next commit
chore: use static initializer
rvazarkar committed Jul 26, 2024
commit 0dbd0855f2878d2b84db51dc11e54a3bffcaf92b
23 changes: 16 additions & 7 deletions src/CommonLib/Processors/LdapPropertyProcessor.cs
Original file line number Diff line number Diff line change
@@ -15,13 +15,22 @@

namespace SharpHoundCommonLib.Processors {
public class LdapPropertyProcessor {
private static readonly HashSet<string> ReservedAttributes = new HashSet<string>(CommonProperties.TypeResolutionProps
.Concat(CommonProperties.BaseQueryProps).Concat(CommonProperties.GroupResolutionProps)
.Concat(CommonProperties.ComputerMethodProps).Concat(CommonProperties.ACLProps)
.Concat(CommonProperties.ObjectPropsProps).Concat(CommonProperties.ContainerProps)
.Concat(CommonProperties.SPNTargetProps).Concat(CommonProperties.DomainTrustProps)
.Concat(CommonProperties.GPOLocalGroupProps).Concat(CommonProperties.CertAbuseProps)
.Concat(new string[] { LDAPProperties.DSASignature }));
private static readonly HashSet<string> ReservedAttributes = new();

static LdapPropertyProcessor() {
ReservedAttributes.IntersectWith(CommonProperties.TypeResolutionProps);
ReservedAttributes.IntersectWith(CommonProperties.BaseQueryProps);
ReservedAttributes.IntersectWith(CommonProperties.GroupResolutionProps);
ReservedAttributes.IntersectWith(CommonProperties.ComputerMethodProps);
ReservedAttributes.IntersectWith(CommonProperties.ACLProps);
ReservedAttributes.IntersectWith(CommonProperties.ObjectPropsProps);
ReservedAttributes.IntersectWith(CommonProperties.ContainerProps);
ReservedAttributes.IntersectWith(CommonProperties.SPNTargetProps);
ReservedAttributes.IntersectWith(CommonProperties.DomainTrustProps);
ReservedAttributes.IntersectWith(CommonProperties.GPOLocalGroupProps);
ReservedAttributes.IntersectWith(CommonProperties.CertAbuseProps);
ReservedAttributes.Add(LDAPProperties.DSASignature);
}

private readonly ILdapUtils _utils;

Loading