Page 1 of 1

VMProtectBegin question

Posted: Sat Nov 23, 2013 8:43 am
by sevenfold
Does the VMProtectBegin/VMProtectEnd markers encrypt all the code between the two markers by default?

Because I created a simple test program, and when I protect it and run it, the code between the markers still gets executed.
It is compiled as a 64-bit program, and I have included VMProtectSDK64.lib from Ultimate version.

I want to lock/encrypt the protected code to the hardware ID. I don't want to lock it to serial number.

Code: Select all

#include "stdafx.h"
#include "VMProtectSDK.h"

BOOL ProtectedFunction();

int _tmain(int argc, _TCHAR* argv[]) {

 ProtectedFunction();

 return 0;
}


#pragma optimize( "", off )

BOOL
ProtectedFunction() {

 VMProtectBegin("Test marker");

 MessageBox( NULL, _T("Protected Code"), _T("Test marker"), MB_OK );

 VMProtectEnd();

 return 1;
}
#pragma optimize( "", on )

Perhaps I misunderstand something.

Re: VMProtectBegin question

Posted: Sat Nov 23, 2013 9:45 am
by Admin
VMProtect works with serial numbers and can to lock your code to a serial number instead of the hardware ID (the hardware ID is just a serial number field).
So if you want to lock your code to the hardware ID you need to create a license for this hardware ID and use VMProtectBeginVirtualizationLockByKey instead of VMProtectBegin.
Somethisng like this:

Code: Select all

int _tmain(int argc, _TCHAR* argv[]) {

 VMProtectSetSerialNumber(...);
 
 if (VMProtectGetSerialNumberState()) {
  MessageBox("ProtectedFunction() can not be called");
  return 0;
 }

 ProtectedFunction();

 return 0;
}

BOOL
ProtectedFunction() {

 VMProtectBeginVirtualizationLockByKey("Test marker");

 MessageBox( NULL, _T("Protected Code"), _T("Test marker"), MB_OK );

 VMProtectEnd();

 return 1;
}


Re: VMProtectBegin question

Posted: Sat Nov 23, 2013 8:57 pm
by sevenfold
Thanks for the reply.

When I create a license in VMProtect, under Serial Number Content -> Hardware ID Details, it says:
-CPU
-Host
-HDD
-Ethernet

Does "Ethernet" mean the hardware ID is using the MAC address? If so, how do I remove this field?
Or, how can I create a hardware ID that doesn't include MAC address, as I find it to be too restrictive.

Re: VMProtectBegin question

Posted: Tue Nov 26, 2013 11:58 am
by sevenfold
Hello, can I get an answer to my question?
Is hardware ID customizable?

Re: VMProtectBegin question

Posted: Wed Nov 27, 2013 2:32 am
by bitman2112
Cue the jeopardy song......

Re: VMProtectBegin question

Posted: Wed Nov 27, 2013 8:38 am
by Admin
Does "Ethernet" mean the hardware ID is using the MAC address?
Yes.
If so, how do I remove this field?
Why do you need this?

Re: VMProtectBegin question

Posted: Thu Nov 28, 2013 1:03 pm
by sevenfold
Admin wrote:
Why do you need this?
I'm assuming if the user's MAC address changed, the license generated from the keygen would become invalid.
This only causes frustration for the end user, as their paid program will no longer work.

I would like to keep everything else (CPU,HDD,Host), except for the MAC address.
The MAC address can be changed easily and often, unlike the other fields.

I'm sure somebody else may want it, but if the hardware ID fields were customizable, it would make everyone happy.

Re: VMProtectBegin question

Posted: Tue Dec 03, 2013 6:31 am
by Admin
Do you really think that other "devices" (HDD, Host, CPU) can not be changed? :))

P.S. Please don't worry about our HWID algorithm. Practice shows that it's optimal for usage.