Hardware lock only not working on target

Post here messages if you have any problems with working of Enigma Protector
Post Reply
overenigma
Posts: 13
Joined: Wed Oct 24, 2018 12:55 am

Hardware lock only not working on target

Post by overenigma »

Hi, so I want my myapp.exe to be locked to one particular machine only. I use the hardwareID sample (register.exe) to get a hardware ID from target machine. I generated a hardware ID key and with Expiration date, and I can register fine using register.exe.

For myapp.exe project, it will sliently quit even after I have registered successfully with register.exe

Myapp.exe settings
Tick "Allow execution only if registered"
Tick "Allow only hardware locked keys"
Tick "Allow only keys with expiration date"
Tick "Encrypt Registration Information"
Tick "Disable copying of the registration information to another PC"
Hardware lock - same selected items as register.exe
Tick "Encrypt application with particular hardware ID" with hardware ID from target machine
"Uncheck" Reset trial in new version
Tick "Anti debugger", control sum, "Inline patching"
overenigma
Posts: 13
Joined: Wed Oct 24, 2018 12:55 am

Re: Hardware lock only not working on target

Post by overenigma »

So I understand that "Registration features" is different for register.exe and myapp.exe, so then how would I get register.exe to work because it is not tied to hardwareid?
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Hardware lock only not working on target

Post by Enigma »

overenigma wrote: Thu Oct 25, 2018 12:33 pm So I understand that "Registration features" is different for register.exe and myapp.exe,
Sorry, not understand what you mean in this. These settings have to same for both apps, NOT different.
overenigma wrote: Thu Oct 25, 2018 12:20 pm Tick "Encrypt application with particular hardware ID" with hardware ID from target machine
Not sure you need this feature, suggest to disable it. If this feature is used, you need to protect separate exe file for each client, for each hardware id. Not sure this is what you are looking for.
Do not use it.
overenigma
Posts: 13
Joined: Wed Oct 24, 2018 12:55 am

Re: Hardware lock only not working on target

Post by overenigma »

So this is what I want to achieve

register.exe (from c# hardware id sample)
- not locked to any machine
- get hardware ID
- register user/key

myapp.exe
- locked to single machine only. Yes I want to produce an exe for that single machine only.
- No register user/key functionality, just quit silently if unregistered

So I guess it can't be done because I have "Encrypt with hardware id", and myapp.exe must have the register functionality?
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Hardware lock only not working on target

Post by Enigma »

overenigma wrote: Thu Oct 25, 2018 12:59 pm - locked to single machine only. Yes I want to produce an exe for that single machine only.
I believe there is some confusion.

You can lock the file to particular computer using two ways:
1. Using Hardware Locked license keys. Most widely used feature, because it is simple and powerful. You can distribute protected file to all customers and give them hardware locked license key, they will register and this license key will be working on this computer only.
2. Using Encrypt with Hardware ID feature. Very rare used, disadvantage of this method is that you need to protect the file for each customer for each hardware id. So you will need to obtain hardware id from customer and then protect the file and then send it to customer back.

As far as I see, you are trying to combine both ways, I'm not sure it is good idea.

Since you wrote that you do not need registered functionality and you still wish to use #2, almost all settings that you enter on Registration Features panel are not used. What you need is the following:
1. Create new project in Enigma, select the file to protect (let's it would be register.exe), save the project file, protect it. That's all for register.exe. It will show hardware id. You do not need any register feature for that, since you need to disaplay Hardware ID only.
2. Copy the project file you created in #1, open it in Enigma, select the file to protect - application.exe, then enter hardware id in Registration Features - Encrypt with hardware id, protect the file.

Finally you have 2 files, register.exe that shows hardware id and nothing more and application.exe that is tied to specified hardware id (it does not ask for key, it does not show any message or dialog, it just won't work on computer that has another hardware id).

Let me repeat it again, the #2 that you've choosen is not flexible, it is very rare used (but I agree that it provides the better security). It's main problem is that you need to protect separate executable for each customer, which is usually time and resource costly (if you have a lot of customers). First way is more flexible and used by major amount of developers.
But this is your choice.
overenigma
Posts: 13
Joined: Wed Oct 24, 2018 12:55 am

Re: Hardware lock only not working on target

Post by overenigma »

Yes, I do want to make one exe for each customer, it is specialized app.

Ok, I will give it a try as a new project tomorrow. but my previous myapp.exe settings has already the Encrypt with hardware id set, and it didn't work. Maybe it has the Registration part, so I will try one without them. Thanks for the detailed reply.
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Hardware lock only not working on target

Post by Enigma »

overenigma wrote: Thu Oct 25, 2018 2:23 pm Maybe it has the Registration part
Yes, it is definitely due to of the registration part, commonly due to Registration Features - Common - Allow execution only if registered.

Start with the new empty project, do the steps that I described, all will be working well.
overenigma wrote: Thu Oct 25, 2018 2:23 pm Yes, I do want to make one exe for each customer, it is specialized app.
Make sense.
overenigma
Posts: 13
Joined: Wed Oct 24, 2018 12:55 am

Re: Hardware lock only not working on target

Post by overenigma »

Ok, I tested this working well, with a "Limitation by expiration date".

Now, back to original problem, would it be possible to have 1, 2. working well together?

E.g
1. I give target machine an exe to get it's hardware id (register.exe)
2. I make a exe encrpyted with target machine id, with a trial expiration date (app.exe)
3. Later, I send client a user/key to register to unlock the trial with the same app.exe. Ideally, myapp.exe does not have register function, I can use register.exe for registration

The idea is to encrypt app.exe with target machine hardware id, but still have a key to unlock trial.
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Hardware lock only not working on target

Post by Enigma »

overenigma wrote: Sun Oct 28, 2018 6:44 am Now, back to original problem, would it be possible to have 1, 2. working well together?
Yes, of course, this is possible to do.

Use register.exe to register the app.exe. Seems there is no questions on how to protect it?

For the app.exe, no special settings are required. Just make sure that all settings on Registration Features panels are the same between register.exe and app.exe (copy the project file as I suggested before).

The option "Allow execution only if registered" should be disabled, it won't work in your scenario.
Post Reply