25 #define NTLM_MAGIC { 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' } 162 #define NTLM_VERSION_NTLMV2 0x01 struct ntlm_nonce * nonce
Server nonce.
int ntlm_challenge(struct ntlm_challenge *challenge, size_t len, struct ntlm_challenge_info *info)
Parse NTLM Challenge.
A variable-length data descriptor.
uint8_t major
Product major version.
uint8_t minor
Product minor version.
uint8_t digest[MD5_DIGEST_SIZE]
HMAC-MD5 digest.
struct ntlm_data lm
LAN Manager response.
uint8_t high
Highest response version.
uint8_t reserved_a[6]
Reserved.
size_t ntlm_authenticate(struct ntlm_challenge_info *info, const char *domain, const char *username, const char *workstation, struct ntlm_lm_response *lm, struct ntlm_nt_response *nt, struct ntlm_authenticate *auth)
Construct NTLM Authenticate message.
unsigned long long uint64_t
ntlm_flags
Negotiation flags.
size_t len
Length of target information.
struct ntlm_header header
Message header.
uint16_t len
Length (in bytes)
uint64_t time
Current time.
uint8_t reserved[3]
Reserved.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint16_t build
Product build number.
struct ntlm_data domain
Domain name.
void ntlm_response(struct ntlm_challenge_info *info, struct ntlm_key *key, struct ntlm_nonce *nonce, struct ntlm_lm_response *lm, struct ntlm_nt_response *nt)
Construct NTLM responses.
uint8_t digest[MD5_DIGEST_SIZE]
HMAC-MD5 digest.
uint8_t version
Response version.
An NTLM verification key.
struct ntlm_nonce nonce
Client nonce.
uint32_t flags
Negotiation flags.
uint16_t max_len
Maximum length (in bytes)
struct ntlm_data workstation
Workstation name.
uint32_t flags
Negotiation flags.
struct ntlm_data domain
Domain name.
struct ntlm_header header
Message header.
void * target
Target information.
struct ntlm_data session
Session key.
struct ntlm_nonce nonce
Client nonce.
Negotiate extended security.
size_t ntlm_authenticate_len(struct ntlm_challenge_info *info, const char *domain, const char *username, const char *workstation)
Calculate NTLM Authenticate message length.
static struct dynamic_item password
uint32_t zero
Must be zero.
struct ntlm_data nt
NT response.
uint32_t flags
Negotiation flags.
struct ntlm_data name
Target name.
struct ntlm_data user
User name.
struct ntlm_data workstation
Workstation name.
struct ntlm_data info
Target information.
struct ntlm_header header
Message header.
uint8_t raw[MD5_DIGEST_SIZE]
Raw bytes.
uint8_t reserved[8]
Reserved.
uint8_t revision
NTLMSSP revision.
uint32_t offset
Offset from start of message header.
static struct dynamic_item username
#define MD5_DIGEST_SIZE
MD5 digest size.
struct ntlm_nonce nonce
Server nonce.
NTLM challenge information.
Request target name and information.
Negotiate Unicode character encoding.
struct mschapv2_nt_response nt
NT response.
void ntlm_key(const char *domain, const char *username, const char *password, struct ntlm_key *key)
Calculate NTLM verification key.