forked from killbug2004/ShellCodeFramwork
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathShellCode.h
More file actions
37 lines (27 loc) · 861 Bytes
/
ShellCode.h
File metadata and controls
37 lines (27 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "WinType.h"
typedef unsigned long(_stdcall *LOADLIBRARYA)(const char*);
typedef int(_stdcall *FARPROC)();
typedef FARPROC(_stdcall *GETPROCADDRESS)(unsigned long, const char*);
class CShellCode
{
private:
PEB* pPeb;
protected:
LOADLIBRARYA LoadLibraryA;
GETPROCADDRESS GetProcAddress;
private:
void GetPEB();
unsigned long GetHash(_In_ const char* str);
unsigned long GetFunctionHash(_In_ const char* szModuleName, _In_ const char* szFuncName);
LDR_DATA_TABLE_ENTRY* GetLDRDataTableEntry(_In_ const LIST_ENTRY* ptr);
void* GetFuncAddressByHash(_In_ unsigned long dwHash);
protected:
void* GetAPIAddress(_In_ const char* szModuleName, _In_ const char* szFuncName);
// Memory Manage
void* memset(void *s, int c, size_t n);
public:
CShellCode();
~CShellCode();
void Run();
};