Skip to content

Commit

Permalink
Re-added Foreign-Security-Principal type and fixed InheritsSecurity, …
Browse files Browse the repository at this point in the history
…sigh
  • Loading branch information
lkarlslund committed Jan 22, 2024
1 parent cfe2e91 commit 89325b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/engine/objecttype.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var (
ObjectTypeCertificateTemplate = NewObjectType("CertificateTemplate", "PKI-Certificate-Template")
ObjectTypePKIEnrollmentService = NewObjectType("PKIEnrollmentService", "PKI-Enrollment-Service")
ObjectTypeCertificationAuthority = NewObjectType("CertificationAuthority", "Certification-Authority")
ObjectTypeForeignSecurityPrincipal = NewObjectType("ForeignSecurityPrincipal", "Foreign-Security-Principal")
ObjectTypeService = NewObjectType("Service", "Service").SetDefault(Last, false)
ObjectTypeExecutable = NewObjectType("Executable", "Executable").SetDefault(Last, false)
ObjectTypeDirectory = NewObjectType("Directory", "Directory").SetDefault(Last, false)
Expand Down
3 changes: 3 additions & 0 deletions modules/integrations/activedirectory/analyze/analyze-ad.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func init() {

Loader.AddProcessor(func(ao *engine.Objects) {
ao.Iterate(func(o *engine.Object) bool {
if o.Type() == engine.ObjectTypeForeignSecurityPrincipal {
return true
}
if sd, err := o.SecurityDescriptor(); err == nil && sd.Control&engine.CONTROLFLAG_DACL_PROTECTED == 0 {
if parentobject, found := ao.DistinguishedParent(o); found {
parentobject.EdgeTo(o, EdgeInheritsSecurity)
Expand Down

0 comments on commit 89325b8

Please sign in to comment.