VMProtectBegin question

Issues related to VMProtect
Post Reply
sevenfold
Posts: 8
Joined: Mon Oct 28, 2013 2:39 am

VMProtectBegin question

Post 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.
Admin
Site Admin
Posts: 2584
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMProtectBegin question

Post 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;
}

sevenfold
Posts: 8
Joined: Mon Oct 28, 2013 2:39 am

Re: VMProtectBegin question

Post 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.
sevenfold
Posts: 8
Joined: Mon Oct 28, 2013 2:39 am

Re: VMProtectBegin question

Post by sevenfold »

Hello, can I get an answer to my question?
Is hardware ID customizable?
bitman2112
Posts: 75
Joined: Wed Oct 30, 2013 5:24 pm

Re: VMProtectBegin question

Post by bitman2112 »

Cue the jeopardy song......
Admin
Site Admin
Posts: 2584
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMProtectBegin question

Post 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?
sevenfold
Posts: 8
Joined: Mon Oct 28, 2013 2:39 am

Re: VMProtectBegin question

Post 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.
Admin
Site Admin
Posts: 2584
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMProtectBegin question

Post 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.
Post Reply