OpenVAS Libraries  9.0.1
Macros | Typedefs | Functions
smb_crypt.c File Reference
#include <glib.h>
#include "smb_crypt.h"
#include "proto.h"

Macros

#define int16   1
 
#define FSTRING_LEN   256
 

Typedefs

typedef char fstring[FSTRING_LEN]
 

Functions

void smbhash (uchar *out, const uchar *in, const uchar *key, int forw)
 
void E_P16 (uchar *p14, uchar *p16)
 
void E_P24 (const uchar *p21, const uchar *c8, uchar *p24)
 
void SamOEMhash (uchar *data, const uchar *key, int val)
 
void SMBsesskeygen_ntv1_ntlmssp (const uchar kr[16], const uchar *nt_resp, uint8 sess_key[16])
 
void SMBOWFencrypt_ntlmssp (const uchar passwd[16], const uchar *c8, uchar p24[24])
 
void SMBencrypt_hash_ntlmssp (const uchar lm_hash[16], const uchar *c8, uchar p24[24])
 
void SMBNTencrypt_hash_ntlmssp (const uchar nt_hash[16], uchar *c8, uchar *p24)
 
void SMBsesskeygen_lm_sess_key_ntlmssp (const uchar lm_hash[16], const uchar lm_resp[24], uint8 sess_key[16])
 
bool E_deshash_ntlmssp (const char *passwd, uchar p16[16])
 
void SMBsesskeygen_ntv2_ntlmssp (const uchar kr[16], const uchar *nt_resp, uint8 sess_key[16])
 
uint8_t * NTLMv2_generate_client_data_ntlmssp (const char *addr_list, int address_list_len)
 
void NTLMv2_generate_response_ntlmssp (const uchar ntlm_v2_hash[16], const char *server_chal, const char *address_list, int address_list_len, uint8_t *nt_response)
 
void LMv2_generate_response_ntlmssp (const uchar ntlm_v2_hash[16], const char *server_chal, uint8_t *lm_response)
 
void SMBNTLMv2encrypt_hash_ntlmssp (const char *user, const char *domain, uchar ntlm_v2_hash[16], const char *server_chal, const char *address_list, int address_list_len, uint8_t *lm_response, uint8_t *nt_response, uint8_t *user_session_key)
 

Macro Definition Documentation

◆ FSTRING_LEN

#define FSTRING_LEN   256

◆ int16

#define int16   1

Typedef Documentation

◆ fstring

typedef char fstring[FSTRING_LEN]

Function Documentation

◆ E_deshash_ntlmssp()

bool E_deshash_ntlmssp ( const char *  passwd,
uchar  p16[16] 
)

Creates the DES forward-only Hash of the users password in DOS ASCII charset

Parameters
passwdpassword in 'unix' charset.
p16return password hashed with DES, caller allocated 16 byte buffer
Returns
False if password was > 14 characters, and therefore may be incorrect, otherwise True
Note
p16 is filled in regardless

◆ E_P16()

void E_P16 ( uchar p14,
uchar p16 
)

◆ E_P24()

void E_P24 ( const uchar p21,
const uchar c8,
uchar p24 
)

◆ LMv2_generate_response_ntlmssp()

void LMv2_generate_response_ntlmssp ( const uchar  ntlm_v2_hash[16],
const char *  server_chal,
uint8_t *  lm_response 
)

◆ NTLMv2_generate_client_data_ntlmssp()

uint8_t* NTLMv2_generate_client_data_ntlmssp ( const char *  addr_list,
int  address_list_len 
)

◆ NTLMv2_generate_response_ntlmssp()

void NTLMv2_generate_response_ntlmssp ( const uchar  ntlm_v2_hash[16],
const char *  server_chal,
const char *  address_list,
int  address_list_len,
uint8_t *  nt_response 
)

◆ SamOEMhash()

void SamOEMhash ( uchar data,
const uchar key,
int  val 
)

◆ SMBencrypt_hash_ntlmssp()

void SMBencrypt_hash_ntlmssp ( const uchar  lm_hash[16],
const uchar c8,
uchar  p24[24] 
)

◆ smbhash()

void smbhash ( uchar out,
const uchar in,
const uchar key,
int  forw 
)

◆ SMBNTencrypt_hash_ntlmssp()

void SMBNTencrypt_hash_ntlmssp ( const uchar  nt_hash[16],
uchar c8,
uchar p24 
)

◆ SMBNTLMv2encrypt_hash_ntlmssp()

void SMBNTLMv2encrypt_hash_ntlmssp ( const char *  user,
const char *  domain,
uchar  ntlm_v2_hash[16],
const char *  server_chal,
const char *  address_list,
int  address_list_len,
uint8_t *  lm_response,
uint8_t *  nt_response,
uint8_t *  user_session_key 
)

◆ SMBOWFencrypt_ntlmssp()

void SMBOWFencrypt_ntlmssp ( const uchar  passwd[16],
const uchar c8,
uchar  p24[24] 
)

◆ SMBsesskeygen_lm_sess_key_ntlmssp()

void SMBsesskeygen_lm_sess_key_ntlmssp ( const uchar  lm_hash[16],
const uchar  lm_resp[24],
uint8  sess_key[16] 
)

◆ SMBsesskeygen_ntv1_ntlmssp()

void SMBsesskeygen_ntv1_ntlmssp ( const uchar  kr[16],
const uchar nt_resp,
uint8  sess_key[16] 
)

◆ SMBsesskeygen_ntv2_ntlmssp()

void SMBsesskeygen_ntv2_ntlmssp ( const uchar  kr[16],
const uchar nt_resp,
uint8  sess_key[16] 
)