ntlmssp

package
v0.0.0-...-d5d6b14 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT, BSD-3-Clause, BSD-2-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultClientCompatibilityLevel lmCompatibilityLevel = 3
)
View Source
const (
	// NTLMSSPRevisionW2K3 is the current revision of NTLM.
	NTLMSSPRevisionW2K3 uint8 = 0x0f
)
View Source
const (
	// TLSServerEndPoint is defined in RFC 5929 and stores the hash of the server certificate.
	TLSServerEndPoint string = "tls-server-end-point"
)

Variables

This section is empty.

Functions

func DefaultDomain

func DefaultDomain() (string, error)

DefaultDomain returns the Windows domain that the host is joined to. This will never be successful on non-Windows as there's no standard API.

func DefaultWorkstation

func DefaultWorkstation() (string, error)

DefaultWorkstation returns the current workstation name.

func SetCompatibilityLevel

func SetCompatibilityLevel(level lmCompatibilityLevel) func(*Client) error

func SetDomain

func SetDomain(domain string) func(*Client) error

func SetUserInfo

func SetUserInfo(username, password string) func(*Client) error

func SetVersion

func SetVersion(version *Version) func(*Client) error

func SetWorkstation

func SetWorkstation(workstation string) func(*Client) error

Types

type AvID

type AvID uint16
const (
	MsvAvEOL AvID = iota
	MsvAvNbComputerName
	MsvAvNbDomainName
	MsvAvDNSComputerName
	MsvAvDNSDomainName
	MsvAvDNSTreeName
	MsvAvFlags
	MsvAvTimestamp
	MsvAvSingleHost
	MsvAvTargetName
	MsvChannelBindings
)

type ChannelBindings

type ChannelBindings struct {
	InitiatorAddrtype uint32
	InitiatorAddress  []uint8
	AcceptorAddrtype  uint32
	AcceptorAddress   []uint8
	ApplicationData   []uint8
}

ChannelBindings models the GSS-API channel bindings defined in RFC 2744.

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...func(*Client) error) (*Client, error)

func (*Client) Authenticate

func (c *Client) Authenticate(input []byte, bindings *ChannelBindings) ([]byte, error)

func (*Client) Complete

func (c *Client) Complete() bool

func (*Client) SecuritySession

func (c *Client) SecuritySession() *SecuritySession

func (*Client) SessionDetails

func (c *Client) SessionDetails() *sessionDetails

SessionDetails LeakIX patch, makes useful session information available for recon

func (*Client) SetOption

func (c *Client) SetOption(options ...func(*Client) error) error

type SecuritySession

type SecuritySession struct {
	// contains filtered or unexported fields
}

func (*SecuritySession) Mac

func (s *SecuritySession) Mac(b []byte) ([]byte, error)

func (*SecuritySession) Unwrap

func (s *SecuritySession) Unwrap(b, signature []byte) ([]byte, error)

func (*SecuritySession) Wrap

func (s *SecuritySession) Wrap(b []byte) ([]byte, []byte, error)

type Version

type Version struct {
	ProductMajorVersion uint8
	ProductMinorVersion uint8
	ProductBuild        uint16

	NTLMRevisionCurrent uint8
	// contains filtered or unexported fields
}

Version models the NTLM version passed in the various messages.

func DefaultVersion

func DefaultVersion() *Version

DefaultVersion returns a pointer to a NTLM Version struct for the OS which will be populated on Windows or nil otherwise.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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