|
OpenVAS Scanner 23.32.3
|
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) |
| static 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 54 of file smb_crypt.c.
| #define int16 1 |
Definition at line 51 of file smb_crypt.c.
| typedef char fstring[FSTRING_LEN] |
Definition at line 55 of file smb_crypt.c.
|
static |
Definition at line 152 of file smb_crypt.c.
Referenced by dohash().

|
static |
Definition at line 167 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 437 of file smb_crypt.c.
References E_P16(), False, True, uchar, and ZERO_STRUCT.
Referenced by ntlmssp_genauth_ntlm(), and ntlmssp_genauth_ntlm2().


Definition at line 302 of file smb_crypt.c.
References smbhash(), and uchar.
Referenced by E_deshash_ntlmssp(), and nasl_lm_owf_gen().


Definition at line 310 of file smb_crypt.c.
References smbhash(), and uchar.
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 534 of file smb_crypt.c.
References generate_random_buffer_ntlmssp(), SMBOWFencrypt_ntv2_ntlmssp(), and uchar.
Referenced by SMBNTLMv2encrypt_hash_ntlmssp().


|
static |
Definition at line 141 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 476 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 507 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 133 of file smb_crypt.c.
References uchar.
Referenced by dohash().

Definition at line 318 of file smb_crypt.c.
References len, uchar, and val.
Referenced by ntlmssp_genauth_keyexchg().

Definition at line 394 of file smb_crypt.c.
References SMBOWFencrypt_ntlmssp(), and uchar.
Referenced by ntlmssp_genauth_ntlm().


Definition at line 270 of file smb_crypt.c.
References dohash(), str_to_key(), and uchar.
Referenced by E_P16(), and E_P24().


Definition at line 406 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 557 of file smb_crypt.c.
References LMv2_generate_response_ntlmssp(), NTLMv2_generate_response_ntlmssp(), SMBsesskeygen_ntv2_ntlmssp(), and uchar.
Referenced by ntlmssp_genauth_ntlmv2().


Definition at line 384 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 416 of file smb_crypt.c.
References SMBOWFencrypt_ntlmssp(), uchar, and uint8.
Referenced by ntlmssp_genauth_ntlm().


Definition at line 373 of file smb_crypt.c.
References mdfour_ntlmssp(), uchar, and uint8.
Referenced by ntlmssp_genauth_ntlm(), and ntlmssp_genauth_ntlm2().


Definition at line 463 of file smb_crypt.c.
References hmac_md5_final(), hmac_md5_init_limK_to_64(), hmac_md5_update(), uchar, and uint8.
Referenced by SMBNTLMv2encrypt_hash_ntlmssp().


Definition at line 251 of file smb_crypt.c.
References uchar.
Referenced by smbhash().

|
static |
Definition at line 160 of file smb_crypt.c.
Referenced by dohash().

|
static |
Definition at line 58 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 63 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 68 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 74 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 79 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 83 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 91 of file smb_crypt.c.
Referenced by dohash().
|
static |
Definition at line 89 of file smb_crypt.c.
Referenced by dohash().