diff --git a/src/CommonLib/Enums/DataType.cs b/src/CommonLib/Enums/DataType.cs index af3d5bb9..c2d9986c 100644 --- a/src/CommonLib/Enums/DataType.cs +++ b/src/CommonLib/Enums/DataType.cs @@ -12,7 +12,7 @@ public static class DataType public const string RootCAs = "rootcas"; public const string AIACAs = "aiacas"; public const string NTAuthStores = "ntauthstores"; - public const string EnrollmentServices = "enrollmentservices"; + public const string EnterpriseCAs = "enterprisecas"; public const string CertTemplates = "certtemplates"; } } \ No newline at end of file diff --git a/src/CommonLib/Enums/DirectoryPaths.cs b/src/CommonLib/Enums/DirectoryPaths.cs index cd06ed08..1b076c5a 100644 --- a/src/CommonLib/Enums/DirectoryPaths.cs +++ b/src/CommonLib/Enums/DirectoryPaths.cs @@ -2,7 +2,7 @@ { public class DirectoryPaths { - public const string EnrollmentServiceLocation = "CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration"; + public const string EnterpriseCALocation = "CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration"; public const string RootCALocation = "CN=Certification Authorities,CN=Public Key Services,CN=Services,CN=Configuration"; public const string AIACALocation = "CN=AIA,CN=Public Key Services,CN=Services,CN=Configuration"; public const string CertTemplateLocation = "CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration"; diff --git a/src/CommonLib/Enums/Labels.cs b/src/CommonLib/Enums/Labels.cs index 07f4b71c..c5611ff2 100644 --- a/src/CommonLib/Enums/Labels.cs +++ b/src/CommonLib/Enums/Labels.cs @@ -16,7 +16,7 @@ public enum Label CertAuthority, RootCA, AIACA, - EnrollmentService, + EnterpriseCA, NTAuthStore } } \ No newline at end of file diff --git a/src/CommonLib/Enums/PKIEnrollmentServiceFlags.cs b/src/CommonLib/Enums/PKIEnterpriseCAFlags.cs similarity index 86% rename from src/CommonLib/Enums/PKIEnrollmentServiceFlags.cs rename to src/CommonLib/Enums/PKIEnterpriseCAFlags.cs index d985edef..f0627a68 100644 --- a/src/CommonLib/Enums/PKIEnrollmentServiceFlags.cs +++ b/src/CommonLib/Enums/PKIEnterpriseCAFlags.cs @@ -3,7 +3,7 @@ namespace SharpHoundCommonLib.Enums { [Flags] - public enum PKIEnrollmentServiceFlags + public enum PKIEnterpriseCAFlags { NO_TEMPLATE_SUPPORT = 0x00000001, SUPPORTS_NT_AUTHENTICATION = 0x00000002, diff --git a/src/CommonLib/Extensions.cs b/src/CommonLib/Extensions.cs index 03f3135a..4c001e6e 100644 --- a/src/CommonLib/Extensions.cs +++ b/src/CommonLib/Extensions.cs @@ -372,7 +372,7 @@ public static Label GetLabel(this SearchResultEntry entry) else if (objectClasses.Contains(PKICertificateTemplateClass, StringComparer.InvariantCultureIgnoreCase)) objectType = Label.CertTemplate; else if (objectClasses.Contains(PKIEnrollmentServiceClass, StringComparer.InvariantCultureIgnoreCase)) - objectType = Label.EnrollmentService; + objectType = Label.EnterpriseCA; else if (objectClasses.Contains(CertificationAutorityClass, StringComparer.InvariantCultureIgnoreCase)) { if (entry.DistinguishedName.Contains(DirectoryPaths.RootCALocation)) diff --git a/src/CommonLib/OutputTypes/EnrollmentService.cs b/src/CommonLib/OutputTypes/EnterpriseCA.cs similarity index 87% rename from src/CommonLib/OutputTypes/EnrollmentService.cs rename to src/CommonLib/OutputTypes/EnterpriseCA.cs index 62bd081f..45abb13c 100644 --- a/src/CommonLib/OutputTypes/EnrollmentService.cs +++ b/src/CommonLib/OutputTypes/EnterpriseCA.cs @@ -1,6 +1,6 @@ namespace SharpHoundCommonLib.OutputTypes { - public class EnrollmentService : OutputBase + public class EnterpriseCA : OutputBase { public TypedPrincipal[] EnabledCertTemplates { get; set; } public string HostingComputer { get; set; } diff --git a/src/CommonLib/Processors/ACLProcessor.cs b/src/CommonLib/Processors/ACLProcessor.cs index 9dfad088..cdc034bc 100644 --- a/src/CommonLib/Processors/ACLProcessor.cs +++ b/src/CommonLib/Processors/ACLProcessor.cs @@ -33,7 +33,7 @@ static ACLProcessor() {Label.Container, "bf967a8b-0de6-11d0-a285-00aa003049e2"}, {Label.RootCA, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"}, {Label.AIACA, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"}, - {Label.EnrollmentService, "ee4aa692-3bba-11d2-90cc-00c04fd91ab1"}, + {Label.EnterpriseCA, "ee4aa692-3bba-11d2-90cc-00c04fd91ab1"}, {Label.NTAuthStore, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"}, {Label.CertTemplate, "e5209ca2-3bba-11d2-90cc-00c04fd91ab1"} }; @@ -444,8 +444,8 @@ public IEnumerable ProcessACL(byte[] ntSecurityDescriptor, string objectDom } } - // Enrollment service rights - if (objectType == Label.EnrollmentService) + // EnterpriseCA rights + if (objectType == Label.EnterpriseCA) { if (aceType is ACEGuids.Enroll) yield return new ACE diff --git a/src/CommonLib/Processors/LDAPPropertyProcessor.cs b/src/CommonLib/Processors/LDAPPropertyProcessor.cs index 5b3a181a..72028290 100644 --- a/src/CommonLib/Processors/LDAPPropertyProcessor.cs +++ b/src/CommonLib/Processors/LDAPPropertyProcessor.cs @@ -406,10 +406,10 @@ public static Dictionary ReadAIACAProperties(ISearchResultEntry return props; } - public static Dictionary ReadEnrollmentServiceProperties(ISearchResultEntry entry) + public static Dictionary ReadEnterpriseCAProperties(ISearchResultEntry entry) { var props = GetCommonProps(entry); - if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnrollmentServiceFlags)flags); + if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnterpriseCAFlags)flags); return props; } diff --git a/src/CommonLib/SearchResultEntryWrapper.cs b/src/CommonLib/SearchResultEntryWrapper.cs index f5788209..d627fef4 100644 --- a/src/CommonLib/SearchResultEntryWrapper.cs +++ b/src/CommonLib/SearchResultEntryWrapper.cs @@ -171,7 +171,7 @@ public ResolvedSearchResult ResolveBloodHoundInfo() case Label.RootCA: case Label.AIACA: case Label.NTAuthStore: - case Label.EnrollmentService: + case Label.EnterpriseCA: case Label.CertTemplate: res.DisplayName = $"{GetProperty(LDAPProperties.Name)}@{itemDomain}"; break;