3 #include "../../Config.h"
4 #include "../../DriverControl/DriverControl.h"
19 uint8_t original_code[24];
21 uint8_t hook_code[384];
26 uint8_t original_code[10];
28 uint8_t hook_code[384];
44 OperationType allocType;
53 CRITICAL_SECTION csLock;
65 BLACKBONE_API NTSTATUS
Map(
bool mapSections );
73 BLACKBONE_API NTSTATUS
Map( ptr_t base, uint32_t size );
79 BLACKBONE_API NTSTATUS
Unmap();
87 BLACKBONE_API NTSTATUS
Unmap( ptr_t base, uint32_t size );
95 BLACKBONE_API ptr_t
TranslateAddress( ptr_t address,
bool resolveFault =
true );
108 BLACKBONE_API NTSTATUS
SetupHook( OperationType hkType );
115 BLACKBONE_API
bool RestoreHook( OperationType hkType );
120 BLACKBONE_API
void reset();
128 static DWORD CALLBACK HookThreadWrap( LPVOID lpParam );
139 void BuildGenericHookFn( OperationType opType );
147 void BuildTrampoline( OperationType opType, uintptr_t pOriginal, uint8_t* pOriginalLocal );
150 class Process* _process =
nullptr;
151 mapMemoryMap _mapDatabase;
152 std::wstring _pipeName;
153 HANDLE _hPipe = NULL;
154 HANDLE _targetPipe = NULL;
155 HANDLE _hThread = NULL;
157 ptr_t _targetShare = 0;
158 bool _active =
false;
BLACKBONE_API void reset()
Unmap any mapped memory, restore hooks and free resources
Definition: RemoteMemory.cpp:244
BLACKBONE_API NTSTATUS SetupHook(OperationType hkType)
Setup one of the 4 possible memory hooks:
Definition: RemoteMemory.cpp:159
Definition: RemoteMemory.h:13
BLACKBONE_API bool RestoreHook(OperationType hkType)
Restore previously hooked function
Definition: RemoteMemory.cpp:211
BLACKBONE_API NTSTATUS Map(bool mapSections)
Map entire process address space
Definition: RemoteMemory.cpp:31
BLACKBONE_API ptr_t TranslateAddress(ptr_t address, bool resolveFault=true)
Translate target address accordingly to current address space
Definition: RemoteMemory.cpp:128
Definition: RemoteMemory.h:24
BLACKBONE_API NTSTATUS Unmap()
Unmap process address space from current process
Definition: RemoteMemory.cpp:79
Definition: AsmHelper32.cpp:6
Definition: RemoteMemory.h:40
Definition: RemoteMemory.h:47