OpenVAS Scanner
7.0.1~git
|
Unix SMB/Netbios implementation. Version 1.9. More...
Go to the source code of this file.
Macros | |
#define | int16 1 |
#define | FSTRING_LEN 256 |
Typedefs | |
typedef char | fstring[FSTRING_LEN] |
Functions | |
static void | permute (char *out, char *in, const uchar *p, int n) |
static void | lshift (char *d, int count, int n) |
static void | concat (char *out, char *in1, char *in2, int l1, int l2) |
static void | xor (char *out, char *in1, char *in2, int n) |
static void | dohash (char *out, char *in, char *key, int forw) |
static void | str_to_key (const uchar *str, uchar *key) |
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, uint8_t pass_len, 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) |
Variables | |
static const uchar | perm1 [56] |
static const uchar | perm2 [48] |
static const uchar | perm3 [64] |
static const uchar | perm4 [48] |
static const uchar | perm5 [32] |
static const uchar | perm6 [64] |
static const uchar | sc [16] = {1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1} |
static const uchar | sbox [8][4][16] |
Unix SMB/Netbios implementation. Version 1.9.
a partial implementation of DES designed for use in the SMB authentication protocol
Definition in file smb_crypt.c.
#define FSTRING_LEN 256 |
Definition at line 67 of file smb_crypt.c.
#define int16 1 |
Definition at line 64 of file smb_crypt.c.
typedef char fstring[FSTRING_LEN] |
Definition at line 68 of file smb_crypt.c.
|
static |
Definition at line 165 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 180 of file smb_crypt.c.
References concat(), lshift(), perm1, perm2, perm3, perm4, perm5, perm6, permute(), sbox, sc, and xor().
Referenced by smbhash().
Creates the DES forward-only Hash of the users password in DOS ASCII charset
passwd | password in 'unix' charset. |
p16 | return password hashed with DES, caller allocated 16 byte buffer |
Definition at line 450 of file smb_crypt.c.
References E_P16(), False, True, and ZERO_STRUCT.
Referenced by ntlmssp_genauth_ntlm(), and ntlmssp_genauth_ntlm2().
Definition at line 315 of file smb_crypt.c.
References smbhash(), and uchar.
Referenced by E_deshash_ntlmssp(), and nasl_lm_owf_gen().
Definition at line 323 of file smb_crypt.c.
References smbhash().
Referenced by nasl_ntlmv1_hash(), and SMBOWFencrypt_ntlmssp().
void LMv2_generate_response_ntlmssp | ( | const uchar | ntlm_v2_hash[16], |
const char * | server_chal, | ||
uint8_t * | lm_response | ||
) |
Definition at line 545 of file smb_crypt.c.
References generate_random_buffer_ntlmssp(), SMBOWFencrypt_ntv2_ntlmssp(), and uchar.
Referenced by SMBNTLMv2encrypt_hash_ntlmssp().
|
static |
Definition at line 154 of file smb_crypt.c.
Referenced by dohash().
uint8_t* NTLMv2_generate_client_data_ntlmssp | ( | const char * | addr_list, |
int | address_list_len | ||
) |
Definition at line 489 of file smb_crypt.c.
References generate_random_buffer_ntlmssp(), put_long_date_ntlmssp(), SIVAL, and uchar.
Referenced by 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 | ||
) |
Definition at line 520 of file smb_crypt.c.
References NTLMv2_generate_client_data_ntlmssp(), SMBOWFencrypt_ntv2_ntlmssp(), and uchar.
Referenced by SMBNTLMv2encrypt_hash_ntlmssp().
|
static |
Definition at line 146 of file smb_crypt.c.
Referenced by dohash().
Definition at line 331 of file smb_crypt.c.
Referenced by ntlmssp_genauth_keyexchg().
Definition at line 407 of file smb_crypt.c.
References SMBOWFencrypt_ntlmssp(), and uchar.
Referenced by ntlmssp_genauth_ntlm().
Definition at line 283 of file smb_crypt.c.
References dohash(), str_to_key(), and uchar.
Referenced by E_P16(), and E_P24().
Definition at line 419 of file smb_crypt.c.
References SMBOWFencrypt_ntlmssp(), and uchar.
Referenced by ntlmssp_genauth_ntlm(), and ntlmssp_genauth_ntlm2().
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 | ||
) |
Definition at line 568 of file smb_crypt.c.
References LMv2_generate_response_ntlmssp(), NTLMv2_generate_response_ntlmssp(), and SMBsesskeygen_ntv2_ntlmssp().
Referenced by ntlmssp_genauth_ntlmv2().
Definition at line 397 of file smb_crypt.c.
References E_P24(), uchar, and ZERO_STRUCT.
Referenced by SMBencrypt_hash_ntlmssp(), SMBNTencrypt_hash_ntlmssp(), and 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] | ||
) |
Definition at line 429 of file smb_crypt.c.
References SMBOWFencrypt_ntlmssp(), and uchar.
Referenced by ntlmssp_genauth_ntlm().
Definition at line 386 of file smb_crypt.c.
References mdfour_ntlmssp().
Referenced by ntlmssp_genauth_ntlm(), and ntlmssp_genauth_ntlm2().
Definition at line 476 of file smb_crypt.c.
References hmac_md5_final(), hmac_md5_init_limK_to_64(), and hmac_md5_update().
Referenced by SMBNTLMv2encrypt_hash_ntlmssp().
Definition at line 264 of file smb_crypt.c.
Referenced by smbhash().
|
static |
Definition at line 173 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 71 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 76 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 81 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 87 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 92 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 96 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 104 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 102 of file smb_crypt.c.
Referenced by dohash().