CravateRouge / bloodyAD

BloodyAD is an Active Directory Privilege Escalation Framework
MIT License
1.12k stars 112 forks source link

improve --resolve-sd output #42

Open Brother-x86 opened 8 months ago

Brother-x86 commented 8 months ago

Hello! Thank you for the démo :)

Just this small idea to improve readability of : get object --attr nTSecurityDescriptor --resolve-sd

For example :

nTSecurityDescriptor.Owner: Domain Admins
nTSecurityDescriptor.Control: DACL_AUTO_INHERITED|DACL_PRESENT|SACL_AUTO_INHERITED|SELF_RELATIVE
nTSecurityDescriptor.ACL.0.Type: == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.0.Trustee: RAS and IAS Servers
nTSecurityDescriptor.ACL.0.Right: READ_PROP
nTSecurityDescriptor.ACL.0.ObjectType: Logon-Information; Remote-Access-Information; Group-Membership; Account-Restrictions
nTSecurityDescriptor.ACL.1.Type: == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.1.Trustee: Cert Publishers
nTSecurityDescriptor.ACL.1.Right: WRITE_PROP|READ_PROP
nTSecurityDescriptor.ACL.1.ObjectType: X509-Cert
nTSecurityDescriptor.ACL.2.Type: == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.2.Trustee: WINDOWS_AUTHORIZATION_ACCESS_GROUP
nTSecurityDescriptor.ACL.2.Right: READ_PROP
nTSecurityDescriptor.ACL.2.ObjectType: Token-Groups-Global-And-Universal

Could become like this with TAB and jumpline:

nTSecurityDescriptor.Owner: Domain Admins
nTSecurityDescriptor.Control:   DACL_AUTO_INHERITED|DACL_PRESENT|SACL_AUTO_INHERITED|SELF_RELATIVE

nTSecurityDescriptor.ACL.0.Type:    == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.0.Trustee:     RAS and IAS Servers
nTSecurityDescriptor.ACL.0.Right:   READ_PROP
nTSecurityDescriptor.ACL.0.ObjectType:  Logon-Information; Remote-Access-Information; Group-Membership; Account-Restrictions

nTSecurityDescriptor.ACL.1.Type:    == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.1.Trustee: Cert Publishers
nTSecurityDescriptor.ACL.1.Right:   WRITE_PROP|READ_PROP
nTSecurityDescriptor.ACL.1.ObjectType:  X509-Cert

nTSecurityDescriptor.ACL.2.Type:    == ALLOWED_OBJECT ==
nTSecurityDescriptor.ACL.2.Trustee: WINDOWS_AUTHORIZATION_ACCESS_GROUP
nTSecurityDescriptor.ACL.2.Right:   READ_PROP
nTSecurityDescriptor.ACL.2.ObjectType:  Token-Groups-Global-And-Universal
Brother-x86 commented 7 months ago

Hey, i do the code but i got problem with the pullRequest.

CravateRouge commented 7 months ago

What's happening?