C:/Web/smbrelay3/src/smbrelay.h

Go to the documentation of this file.
00001 #ifndef _SBMRELAY_H_
00002 #define _SMBRELAY_H_
00003 
00004 #define _CRT_SECURE_NO_DEPRECATE 
00005 #include <stdio.h>
00006 #ifdef WIN32
00007 #include <windows.h> 
00008 #define socklen_t int
00009 #endif
00010 #include "misc.h"
00011 #include "smb.h"
00012 #include "ntlm.h"
00013 
00014 
00015 #define GetNTLMPacketFromSmbPacket(a) ((char*)a+0x2b+4)
00016 #define GetNTLMPacket3FromSmbPacket(a) ((char*)a+ sizeof(smheader) -sizeof(((smheader*)a)->buffer) +sizeof(SessionSetupAndX))
00017 
00018 #define SmbPacketLen(a) (SREV(a->SmbMessageLength)+4)
00019 //#define PrintErrorMessage(a) printf("%s",a); return(0);
00020 //#define PrintErrorMessage(a) printf(a); return(0);
00021 
00022 #define ATTACK_NONE             0x00
00023 #define REPLAY_HTTP             0x01
00024 #define REPLAY_SMB              0x02
00025 #define REPLAY_POP3             0x03
00026 #define REPLAY_IMAP             0x04
00027 #define REPLAY_SMTP             0x05
00028 #define REPLAY_DNS              0x06
00029 #define REPLAY_TELNET   0x07
00030 #define REPLAY_MSSQL    0x08
00031 
00032 #define PSEXEC                  0x10
00033 
00034 #define debug (verbose==2)
00035 
00036 
00037 
00038 //Functions
00039 //int InitSmbHandshake(RELAY *relay,char *Buffer, int BufferSize);
00040 int HandleIncommingSmbRequest(RELAY *relay, char *destinationhostname, int destinationport);
00041 
00042 int ReplayAttackAgainst(int Protocol,char *hostname, int port);
00043 int StablishNTLMSession(RELAY relay,char *host, char *lpUserName, char *lpPassword);
00044 int ExecuteCode( RELAY relay);
00045 
00046 
00047 
00048 
00049 #endif
00050 
00051 

Generated on Wed Nov 12 22:04:28 2008 for Smbrelay version 3 by  doxygen 1.5.4