Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LMOWFv2 ¶ added in v1.0.3
LMOWFv2 computes the LMOWFv2 hash for a given password, username, and domain Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/5e550938-91d4-459f-b67d-75d70009e3f3
Returns:
- The LMOWFv2 hash as a byte slice
- An error if the computation fails
func NTOWFv2 ¶ added in v1.0.3
NTOWFv2 computes the NTOWFv2 hash for a given password, username, and domain Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/5e550938-91d4-459f-b67d-75d70009e3f3
Returns:
- The NTOWFv2 hash as a byte slice
- An error if the computation fails
Types ¶
type NTLMv2Ctx ¶ added in v1.0.3
type NTLMv2Ctx struct {
Domain string
Username string
Password string
ServerChallenge [8]byte
ClientChallenge [8]byte
NTHash [16]byte
LMHash [16]byte
ResponseKeyNT [16]byte
ResponseKeyLM [16]byte
}
NTLMv2 represents the components needed for NTLMv2 authentication https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/5e550938-91d4-459f-b67d-75d70009e3f3
func NewNTLMv2CtxWithNTHash ¶ added in v1.0.3
func NewNTLMv2CtxWithNTHash(domain, username string, nthash [16]byte, serverChallenge, clientChallenge [8]byte) (*NTLMv2Ctx, error)
NewNTLMv2CtxWithNTHash creates a new NTLMv2 instance with the provided credentials and challenges
Parameters:
- domain: The domain name
- username: The username
- nthash: The 16-byte NT hash
- serverChallenge: The 8-byte server challenge
- clientChallenge: The 8-byte client challenge
func NewNTLMv2CtxWithPassword ¶ added in v1.0.3
func NewNTLMv2CtxWithPassword(domain, username, password string, serverChallenge, clientChallenge [8]byte) (*NTLMv2Ctx, error)
NewNTLMv2CtxWithPassword creates a new NTLMv2 instance with the provided credentials and challenges
Parameters:
- domain: The domain name
- username: The username
- password: The plaintext password
- serverChallenge: The 8-byte server challenge
- clientChallenge: The 8-byte client challenge
func (*NTLMv2Ctx) ComputeResponse ¶ added in v1.0.3
func (ntlm *NTLMv2Ctx) ComputeResponse(ResponseKeyNT, ResponseKeyLM, ServerChallenge, ClientChallenge []byte, Time time.Time, ServerName []byte) ([]byte, error)
ComputeResponse computes the NTLMv2 response for a given domain, username, password, server challenge, and client challenge.
Parameters:
- domain: The domain name
- username: The username
- password: The plaintext password
- serverChallenge: The 8-byte server challenge
- clientChallenge: The 8-byte client challenge
Returns:
- The NTLMv2 response as a byte slice
- An error if the computation fails
func (*NTLMv2Ctx) LMResponse ¶ added in v1.0.3
LMResponse computes the LM response for the NTLMv2 authentication
Returns:
- The LM response as a byte slice
- An error if the computation fails
func (*NTLMv2Ctx) NTResponse ¶ added in v1.0.3
NTResponse computes the NT response for the NTLMv2 authentication
Returns:
- The NT response as a byte slice
- An error if the computation fails
type NTLMv2Response ¶ added in v1.0.3
type NTLMv2Response struct {
Username string // Username for authentication
Domain string // Domain name
ServerChallenge [8]byte // 8-byte challenge from server
LmChallengeResponse [24]byte // 24-byte LM challenge response
NtChallengeResponse [24]byte // 24-byte NT challenge response
}
func NewNTLMv2Response ¶ added in v1.0.3
func NewNTLMv2Response(username, domain string, serverChallenge [8]byte, lmChallengeResponse [24]byte, ntChallengeResponse [24]byte) *NTLMv2Response
NewNTLMv2Response creates a new NTLMv2 response
Parameters:
- username: The username
- domain: The domain name
- serverChallenge: The 8-byte server challenge
- lmChallengeResponse: The 24-byte LM challenge response
func (*NTLMv2Response) HashcatString ¶ added in v1.0.3
func (r *NTLMv2Response) HashcatString() (string, error)
HashcatString converts the NTLMv2 response to a Hashcat string
Returns:
- The Hashcat string
- An error if the conversion fails
func (*NTLMv2Response) String ¶ added in v1.0.3
func (r *NTLMv2Response) String() string
String returns the NTLMv2 response as a string
Returns:
- The NTLMv2 response as a string
- An error if the conversion fails