ntlmv2

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NTLMv2

type NTLMv2 struct {
	Domain          string
	Username        string
	Password        string
	ServerChallenge [8]byte
	ClientChallenge [8]byte
	NTHash          [16]byte
	ResponseKeyNT   [16]byte
}

NTLMv2 represents the components needed for NTLMv2 authentication

func NewNTLMv2

func NewNTLMv2(domain, username, password string, serverChallenge, clientChallenge [8]byte) (*NTLMv2, error)

NewNTLMv2 creates a new NTLMv2 instance with the provided credentials and challenges

func (*NTLMv2) Hash

func (ntlm *NTLMv2) Hash() ([]byte, error)

NTLMv2Hash 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 (*NTLMv2) HashHex

func (ntlm *NTLMv2) HashHex() (string, error)

NTLMv2HashHex computes the NTLMv2 response for a given domain, username, password, server challenge, and client challenge, and returns it as a hexadecimal string.

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 hexadecimal string
  • An error if the computation fails

func (*NTLMv2) ToHashcatString

func (ntlm *NTLMv2) ToHashcatString() (string, error)

ToHashcatString converts the NTLMv2 response to a Hashcat string

Returns:

  • The Hashcat string
  • An error if the conversion fails

Jump to

Keyboard shortcuts

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