MCPcopy Create free account
hub / github.com/fortra/impacket / create_empty_sd

Method create_empty_sd

impacket/examples/ldap_shell.py:75–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

73 return ret_val
74
75 def create_empty_sd(self):
76 sd = ldaptypes.SR_SECURITY_DESCRIPTOR()
77 sd['Revision'] = b'\x01'
78 sd['Sbz1'] = b'\x00'
79 sd['Control'] = 32772
80 sd['OwnerSid'] = ldaptypes.LDAP_SID()
81 # BUILTIN\Administrators
82 sd['OwnerSid'].fromCanonical('S-1-5-32-544')
83 sd['GroupSid'] = b''
84 sd['Sacl'] = b''
85 acl = ldaptypes.ACL()
86 acl['AclRevision'] = 4
87 acl['Sbz1'] = 0
88 acl['Sbz2'] = 0
89 acl.aces = []
90 sd['Dacl'] = acl
91 return sd
92
93 def create_allow_ace(self, sid):
94 nace = ldaptypes.ACE()

Callers 3

do_clear_rbcdMethod · 0.95
do_grant_controlMethod · 0.95
do_set_rbcdMethod · 0.95

Calls 1

fromCanonicalMethod · 0.45

Tested by

no test coverage detected