C:/Web/smbrelay3/src/payload.cpp File Reference

#include "payload.h"
#include <time.h>

Include dependency graph for payload.cpp:

Go to the source code of this file.

Functions

int AttackWeakServices (RELAY relay, char *buf, char *path, uint16 FID, char *ServicePath)
int WriteRemoteFile (RELAY relay, smheader *buffer, char *lpFileName)
smheaderBuildSmbPacket1 (void)
smheaderGetSmbPacket2 (RELAY *relay, smheader *Packet1)
smheaderGetSmbPacket3 (smheader *SmbPacket2, char *lpUserName, char *lpPassword, char *domainname, char *host, tSmbNtlmAuthResponse *OptionalNtlmPacket3)
char * GenerateFTPTransfer (char *buffer, char *host, int port, char *username, char *password, char *downloadfile, char *optionalparameter)

Variables

int verbose


Function Documentation

int AttackWeakServices ( RELAY  relay,
char *  buf,
char *  path,
uint16  FID,
char *  ServicePath 
)

Definition at line 6 of file payload.cpp.

References smheader::buffer, BuildSmbPacket(), CHANGESERVICECONFIG, ChangeServiceConfigWStub(), RELAY::destination, GetDceRpcPacketFromBuffer, RELAY::hostname, OPENSCMANAGER, OpenScManagerWStub(), OPENSERVICEW, OpenServiceWStub(), RPC_RESPONSE, SC_MANAGER_CONNECT, SendBytesAndWaitForResponse(), SERVICE_AUTO_START, SERVICE_CHANGE_CONFIG, SERVICE_START, SERVICE_STOP, SERVICE_WIN32_SHARE_PROCESS, Sleep, SMB_COM_TRANSACTION, SmbPacketLen, SMBWAITTIMEOUT, and STARTSERVICE.

Referenced by ExecuteCode().

Here is the call graph for this function:

smheader* BuildSmbPacket1 ( void   ) 

Definition at line 163 of file payload.cpp.

References BuildAuthRequest(), BuildSmbPacket(), DumpMem(), SESSIONSETUPANDX, and SmbLength.

Referenced by HandleIncommingHTTPRequest(), HandleIncommingIMAPRequest(), HandleIncommingPOP3Request(), HandleIncommingSmbRequest(), HandleIncommingSMTPRequest(), and StablishNTLMSession().

Here is the call graph for this function:

char* GenerateFTPTransfer ( char *  buffer,
char *  host,
int  port,
char *  username,
char *  password,
char *  downloadfile,
char *  optionalparameter 
)

Definition at line 201 of file payload.cpp.

Referenced by ExecuteCode().

smheader* GetSmbPacket2 ( RELAY relay,
smheader Packet1 
)

Definition at line 177 of file payload.cpp.

References RELAY::destination, SendBytesAndWaitForResponse(), SmbPacketLen, and SMBWAITTIMEOUT.

Referenced by HandleIncommingHTTPRequest(), HandleIncommingIMAPRequest(), HandleIncommingPOP3Request(), HandleIncommingSmbRequest(), HandleIncommingSMTPRequest(), and StablishNTLMSession().

Here is the call graph for this function:

smheader* GetSmbPacket3 ( smheader SmbPacket2,
char *  lpUserName,
char *  lpPassword,
char *  domainname,
char *  host,
tSmbNtlmAuthResponse OptionalNtlmPacket3 
)

Definition at line 188 of file payload.cpp.

References buildAuthResponse(), BuildSmbPacket(), GetNTLMPacketFromSmbPacket, SESSIONSETUPANDX, and SmbLength.

Referenced by StablishNTLMSession().

Here is the call graph for this function:

int WriteRemoteFile ( RELAY  relay,
smheader buffer,
char *  lpFileName 
)

Definition at line 65 of file payload.cpp.

References BuildSmbPacket(), BuildTreeConnectAndXStub(), CleanLine(), debug, RELAY::destination, RELAY::destinationaddr, DumpMem(), NTCREATEANDX, ReadFileToSend(), SendBytesAndWaitForResponse(), SMBCLOSE, SmbPacketLen, SMBWAITTIMEOUT, STATUS_SHARING_VIOLATION, TREECONNETANDX, verbose, and WRITEANDX.

Referenced by ExecuteCode().

Here is the call graph for this function:


Variable Documentation

int verbose

Definition at line 147 of file smbrelay3.cpp.


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