https://github.com/can1357/vmware-rpc
Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs
https://github.com/can1357/vmware-rpc
debugging hypervisor-debugging tools vmware vmware-backdoor vmware-workstation
Last synced: 8 months ago
JSON representation
Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs
- Host: GitHub
- URL: https://github.com/can1357/vmware-rpc
- Owner: can1357
- License: bsd-3-clause
- Created: 2020-12-25T15:42:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-26T16:30:29.000Z (over 5 years ago)
- Last Synced: 2025-07-06T16:50:49.275Z (12 months ago)
- Topics: debugging, hypervisor-debugging, tools, vmware, vmware-backdoor, vmware-workstation
- Language: C++
- Homepage:
- Size: 32.2 KB
- Stars: 101
- Watchers: 6
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
VmxHijack
Header-only VMWare Backdoor API Implementation & Effortless VMX Patcher for Custom Guest-to-Host RPCs
# Sample
```cpp
// --- RPC Server Code (VmxHijack/vmx.hpp)
//
bool vmx_log_handler(
uint64_t vcpuid, void* vcpuctx,
const char* data, uint32_t length,
const void** out, uint32_t* out_length )
{
// Insert the message prefix.
//
std::string msg = "[vmx] vcpu-" + std::to_string( vcpuid ) + ": ";
msg.insert( msg.end(), data, data + length );
// Print onto the host console and DebugView.
//
OutputDebugStringA( msg.c_str() );
logger::print( "%s\n", msg.c_str() );
// Write dummy output.
//
*out = "OK";
*out_length = 2;
return true;
}
// --- RPC Client Code (Any guest application/driver/hypervisor)
//
extern "C" int32_t DriverEntry()
{
auto [success, reply] = vmx::send( "Hello from guest Ring0 to Host!" );
DbgPrint( "=> %s\n", reply.c_str() );
return -1;
}
```