Interacting with memory

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
mike_athome
Posts: 1
Joined: 29. Jun 2021, 17:46

Interacting with memory

Post by mike_athome »

Hi I am trying to find a way to search and change the contents of virtual machine RAM.
I have used a memory scanner outside of the VM and this can see the needed data, however I can't write to it from outside the VM (I presume this is due to some kind of hardware protection feature?).

I have tried the SDK COM interface but WritePhysicalMemory/WriteVirtualMemory are not implemented. Is there any way to do this?
I am using a Windows host/guest, VirtualBox 6.1.4.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Interacting with memory

Post by noteirak »

You won't find that in the API. The API is about controlling the process running the VM itself, not about dealing with the inner behaviour.
Imagine that VirtualBox is like your computer tower and that the API are the various buttons, cables and hardware pieces you can plug/unplug/press.
If you want direct access to the memory, you need to modify VirtualBox itself to have a new device that intercept hardware calls, or be running in the VM and access the hardware from there.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply