There was an error while loading. Please reload this page.
Parse, manipulate, and serialize Windows security descriptors, access control lists, and security identifiers.
ParseSID
(s string) (*SID, error)
S-1-5-21-...
ParseSIDBytes
(data []byte) (*SID, int, error)
String
() string
Marshal
() []byte
Size
() int
Equal
(other *SID) bool
func ParseSecurityDescriptor(data []byte) (*SecurityDescriptor, error) func (sd *SecurityDescriptor) Marshal() []byte
sdBytes := []byte{...} // from LDAP nTSecurityDescriptor attribute sd, err := security.ParseSecurityDescriptor(sdBytes) if err != nil { fmt.Printf("[-] %v\n", err) return } fmt.Printf("Owner: %s\n", sd.Owner.String()) if sd.DACL != nil { for _, ace := range sd.DACL.ACEs { fmt.Printf(" ACE: Type=%d, SID=%s, Mask=0x%08x\n", ace.Type, ace.SID.String(), ace.AccessMask) } }