|
BlackBone
Windows memory hacking library
|
Public Member Functions | |
| BLACKBONE_API | ProcessMemory (class Process *process) |
| BLACKBONE_API MemBlock | Allocate (size_t size, DWORD protection=PAGE_EXECUTE_READWRITE, ptr_t desired=0) |
| Allocate new memory block More... | |
| BLACKBONE_API NTSTATUS | Free (ptr_t pAddr, size_t size=0, DWORD freeType=MEM_RELEASE) |
| Free memory More... | |
| BLACKBONE_API NTSTATUS | Query (ptr_t pAddr, PMEMORY_BASIC_INFORMATION64 pInfo) |
| Get memory region info More... | |
| BLACKBONE_API NTSTATUS | Protect (ptr_t pAddr, size_t size, DWORD flProtect, DWORD *pOld=NULL) |
| Change memory protection More... | |
| BLACKBONE_API NTSTATUS | Read (ptr_t dwAddress, size_t dwSize, PVOID pResult, bool handleHoles=false) |
| Read data More... | |
| BLACKBONE_API NTSTATUS | Write (ptr_t pAddress, size_t dwSize, const void *pData) |
| Write data More... | |
| template<class T > | |
| T | Read (ptr_t dwAddress) |
| Read data More... | |
| template<class T > | |
| NTSTATUS | Read (ptr_t dwAddress, T &result) |
| Read data More... | |
| template<class T > | |
| NTSTATUS | Write (ptr_t dwAddress, const T &data) |
| Write data More... | |
| BLACKBONE_API size_t | EnumRegions (std::list< MEMORY_BASIC_INFORMATION64 > &results, bool includeFree=false) |
| Enumerate valid memory regions More... | |
| BLACKBONE_API class ProcessCore & | core () |
| BLACKBONE_API class Process * | process () |
Public Member Functions inherited from blackbone::RemoteMemory | |
| BLACKBONE_API | RemoteMemory (class Process *process) |
| BLACKBONE_API NTSTATUS | Map (bool mapSections) |
| Map entire process address space More... | |
| BLACKBONE_API NTSTATUS | Map (ptr_t base, uint32_t size) |
| Map specific memory region More... | |
| BLACKBONE_API NTSTATUS | Unmap () |
| Unmap process address space from current process More... | |
| BLACKBONE_API NTSTATUS | Unmap (ptr_t base, uint32_t size) |
| Unmap specific memory region from current process More... | |
| BLACKBONE_API ptr_t | TranslateAddress (ptr_t address, bool resolveFault=true) |
| Translate target address accordingly to current address space More... | |
| BLACKBONE_API NTSTATUS | SetupHook (OperationType hkType) |
| Setup one of the 4 possible memory hooks: More... | |
| BLACKBONE_API bool | RestoreHook (OperationType hkType) |
| Restore previously hooked function More... | |
| BLACKBONE_API void | reset () |
| Unmap any mapped memory, restore hooks and free resources More... | |
Additional Inherited Members | |
Public Types inherited from blackbone::RemoteMemory | |
| enum | OperationType { MemVirtualAlloc = 0, MemVirtualFree, MemMapSection, MemUnmapSection } |
| MemBlock blackbone::ProcessMemory::Allocate | ( | size_t | size, |
| DWORD | protection = PAGE_EXECUTE_READWRITE, |
||
| ptr_t | desired = 0 |
||
| ) |
Allocate new memory block
| size | Block size |
| protection | Memory protection |
| desired | Desired base address of new block |
| size_t blackbone::ProcessMemory::EnumRegions | ( | std::list< MEMORY_BASIC_INFORMATION64 > & | results, |
| bool | includeFree = false |
||
| ) |
Enumerate valid memory regions
| results | Found regions |
| includeFree | If true - non-allocated regions will be included in list |
| NTSTATUS blackbone::ProcessMemory::Free | ( | ptr_t | pAddr, |
| size_t | size = 0, |
||
| DWORD | freeType = MEM_RELEASE |
||
| ) |
Free memory
| pAddr | Memory address to release. |
| size | Region size |
| freeType | Release/decommit |
| NTSTATUS blackbone::ProcessMemory::Protect | ( | ptr_t | pAddr, |
| size_t | size, | ||
| DWORD | flProtect, | ||
| DWORD * | pOld = NULL |
||
| ) |
Change memory protection
| pAddr | Memory address |
| size | Region size |
| flProtect | New memory protection flags |
| pOld | Old protection flags |
| NTSTATUS blackbone::ProcessMemory::Query | ( | ptr_t | pAddr, |
| PMEMORY_BASIC_INFORMATION64 | pInfo | ||
| ) |
Get memory region info
| pAddr | Memory address |
| pInfo | Retrieved info |
| NTSTATUS blackbone::ProcessMemory::Read | ( | ptr_t | dwAddress, |
| size_t | dwSize, | ||
| PVOID | pResult, | ||
| bool | handleHoles = false |
||
| ) |
Read data
| dwAddress | Memoey address to read from |
| dwSize | Size of data to read |
| pResult | Output buffer |
| handleHoles | If true, function will try to read all committed pages in range ignoring uncommitted ones. Otherwise function will fail if there is at least one non-committed page in region. |
|
inline |
Read data
| dwAddress | Address to read from |
|
inline |
Read data
| dwAddress | Address to read from |
| result | Read data |
| NTSTATUS blackbone::ProcessMemory::Write | ( | ptr_t | pAddress, |
| size_t | dwSize, | ||
| const void * | pData | ||
| ) |
Write data
| pAddress | Memory address to write to |
| dwSize | Size of data to write |
| pData | Buffer to write |
|
inline |
Write data
| dwSize | Size of data to write |
| data | Data to write |