Documentation ¶
Index ¶
- Constants
- func ComputeResponseNTLMv2(nthash, lmhash, clientChallenge, serverChallenge, timestamp, serverName []byte) []byte
- func Lmowfv2(pass, user, domain string) []byte
- func Ntowfv1(pass string) []byte
- func Ntowfv2(pass, user, domain string) []byte
- type Authenticate
- type AvPair
- type AvPairSlice
- type Challenge
- type Header
- type Negotiate
Constants ¶
View Source
const ( TypeNtLmNegotiate uint32 TypeNtLmChallenge TypeNtLmAuthenticate )
View Source
const ( FlgNegUnicode uint32 = 1 << iota FlgNegOEM FlgNegRequestTarget FlgNegReserved10 FlgNegSign FlgNegSeal FlgNegDatagram FlgNegLmKey FlgNegReserved9 FlgNegNtLm FlgNegReserved8 FlgNegAnonymous FlgNegOEMDomainSupplied FlgNegOEMWorkstationSupplied FlgNegReserved7 FlgNegAlwaysSign FlgNegTargetTypeDomain FlgNegTargetTypeServer FlgNegReserved6 FlgNegExtendedSessionSecurity FlgNegIdentify FlgNegReserved5 FlgNegRequestNonNtSessionKey FlgNegTargetInfo FlgNegReserved4 FlgNegVersion FlgNegReserved3 FlgNegReserved2 FlgNegReserved1 FlgNeg128 FlgNegKeyExch FlgNeg56 )
View Source
const ( MsvAvEOL uint16 = iota MsvAvNbComputerName MsvAvNbDomainName MsvAvDnsComputerName MsvAvDnsDomainName MsvAvDnsTreeName MsvAvFlags MsvAvTimestamp MsvAvSingleHost MsvAvTargetName MsvChannelBindings )
View Source
const Signature = "NTLMSSP\x00"
Variables ¶
This section is empty.
Functions ¶
func ComputeResponseNTLMv2 ¶
Types ¶
type Authenticate ¶
type Authenticate struct { Header LmChallengeResponseLen uint16 `smb:"len:LmChallengeResponse"` LmChallengeResponseMaxLen uint16 `smb:"len:LmChallengeResponse"` LmChallengeResponseBufferOffset uint32 `smb:"offset:LmChallengeResponse"` NtChallengeResponseLen uint16 `smb:"len:NtChallengeResponse"` NtChallengeResponseMaxLen uint16 `smb:"len:NtChallengeResponse"` NtChallengResponseBufferOffset uint32 `smb:"offset:NtChallengeResponse"` DomainNameLen uint16 `smb:"len:DomainName"` DomainNameMaxLen uint16 `smb:"len:DomainName"` DomainNameBufferOffset uint32 `smb:"offset:DomainName"` UserNameLen uint16 `smb:"len:UserName"` UserNameMaxLen uint16 `smb:"len:UserName"` UserNameBufferOffset uint32 `smb:"offset:UserName"` WorkstationLen uint16 `smb:"len:Workstation"` WorkstationMaxLen uint16 `smb:"len:Workstation"` WorkstationBufferOffset uint32 `smb:"offset:Workstation"` EncryptedRandomSessionKeyLen uint16 `smb:"len:EncryptedRandomSessionKey"` EncryptedRandomSessionKeyMaxLen uint16 `smb:"len:EncryptedRandomSessionKey"` EncryptedRandomSessionKeyBufferOffset uint32 `smb:"offset:EncryptedRandomSessionKey"` NegotiateFlags uint32 DomainName []byte `smb:"unicode"` UserName []byte `smb:"unicode"` Workstation []byte `smb:"unicode"` EncryptedRandomSessionKey []byte LmChallengeResponse []byte NtChallengeResponse []byte }
func NewAuthenticateHash ¶
func NewAuthenticateHash(domain, user, workstation, hash string, c Challenge) Authenticate
func NewAuthenticatePass ¶
func NewAuthenticatePass(domain, user, workstation, password string, c Challenge) Authenticate
type AvPairSlice ¶
type AvPairSlice []AvPair
func (*AvPairSlice) MarshalBinary ¶
func (s *AvPairSlice) MarshalBinary(meta *encoder.Metadata) ([]byte, error)
func (*AvPairSlice) UnmarshalBinary ¶
func (s *AvPairSlice) UnmarshalBinary(buf []byte, meta *encoder.Metadata) error
type Challenge ¶
type Challenge struct { Header TargetNameLen uint16 `smb:"len:TargetName"` TargetNameMaxLen uint16 `smb:"len:TargetName"` TargetNameBufferOffset uint32 `smb:"offset:TargetName"` NegotiateFlags uint32 ServerChallenge uint64 Reserved uint64 TargetInfoLen uint16 `smb:"len:TargetInfo"` TargetInfoMaxLen uint16 `smb:"len:TargetInfo"` TargetInfoBufferOffset uint32 `smb:"offset:TargetInfo"` Version uint64 TargetName []byte TargetInfo *AvPairSlice }
func NewChallenge ¶
func NewChallenge() Challenge
type Negotiate ¶
type Negotiate struct { Header NegotiateFlags uint32 DomainNameLen uint16 `smb:"len:DomainName"` DomainNameMaxLen uint16 `smb:"len:DomainName"` DomainNameBufferOffset uint32 `smb:"offset:DomainName"` WorkstationLen uint16 `smb:"len:Workstation"` WorkstationMaxLen uint16 `smb:"len:Workstation"` WorkstationBufferOffset uint32 `smb:"offset:Workstation"` DomainName []byte Workstation []byte }
func NewNegotiate ¶
Click to show internal directories.
Click to hide internal directories.