-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathinjection.h
More file actions
35 lines (30 loc) · 993 Bytes
/
injection.h
File metadata and controls
35 lines (30 loc) · 993 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
#pragma once
#include <Windows.h>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <TlHelp32.h>
#include <comdef.h>
#include <curl/curl.h>
using f_LoadLibraryA = HINSTANCE(WINAPI*)(const char* lpLibFilename);
using f_GetProcAddress = FARPROC(WINAPI*)(HMODULE hModule, LPCSTR lpProcName);
using f_DLL_ENTRY_POINT = BOOL(WINAPI*)(void* hDll, DWORD dwReason, void* pReserved);
using f_RtlAddFunctionTable = BOOL(WINAPIV*)(PRUNTIME_FUNCTION FunctionTable, DWORD EntryCount, DWORD64 BaseAddress);
struct MANUAL_MAPPING_DATA {
f_LoadLibraryA pLoadLibraryA;
f_GetProcAddress pGetProcAddress;
f_RtlAddFunctionTable pRtlAddFunctionTable;
BYTE* pbase;
HINSTANCE hMod;
DWORD fdwReasonParam;
LPVOID reservedParam;
BOOL SEHSupport;
};
struct MemoryStruct {
char* memory;
size_t size;
};
bool ManualMap(HANDLE hProc, const char* DllURL);
int GetPIDByName(const char* ProcName);
HANDLE OpenProc(const char* ProcName);
void __stdcall Shellcode(MANUAL_MAPPING_DATA* pData);