ace

package
v1.14.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SYSTEM_MANDATORY_LABEL_NO_WRITE_UP   ldap.AceMask = 0x00000001
	SYSTEM_MANDATORY_LABEL_NO_READ_UP    ldap.AceMask = 0x00000002
	SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP ldap.AceMask = 0x00000004
)

SYSTEM_MANDATORY_LABEL_ACE

View Source
const (
	SID_UNTRUSTED_INTEGRITY_LEVEL         uint32 = 0x00000000
	SID_LOW_INTEGRITY_LEVEL               uint32 = 0x00001000
	SID_MEDIUM_INTEGRITY_LEVEL            uint32 = 0x00002000
	SID_HIGH_INTEGRITY_LEVEL              uint32 = 0x00003000
	SID_SYSTEM_INTEGRITY_LEVEL            uint32 = 0x00004000
	SID_PROTECTED_PROCESS_INTEGRITY_LEVEL uint32 = 0x00005000
)

SYSTEM_MANDATORY_LABEL_ACE

View Source
const (
	ADS_RIGHT_DS_CONTROL_ACCESS ldap.AceMask = 0x00000100
	ADS_RIGHT_DS_CREATE_CHILD   ldap.AceMask = 0x00000001
	ADS_RIGHT_DS_DELETE_CHILD   ldap.AceMask = 0x00000002
	ADS_RIGHT_DS_READ_PROP      ldap.AceMask = 0x00000010
	ADS_RIGHT_DS_WRITE_PROP     ldap.AceMask = 0x00000020
	ADS_RIGHT_DS_SELF           ldap.AceMask = 0x00000008
)

specifies mask

ACCESS_ALLOWED_OBJECT_ACE, ACCESS_DENIED_OBJECT_ACE ACCESS_ALLOWED_CALLBACK_OBJECT_ACE, ACCESS_DENIED_CALLBACK_OBJECT_ACE, SYSTEM_AUDIT_OBJECT_ACE, SYSTEM_AUDIT_CALLBACK_OBJECT_ACE

Variables

This section is empty.

Functions

func NewBaseAce

func NewBaseAce(aceBytes []byte) (ace ldap.Ace, err error)

func NewBaseAttributeAce

func NewBaseAttributeAce(aceBytes []byte) (ace ldap.Ace, err error)

func NewBaseCallbackAce

func NewBaseCallbackAce(aceBytes []byte) (ace ldap.Ace, err error)

func NewBaseCallbackObjectAce

func NewBaseCallbackObjectAce(aceBytes []byte) (ace ldap.Ace, err error)

func NewBaseObjectAce

func NewBaseObjectAce(aceBytes []byte) (ace ldap.Ace, err error)

Types

type ApplicationData

type ApplicationData struct {
}

ApplicationData 条件ACE

(Title=="VP")
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|                           | Local Attribute "Title"                                             | Literal value "VP"                                            | Operator "=="  |          |
| Conditional-ace signature | Attribute token                                                     | String literal token                                          | "==" token     | Padding  |
| Signature bytes(4 bytes)  | Attribute byte-code | Length(DWORD) | Unicode characters            | Unicode string byte-code | Length(DWORD) | Unicode characters | "==" byte-code |          |
| 61 72 74 78               | f8                  | a 0 0 0       | 54 00 69 00 74 00 6c 00 65 00 | 10                       | 4 0 0 0       | 56 00 50 00        | 80             | 00 00 00 |
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type BaseAce

type BaseAce struct {
	*ldap.AceHeader
	Mask uint32 `json:"mask"`
	// Mask   [4]byte
	Sid *ldap.Sid `json:"sid"`
}

BaseAce

ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, SYSTEM_AUDIT_ACE, SYSTEM_MANDATORY_LABEL_ACE, SYSTEM_SCOPED_POLICY_ID_ACE

  -----------------------------------------------
| 0x00-0x07 | 0x08-0x0F | 0x10-0x17 | 0x18-0x1F |
|                    Header                     |
|                     Mask                      |
|                 Sid(variable)                 |
 -----------------------------------------------

func (*BaseAce) NtString

func (a *BaseAce) NtString() string

NtString (ace_type;ace_flags;rights;object_guid;inherit_object_guid;account_sid)

func (*BaseAce) Size

func (a *BaseAce) Size() int

func (*BaseAce) String

func (a *BaseAce) String() string

type BaseAttributeAce

type BaseAttributeAce struct {
	Header        ldap.AceHeader // [4]byte
	Mask          [4]byte
	Sid           []byte
	AttributeData []byte
}

BaseAttributeAce

SYSTEM_RESOURCE_ATTRIBUTE_ACE

  -----------------------------------------------
| 0x00-0x07 | 0x08-0x0F | 0x10-0x17 | 0x18-0x1F |
|                    Header                     |
|                     Mask                      |
|                 Sid(variable)                 |
|           Attribute Data(variable)            |
 -----------------------------------------------

type BaseCallbackAce

type BaseCallbackAce struct {
	Header          ldap.AceHeader // [4]byte
	Mask            [4]byte
	Sid             []byte
	ApplicationData []byte
}

BaseCallbackAce

ACCESS_ALLOWED_CALLBACK_ACE, ACCESS_DENIED_CALLBACK_ACE, SYSTEM_AUDIT_CALLBACK_ACE

  -----------------------------------------------
| 0x00-0x07 | 0x08-0x0F | 0x10-0x17 | 0x18-0x1F |
|                    Header                     |
|                     Mask                      |
|                 Sid(variable)                 |
|           ApplicationData(variable)           |
 -----------------------------------------------

type BaseCallbackObjectAce

type BaseCallbackObjectAce struct {
	Header              ldap.AceHeader // [4]byte
	Mask                [4]byte
	Flags               [4]byte
	ObjectType          [16]byte
	InheritedObjectType [16]byte
	Sid                 []byte
	ApplicationData     []byte
}

BaseCallbackObjectAce

ACCESS_ALLOWED_CALLBACK_OBJECT_ACE, ACCESS_DENIED_CALLBACK_OBJECT_ACE, SYSTEM_AUDIT_OBJECT_ACE, SYSTEM_AUDIT_CALLBACK_OBJECT_ACE

  -----------------------------------------------
| 0x00-0x07 | 0x08-0x0F | 0x10-0x17 | 0x18-0x1F |
|                    Header                     |
|                     Mask                      |
|                    Flags                      |
|              ObjectType(16 bytes)             |
|         InheritedObjectType(16 bytes)         |
|                 Sid(variable)                 |
|           ApplicationData(variable)           |
 -----------------------------------------------

type BaseObjectAce

type BaseObjectAce struct {
	*ldap.AceHeader        // [4]byte
	Mask            uint32 `json:"mask"`
	Flags           uint32 `json:"flags"` // AccessAllowedObjectFlags
	// Mask                [4]byte
	// Flags               [4]byte
	ObjectType          Guid      `json:"objectType"`
	InheritedObjectType Guid      `json:"inheritedObjectType"`
	Sid                 *ldap.Sid `json:"sid"`
}

BaseObjectAce

ACCESS_ALLOWED_OBJECT_ACE, ACCESS_DENIED_OBJECT_ACE

 -----------------------------------------------
| 0x00-0x07 | 0x08-0x0F | 0x10-0x17 | 0x18-0x1F |
|                    Header                     |
|                     Mask                      |
|                    Flags                      |
|         ObjectType(16 bytes, optional)        |
|    InheritedObjectType(16 bytes, optional)    |
|                 Sid(variable)                 |
 -----------------------------------------------

func (*BaseObjectAce) NtString

func (a *BaseObjectAce) NtString() string

NtString (ace_type;ace_flags;rights;object_guid;inherit_object_guid;account_sid)

func (*BaseObjectAce) Size

func (a *BaseObjectAce) Size() int

func (*BaseObjectAce) String

func (a *BaseObjectAce) String() string

type Guid

type Guid [16]byte

func (Guid) MarshalJSON

func (g Guid) MarshalJSON() ([]byte, error)

type LiteralToken

type LiteralToken byte
const (
	INVALID_TOKEN  LiteralToken = 0x00
	SIGNED_INT8    LiteralToken = 0x01
	SIGNED_INT16   LiteralToken = 0x02
	SIGNED_INT32   LiteralToken = 0x03
	SIGNED_INT64   LiteralToken = 0x04
	UNICODE_STRING LiteralToken = 0x10
	OCTET_STRING   LiteralToken = 0x18
	COMPOSITE      LiteralToken = 0x50
	SID            LiteralToken = 0x51
)
const (
	OCTAL       LiteralToken = 0x01
	DECIMAL     LiteralToken = 0x02
	HEXADECIMAL LiteralToken = 0x03
)
const (
	PLUS    LiteralToken = 0x01
	MINUS   LiteralToken = 0x02
	NO_SIGN LiteralToken = 0x03
)
const (
	// Unary Relational Operators
	MEMBER_OF                LiteralToken = 0x89
	DEVICE_MEMBER_OF         LiteralToken = 0x8a
	MEMBER_OF_ANY            LiteralToken = 0x8b
	DEVICE_MEMBER_OF_ANY     LiteralToken = 0x8c
	NOT_MEMBER_OF            LiteralToken = 0x90
	NOT_DEVICE_MEMBER_OF     LiteralToken = 0x91
	NOT_MEMBER_OF_ANY        LiteralToken = 0x92
	NOT_DEIVCE_MEMBER_OF_ANY LiteralToken = 0x93

	// Binary Relational Operators
	EQUAL        LiteralToken = 0x80
	NO_EQUAL     LiteralToken = 0x81
	LT           LiteralToken = 0x82
	LTE          LiteralToken = 0x83
	GT           LiteralToken = 0x84
	GTE          LiteralToken = 0x85
	CONTAINS     LiteralToken = 0x86
	ANY_OF       LiteralToken = 0x88
	NOT_CONTAINS LiteralToken = 0x8e
	NOT_ANY_OF   LiteralToken = 0x8f

	// Logical Operator Tokens
	EXISTS      LiteralToken = 0x87
	NOT_EXISTS  LiteralToken = 0x8d
	LOGICAL_NOT LiteralToken = 0xa2
	// Binary Logical Operators
	LOGICAL_AND LiteralToken = 0xa0 // &&
	LOGICAL_OR  LiteralToken = 0xa1 // ||
)
const (
	LOCAL_ATTRIBUTE    LiteralToken = 0xf8 // ||
	USER_ATTRIBUTE     LiteralToken = 0xf9 // ||
	RESOURCE_ATTRIBUTE LiteralToken = 0xfa // ||
	DEVICE_ATTRIBUTE   LiteralToken = 0xfb // ||
)

Attribute Tokens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL