Documentation ¶
Index ¶
Constants ¶
View Source
const ( NtLmNegotiate = 0x00000001 NtLmChallenge = 0x00000002 NtLmAuthenticate = 0x00000003 )
View Source
const ( NTLMSSP_NEGOTIATE_UNICODE = 1 << iota NTLM_NEGOTIATE_OEM NTLMSSP_REQUEST_TARGET NTLMSSP_NEGOTIATE_SIGN NTLMSSP_NEGOTIATE_SEAL NTLMSSP_NEGOTIATE_DATAGRAM NTLMSSP_NEGOTIATE_LM_KEY NTLMSSP_NEGOTIATE_NTLM NTLMSSP_ANONYMOUS NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED NTLMSSP_NEGOTIATE_ALWAYS_SIGN NTLMSSP_TARGET_TYPE_DOMAIN NTLMSSP_TARGET_TYPE_SERVER NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY NTLMSSP_NEGOTIATE_IDENTIFY NTLMSSP_REQUEST_NON_NT_SESSION_KEY NTLMSSP_NEGOTIATE_TARGET_INFO NTLMSSP_NEGOTIATE_VERSION NTLMSSP_NEGOTIATE_128 NTLMSSP_NEGOTIATE_KEY_EXCH NTLMSSP_NEGOTIATE_56 )
View Source
const ( WINDOWS_MAJOR_VERSION_5 = 0x05 WINDOWS_MAJOR_VERSION_6 = 0x06 WINDOWS_MAJOR_VERSION_10 = 0x0a )
View Source
const ( WINDOWS_MINOR_VERSION_0 = 0x00 WINDOWS_MINOR_VERSION_1 = 0x01 WINDOWS_MINOR_VERSION_2 = 0x02 WINDOWS_MINOR_VERSION_3 = 0x03 )
View Source
const DefaultFlags uint32 = NTLMSSP_NEGOTIATE_56 | NTLMSSP_NEGOTIATE_KEY_EXCH | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_TARGET_INFO | NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY | NTLMSSP_NEGOTIATE_ALWAYS_SIGN | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_SIGN | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_VERSION
View Source
const (
NTLMSSP_REVISION_W2K3 = 0x0f
)
Variables ¶
View Source
var DefaultSignature = [8]byte{'N', 'T', 'L', 'M', 'S', 'S', 'P', 0}
View Source
var DefaultVersion = [8]byte{ 0: WINDOWS_MAJOR_VERSION_10, 1: WINDOWS_MINOR_VERSION_0, 7: NTLMSSP_REVISION_W2K3, }
Functions ¶
This section is empty.
Types ¶
type AuthenicateMessage ¶
type AuthenicateMessage struct { MessageHeader LmChallengeResponseFields utils.VarField NtChallengeResponseFields utils.VarField DomainNameFields utils.VarField UsernameFields utils.VarField WorkstationFields utils.VarField EncryptedRandomSessionKeyField utils.VarField NegotiateFlags uint32 MIC [16]byte Payload []byte }
type AvPairs ¶
func NewAvPairs ¶
type ChallengeMessage ¶
type ChallengeMessage struct { MessageHeader TargetName utils.VarField NegotiateFlags uint32 ServerChallenge [8]byte TargetInformation utils.VarField Version [8]byte Payload []byte // contains filtered or unexported fields }
func ParseChallengeMessage ¶
func ParseChallengeMessage(cmsg []byte) (ChallengeMessage, error)
type ChannelBindings ¶
channelBindings represents gss_channel_bindings_struct
type Client ¶
type Client struct { User string Password string Hash []byte Domain string Workstation string TargetSPN string ChannelBinding *ChannelBindings // reserved for future implementation // Session Tracking NegotiateFlags uint32 ExportedSessionKey []byte ClientSigningKey []byte ServerSigningKey []byte ClientHandle *rc4.Cipher ServerHandle *rc4.Cipher // Don't use unless you know what you're doing NegMsg NegotiateMessage TargetInfo TargetInformation NegotiateMessageBytes []byte }
type MessageHeader ¶
type NTLMServer ¶
type NTLMv2ClientChallenge ¶
type NTLMv2ClientChallenge struct { RespType byte HiRespType byte Timestamp uint64 ChallengeFromClient [8]byte AvPairs []byte // contains filtered or unexported fields }
NTLMv2ClientChallenge 0-1: RespType 1-2: HiRespType 2-4: _ 4-8: _ 8-16: TimeStamp
16-24: ChallengeFromClient 24-28: _
28-: AvPairs
type NTLMv2Response ¶
type NTLMv2Response struct { Response [16]byte NTLMv2ClientChallenge }
NTLMv2Response
0-16: Response
16-: NTLMv2ClientChallenge
type NegotiateMessage ¶
type SingleHostData ¶
type TargetInformation ¶
type TargetInformation struct { NbComputerName string NbDomainName string DNSComputerName string DNSDomainName string DNSTreeName string Flags uint32 Timestamp uint64 SingleHost SingleHostData TargetName string ChBindings ChannelBindings // contains filtered or unexported fields }
func ParseAvPairs ¶
func ParseAvPairs(b []byte) (*TargetInformation, error)
func (TargetInformation) Raw ¶
func (t TargetInformation) Raw(spn []byte) []byte
func (TargetInformation) Size ¶
func (t TargetInformation) Size() int
Click to show internal directories.
Click to hide internal directories.