Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

negotiate

import "github.com/TheManticoreProject/Manticore/crypto/spnego/ntlm/message/negotiate"

Index

type NegotiateMessage

NegotiateMessage is the first message in NTLM authentication Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/b34032e5-3aae-4bc6-84c3-c6d80eadf7f2

type NegotiateMessage struct {
    header.Header

    // NegotiateFlags (4 bytes): A NEGOTIATE structure that contains a set of flags, as defined in section 2.2.2.5. The client sets flags to indicate options it supports.
    NegotiateFlags flags.NegotiateFlags

    // DomainNameFields (8 bytes): A field containing DomainName information.
    DomainNameFields datafields.DataFields

    // WorkstationFields (8 bytes): A field containing WorkstationName information.
    WorkstationFields datafields.DataFields

    // Version (8 bytes): A VERSION structure (as defined in section 2.2.2.10) that is populated only when the NTLMSSP_NEGOTIATE_VERSION flag is set in the NegotiateFlags field; otherwise, it MUST be set to all zero. This structure SHOULD<6> be used for debugging purposes only. In normal (nondebugging) protocol messages, it is ignored and does not affect the NTLM message processing.
    Version *version.Version

    // DomainName (variable): A field containing DomainName data.
    DomainName []byte

    // Workstation (variable): A field containing Workstation data.
    Workstation []byte
}

func CreateNegotiateMessage

func CreateNegotiateMessage(domain, workstation string, negotiateFlags flags.NegotiateFlags, version *version.Version) (*NegotiateMessage, error)

CreateNegotiateMessage initializes a NegotiateMessage with the given parameters

func (*NegotiateMessage) GetDomainName

func (msg *NegotiateMessage) GetDomainName() string

GetDomainName returns the domain name as a string

func (*NegotiateMessage) GetMessageType

func (msg *NegotiateMessage) GetMessageType() uint32

GetMessageType returns the message type of the NegotiateMessage

func (*NegotiateMessage) GetWorkstationName

func (msg *NegotiateMessage) GetWorkstationName() string

GetWorkstationName returns the workstation name as a string

func (*NegotiateMessage) Marshal

func (msg *NegotiateMessage) Marshal() ([]byte, error)

Marshal serializes the NegotiateMessage into a byte slice

func (*NegotiateMessage) SetDomainName

func (msg *NegotiateMessage) SetDomainName(domain string)

SetDomainName sets the domain name

func (*NegotiateMessage) SetWorkstationName

func (msg *NegotiateMessage) SetWorkstationName(workstation string)

SetWorkstationName sets the workstation name

func (*NegotiateMessage) Unmarshal

func (msg *NegotiateMessage) Unmarshal(data []byte) (int, error)

Unmarshal deserializes a byte slice into a NegotiateMessage

Subpackages