OpenVAS Libraries
4.0+rc3.SVN
|
00001 /* OpenVAS 00002 * 00003 * $Id$ 00004 * Description: Implementation for NTLMSSP support 00005 * 00006 * Author: 00007 * Preeti Subramanian <spreeti@secpod.com> 00008 * 00009 * Copyright: 00010 * Copyright (c) 2010 Greenbone Networks GmbH, http://www.greenbone.net 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License version 2 00014 * (or any later version), as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 00024 */ 00025 00026 /* 00027 * Functions to support Authentication(type3 message) for NTLMSSP (NTLMv2, NTLM2, NTLM, KEY GEN) 00028 */ 00029 #ifndef _NTLMSSP_H_ 00030 #define _NTLMSSP_H_ 00031 #include "md5.h" 00032 #include "proto.h" 00033 #include "hmacmd5.h" 00034 #include "byteorder.h" 00035 #include "smb_crypt.h" 00036 00037 #ifndef uchar 00038 #define uchar unsigned char 00039 #endif 00040 00041 #ifndef uint8 00042 #define uint8 uint8_t 00043 #endif 00044 00045 void ntlmssp_genauth_ntlmv2(char* user, char *domain, char* address_list, int address_list_len, char *challenge_data, uint8_t *lm_response, 00046 uint8_t *nt_response, uint8_t* session_key, unsigned char* ntlmv2_hash); 00047 void ntlmssp_genauth_ntlm2(char *password, uint8_t *lm_response, uint8_t *nt_response, uint8_t *session_key, char *challenge_data, unsigned char* nt_hash); 00048 void ntlmssp_genauth_ntlm(char *password, uint8_t *lm_response, uint8_t *nt_response, uint8_t *session_key, char *challenge_data, unsigned char* nt_hash, int neg_flags); 00049 uint8_t* ntlmssp_genauth_keyexchg(uint8_t *session_key, char *challenge_data, unsigned char* nt_hash, uint8_t *new_sess_key); 00050 00051 #endif