Enable/Disable MemoryProtection in code

Issues related to VMProtect
Post Reply
GMerg
Posts: 6
Joined: Thu Feb 04, 2010 10:09 am

Enable/Disable MemoryProtection in code

Post by GMerg »

Feature Request:

Being able to turn on/off MemoryProtection with in code. like in following pseudoe code:

Code: Select all

begin
  memory_protection_off;
  patch_memory;
  memory_protection_on; // << this should also generate a new hash over the memory
  .. go on with patched code ..
end
Background:
I am still using an older Delphi version to code some tools and inside it using FastMM4as memory manager and some other libraries that would patch certain memory locations at startup to make faster functions availabe for all other routines used later on.

This however is not working together with the MemoryProtection from VMP as it would see this as a cracking/hacking attempts. It would be nice to have something in VMP that would let me turn on MemoryProtection after I have finished my patching in the hope that some kind of new HASH is generated that the function would check against it.

Actually I have no details on how this HASH is generated (maybe when applying the protection) but if it is done on startup, it would be optimal to reinit this to make use of this very important function after all.

Sorry my English is not that good and I hope I could express myself in a way you could understand it.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Enable/Disable MemoryProtection in code

Post by Admin »

In your case you have to disable "Memory protection" for the ".text" segment like this:
Image
GMerg
Posts: 6
Joined: Thu Feb 04, 2010 10:09 am

Re: Enable/Disable MemoryProtection in code

Post by GMerg »

Thanks, this is something Im doing already but of course it is not much more vulnerable to silly attacks using CheatEngine or Loaders to manipulate the program's code.

I guess there is nothing planned to reinitialize this Memory Protection from program code right?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Enable/Disable MemoryProtection in code

Post by Admin »

We are not going to add anything for it because an application that verifies own integrity should not change itself.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Enable/Disable MemoryProtection in code

Post by Admin »

Do you have information about modified regions at the protection time? I mean if you know that your code modifies part of itself you will provide this regions to VMProtect via script and VMProtect will exclude these regions from the memory protection.
Post Reply