I would like to make a program, that only runs on one computer.
I thought I'd make it write down some security identity data of the computer. (called SID)
I'd want to get the SID data, write it as a binary file. And then when you execute a program, that program reads that data and only runs when the SID-s match.
Is this possible?
Your program should store the SID somewhere else, maybe in a server.
Program should execute on a machine, generate a SID based on that machine and
if(one SID exists in the server) compare it and execute if matched;
else save the SID in the server;
There is sample code here via search(get computer sid). As you know, defeating this type of protection is trivial. Using a hardware ID (harddisk, MAC) is more common as it is less likely to change.
I've thought of MAC address...
My protection system would be something like this: an user gets a password, then he can register his program with that password and it can be only registered once with one password. Then the password will be saved somewhere (registry or temporary file, the password needs no protection anymore). When that person opens the program, the program will send the password and the MAC address to the server and if that password is registered with that MAC address, the program will open.
Is this stupid?
I am not making a commercial program, I am just going to share my program only to some certain people.
What I have seen is this:
The program has a serial number, generated with an especial algorithm.
Program starts and asks you the serial.
If the serial was valid, it connects to server sends serial and MAC address and gets activated from there. MAC and serial are stored in the server. So after that if the program wants to get activation from another machine, server wont let it run.
It is good because the value that determines activation of program is not local.
But if you want to make things simpler, it's better to get the MAC of your clients, then give each of them one application with a unique password based on their MAC. Just make them execute a program to get their MAC and send it to your mailbox.
Or, you could get really inventive and hardcode and use a PCB on a usb port to make it so that only a user with the USB PCB could actually run the program, however one could install it on any machine that one wanted.
Spend more time adding more useful features, or removing some bugs, rather than wasting it on ultimately futile protection systems (perhaps)?
"hey, look at the protection on this - lets hack it"
"why bother, the rest of its crap anyway"
I am trying to do very simple system. When protecting seems too complicated, then I won't do it. It is not important, but I just wanted to know, what is the best way to do it.
Usually the only complete system that prevents a program from being run on multiple systems would be hardware.
Numerous systems I have worked with in the past (systems that cost in the 100,000 USD range) sent either a USB stick or, for the older systems, a parallel passthrough PCB.