avpair
import "github.com/TheManticoreProject/Manticore/crypto/spnego/ntlm/avpair"
Index
type AvId
type AvId uint16
AV_PAIR types used in NTLM authentication Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/83f5e789-660d-4781-8491-5f8c6641f75e
const (
// MsvAvEOL indicates that this is the last AV_PAIR in the list.
// AvLen MUST be 0. This type of information MUST be present in the AV pair list.
MsvAvEOL AvId = 0x0000
// MsvAvNbComputerName is the server's NetBIOS computer name.
// The name MUST be in Unicode, and is not null-terminated.
// This type of information MUST be present in the AV_pair list.
MsvAvNbComputerName AvId = 0x0001
// MsvAvNbDomainName is the server's NetBIOS domain name.
// The name MUST be in Unicode, and is not null-terminated.
// This type of information MUST be present in the AV_pair list.
MsvAvNbDomainName AvId = 0x0002
// MsvAvDnsComputerName is the fully qualified domain name (FQDN) of the computer.
// The name MUST be in Unicode, and is not null-terminated.
MsvAvDnsComputerName AvId = 0x0003
// MsvAvDnsDomainName is the FQDN of the domain.
// The name MUST be in Unicode, and is not null-terminated.
MsvAvDnsDomainName AvId = 0x0004
// MsvAvDnsTreeName is the FQDN of the forest.
// The name MUST be in Unicode, and is not null-terminated.
MsvAvDnsTreeName AvId = 0x0005
// MsvAvFlags is a 32-bit value indicating server or client configuration.
// 0x00000001: Indicates to the client that the account authentication is constrained.
// 0x00000002: Indicates that the client is providing message integrity in the MIC field in the AUTHENTICATE_MESSAGE.
// 0x00000004: Indicates that the client is providing a target SPN generated from an untrusted source.
MsvAvFlags AvId = 0x0006
// MsvAvTimestamp is a FILETIME structure in little-endian byte order that contains the server local time.
// This structure is always sent in the CHALLENGE_MESSAGE.
MsvAvTimestamp AvId = 0x0007
// MsvAvSingleHost is a Single_Host_Data structure.
// The Value field contains a platform-specific blob, as well as a MachineID created at computer startup to identify the calling machine.
MsvAvSingleHost AvId = 0x0008
// MsvAvTargetName is the SPN of the target server.
// The name MUST be in Unicode and is not null-terminated.
MsvAvTargetName AvId = 0x0009
// MsvAvChannelBindings is a channel bindings hash.
// The Value field contains an MD5 hash of a gss_channel_bindings_struct.
// An all-zero value of the hash is used to indicate absence of channel bindings.
MsvAvChannelBindings AvId = 0x000A
)
func (AvId) Compare
func (id AvId) Compare(other AvId) bool
Compare returns true if the two AvIds are equal.
func (AvId) String
func (id AvId) String() string
String returns a human-readable name for a given AV ID.
type AvPair
AV_PAIR Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/83f5e789-660d-4781-8491-5f8c6641f75e
type AvPair struct {
// AvId (2 bytes): A 16-bit unsigned integer that defines the
// information type in the Value field. The contents of this field
// MUST be a value from the following table. The corresponding Value
// field in this AV_PAIR MUST contain the information specified in the
// description of that AvId.
AvID AvId
// AvLen (2 bytes): A 16-bit unsigned integer that defines the length,
// in bytes, of the Value field.
AvLen uint16
// Value (variable): A variable-length byte-array that contains the value
// defined for this AV pair entry. The contents of this field depend on
// the type expressed in the AvId field. The available types and resulting
// format and contents of this field are specified in the table within
// the AvId field description in this topic.
AvData []byte
}
func (*AvPair) Marshal
func (a *AvPair) Marshal() ([]byte, error)
Marshal serializes the AV_PAIR to a byte slice.
func (*AvPair) String
func (a *AvPair) String() string
String returns a string representation of the AV_PAIR.
func (*AvPair) Unmarshal
func (a *AvPair) Unmarshal(marshaledData []byte) (int, error)
Unmarshal parses the AV_PAIR from a byte slice.