Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.81 KB

README.md

File metadata and controls

46 lines (36 loc) · 1.81 KB

phpmem - A PHP Memory Hacking Extension

Precompiled binaries

Credits

  • @frk1 and @ReactiioN for their HazeDumper
  • @imi-tat0r for some C++ help
  • @php for the PHP SDK

Todo

  • make the API fully object-oriented (new PHPMem('csgo.exe')...)
  • signature scanning
  • shellcode execution?

Requirements

Setup

  • extract the PHP source into php-7.1.9-src and the PHP binaries into php-7.1.9
  • copy php-7.1.9/dev/php7.lib to php-7.1.9-lib
  • open src/phpmem.sln and build the solution
  • for installation instructions visit the PHP docs

Info

  • when developing, make sure to require phpmem_polfill.php. It provides the data types for ReadProcessMemory and WriteProcessMemory
  • if you need CS:GO offsets, you can use my HazeDumper parser for PHP

Documentation

Opens a handle to a process.
int PHPMem::GetProcessHandle(string process)
Return: int processHandle or false

Gets the base addess of a loaded module.
int PHPMem::GetModuleBase(int handle, string module)
Return: int moduleBaseAddress or false

Reads data from the specified address.
any PHPMem::ReadProcessMemory(int handle, int address, int type)
Return: any data or false

Writes the specified data to the specified address.
int PHPMem::WriteProcessMemory(int handle, int address, any value, int type)
Return: int lengthOfWrittenData or false