Documentation ¶
Overview ¶
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited. Package NTLM implements the interfaces used for interacting with NTLMv1 and NTLMv2. To create NTLM v1 or v2 sessions you would use CreateClientSession and create ClientServerSession.
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited. Receve an Authenticate message and authenticate the user
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited. Receve an Authenticate message and authenticate the user
Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
Index ¶
- func MacsEqual(slice1, slice2 []byte) bool
- func NtlmV2Mac(message []byte, sequenceNumber int, handle *rc4P.Cipher, ...) []byte
- func NtlmVCommonMac(message []byte, sequenceNumber int, sealingKey, signingKey []byte, ...) []byte
- type ClientSession
- type Mode
- type NtlmsspMessageSignature
- type ServerSession
- type SessionData
- type V1ClientSession
- func (n *V1ClientSession) GenerateAuthenticateMessage() (am *messages.Authenticate, err error)
- func (n *V1ClientSession) GenerateNegotiateMessage() (nm *messages.Negotiate, err error)
- func (n *V1ClientSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
- func (n *V1ClientSession) ProcessChallengeMessage(cm *messages.Challenge) (err error)
- func (n *V1ClientSession) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error)
- type V1ServerSession
- func (n *V1ServerSession) GenerateChallengeMessage() (cm *messages.Challenge, err error)
- func (n *V1ServerSession) GetSessionData() *SessionData
- func (n *V1ServerSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
- func (n *V1ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate) (err error)
- func (n *V1ServerSession) ProcessNegotiateMessage(nm *messages.Negotiate) (err error)
- func (n *V1ServerSession) SetServerChallenge(challenge []byte)
- func (n *V1ServerSession) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error)
- type V1Session
- func (n *V1Session) GetUserInfo() (string, string, string)
- func (n *V1Session) Seal(message []byte) ([]byte, error)
- func (n *V1Session) SetMode(mode Mode)
- func (n *V1Session) SetUserInfo(username string, password string, domain string)
- func (n *V1Session) Sign(message []byte) ([]byte, error)
- func (n *V1Session) Version() int
- type V2ClientSession
- func (n *V2ClientSession) GenerateAuthenticateMessage() (am *messages.Authenticate, err error)
- func (n *V2ClientSession) GenerateNegotiateMessage() (nm *messages.Negotiate, err error)
- func (n *V2ClientSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
- func (n *V2ClientSession) ProcessChallengeMessage(cm *messages.Challenge) (err error)
- func (n *V2ClientSession) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error)
- type V2ServerSession
- func (n *V2ServerSession) GenerateChallengeMessage() (cm *messages.Challenge, err error)
- func (n *V2ServerSession) GetSessionData() *SessionData
- func (n *V2ServerSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
- func (n *V2ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate) (err error)
- func (n *V2ServerSession) ProcessNegotiateMessage(nm *messages.Negotiate) (err error)
- func (n *V2ServerSession) SetServerChallenge(challenge []byte)
- func (n *V2ServerSession) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error)
- type V2Session
- func (n *V2Session) GetUserInfo() (string, string, string)
- func (n *V2Session) Seal(message []byte) ([]byte, error)
- func (n *V2Session) SetMode(mode Mode)
- func (n *V2Session) SetUserInfo(username string, password string, domain string)
- func (n *V2Session) Sign(message []byte) ([]byte, error)
- func (n *V2Session) Version() int
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientSession ¶
type ClientSession interface { SetUserInfo(username string, password string, domain string) SetMode(mode Mode) GenerateNegotiateMessage() (*messages.Negotiate, error) ProcessChallengeMessage(*messages.Challenge) error GenerateAuthenticateMessage() (*messages.Authenticate, error) Seal(message []byte) ([]byte, error) Sign(message []byte) ([]byte, error) Mac(message []byte, sequenceNumber int) ([]byte, error) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error) }
func CreateClientSession ¶
func CreateClientSession(version Version, mode Mode) (n ClientSession, err error)
Creates an NTLM v1 or v2 client mode - This must be ConnectionlessMode or ConnectionOrientedMode depending on what type of NTLM is used version - This must be Version1 or Version2 depending on the version of NTLM used
type NtlmsspMessageSignature ¶
type NtlmsspMessageSignature struct { ByteData []byte // A 32-bit unsigned integer that contains the signature version. This field MUST be 0x00000001. Version []byte // A 4-byte array that contains the random pad for the message. RandomPad []byte // A 4-byte array that contains the checksum for the message. CheckSum []byte // A 32-bit unsigned integer that contains the NTLM sequence number for this application message. SeqNum []byte }
func (*NtlmsspMessageSignature) Bytes ¶
func (n *NtlmsspMessageSignature) Bytes() []byte
func (*NtlmsspMessageSignature) String ¶
func (n *NtlmsspMessageSignature) String() string
type ServerSession ¶
type ServerSession interface { SetUserInfo(username string, password string, domain string) GetUserInfo() (string, string, string) SetMode(mode Mode) SetServerChallenge(challege []byte) ProcessNegotiateMessage(*messages.Negotiate) error GenerateChallengeMessage() (*messages.Challenge, error) ProcessAuthenticateMessage(*messages.Authenticate) error GetSessionData() *SessionData Version() int Seal(message []byte) ([]byte, error) Sign(message []byte) ([]byte, error) Mac(message []byte, sequenceNumber int) ([]byte, error) VerifyMac(message, expectedMac []byte, sequenceNumber int) (bool, error) }
func CreateServerSession ¶
func CreateServerSession(version Version, mode Mode) (n ServerSession, err error)
Creates an NTLM v1 or v2 server mode - This must be ConnectionlessMode or ConnectionOrientedMode depending on what type of NTLM is used version - This must be Version1 or Version2 depending on the version of NTLM used
type SessionData ¶
type SessionData struct { NegotiateFlags uint32 ClientSigningKey []byte ServerSigningKey []byte ClientSealingKey []byte ServerSealingKey []byte // contains filtered or unexported fields }
This struct collects NTLM data structures and keys that are used across all types of NTLM requests
type V1ClientSession ¶
type V1ClientSession struct {
V1Session
}
func (*V1ClientSession) GenerateAuthenticateMessage ¶
func (n *V1ClientSession) GenerateAuthenticateMessage() (am *messages.Authenticate, err error)
func (*V1ClientSession) GenerateNegotiateMessage ¶
func (n *V1ClientSession) GenerateNegotiateMessage() (nm *messages.Negotiate, err error)
func (*V1ClientSession) Mac ¶
func (n *V1ClientSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
func (*V1ClientSession) ProcessChallengeMessage ¶
func (n *V1ClientSession) ProcessChallengeMessage(cm *messages.Challenge) (err error)
type V1ServerSession ¶
type V1ServerSession struct {
V1Session
}
func (*V1ServerSession) GenerateChallengeMessage ¶
func (n *V1ServerSession) GenerateChallengeMessage() (cm *messages.Challenge, err error)
func (*V1ServerSession) GetSessionData ¶
func (n *V1ServerSession) GetSessionData() *SessionData
func (*V1ServerSession) Mac ¶
func (n *V1ServerSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
func (*V1ServerSession) ProcessAuthenticateMessage ¶
func (n *V1ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate) (err error)
func (*V1ServerSession) ProcessNegotiateMessage ¶
func (n *V1ServerSession) ProcessNegotiateMessage(nm *messages.Negotiate) (err error)
func (*V1ServerSession) SetServerChallenge ¶
func (n *V1ServerSession) SetServerChallenge(challenge []byte)
type V2ClientSession ¶
type V2ClientSession struct {
V2Session
}
func (*V2ClientSession) GenerateAuthenticateMessage ¶
func (n *V2ClientSession) GenerateAuthenticateMessage() (am *messages.Authenticate, err error)
func (*V2ClientSession) GenerateNegotiateMessage ¶
func (n *V2ClientSession) GenerateNegotiateMessage() (nm *messages.Negotiate, err error)
func (*V2ClientSession) Mac ¶
func (n *V2ClientSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
func (*V2ClientSession) ProcessChallengeMessage ¶
func (n *V2ClientSession) ProcessChallengeMessage(cm *messages.Challenge) (err error)
type V2ServerSession ¶
type V2ServerSession struct {
V2Session
}
func (*V2ServerSession) GenerateChallengeMessage ¶
func (n *V2ServerSession) GenerateChallengeMessage() (cm *messages.Challenge, err error)
func (*V2ServerSession) GetSessionData ¶
func (n *V2ServerSession) GetSessionData() *SessionData
func (*V2ServerSession) Mac ¶
func (n *V2ServerSession) Mac(message []byte, sequenceNumber int) ([]byte, error)
func (*V2ServerSession) ProcessAuthenticateMessage ¶
func (n *V2ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate) (err error)
func (*V2ServerSession) ProcessNegotiateMessage ¶
func (n *V2ServerSession) ProcessNegotiateMessage(nm *messages.Negotiate) (err error)
func (*V2ServerSession) SetServerChallenge ¶
func (n *V2ServerSession) SetServerChallenge(challenge []byte)