Software protection to run on only one computer in vb.net

I have developed a small application, and now I want to protect it.

I want to run it only on my computer, and I designed it for myself.

How can i do this?

+4
source share
7 answers

a. Do not publish it.
B. Build your computer name in code and do the first thing the program checks to see if it System.Environment.MachineName .

+6
source

You can always check the processor ID or serial number of the motherboard.

 Private Function SystemSerialNumber() As String ' Get the Windows Management Instrumentation object. Dim wmi As Object = GetObject("WinMgmts:") ' Get the "base boards" (mother boards). Dim serial_numbers As String = "" Dim mother_boards As Object = _ wmi.InstancesOf("Win32_BaseBoard") For Each board As Object In mother_boards serial_numbers &= ", " & board.SerialNumber Next board If serial_numbers.Length > 0 Then serial_numbers = _ serial_numbers.Substring(2) Return serial_numbers End Function Private Function CpuId() As String Dim computer As String = "." Dim wmi As Object = GetObject("winmgmts:" & _ "{impersonationLevel=impersonate}!\\" & _ computer & "\root\cimv2") Dim processors As Object = wmi.ExecQuery("Select * from " & _ "Win32_Processor") Dim cpu_ids As String = "" For Each cpu As Object In processors cpu_ids = cpu_ids & ", " & cpu.ProcessorId Next cpu If cpu_ids.Length > 0 Then cpu_ids = _ cpu_ids.Substring(2) Return cpu_ids End Function 

Taken from: http://www.vb-helper.com/howto_net_get_cpu_serial_number_id.html

Here's a question from Jim to convert this to Option Strict.

+2
source

It really depends on who the "enemy" is.

If you want to protect it from your greedy, non-hacked friends, you can only start the application if a certain password is found in the registry (using a cryptographically protected hash function) or use MachineName as Jay suggested.

But if you are thinking about protecting it from serious "enemies", pay attention: it has been mathematically proved that while the hardware is unsafe, any software running on it is inherently unsafe, This means that every piece of software is hacked Any protection mechanism is bypassed (even protected hardware devices such as the Alladin Finjan USB product key, because the rest of the hardware is unsafe). Since most (if not all) of today's hardware is unsafe, you simply cannot get 100% protection in software.

Between them there are many solutions for security and copy protection. It all comes down to who the enemy is and what the threat is.

+1
source

No matter how you try, if someone really wants to run it on another computer, they will.

All you need to do is reverse engineer your protection on

  • delete it
  • play with him
+1
source

Another option would be for your program to request a derivative answer from USER. Here is an example of a dead brain ....

Your program: "What time is it now?"

You enter: (TheYear + 10 - theDay + 11) Mod 13

Thus, it is actually ONLY YOU who can run the program instead of being dependent on MACHINE.

+1
source

I did such things in VB DOS.

I either made an unexplored file, which is the key to a specific machine with code inside, and / or read .pwl files, and had several checks that are only on your computer. A non-editable file is created with extended character sets, for example, char 233, so when a person tries to look at it, he will open a blank copy (edit) (write.ex), so the data cannot be read, and this cannot be edited moved or deleted.

These must be certain characters; I’m not sure that each charter between 128 and 255 will work, some extended characters work to do this, some will not, it can also be defeated, but it will contain some people,

But it can be read or checked in a software environment. Nothing is completely safe; these are some of the things I drive with.

Note: the file will be very difficult to delete, it is possible to make a test directory to verify this.

I hope that everything is in order, I do not transmit information to people very well; I have been programming since 1982.

+1
source

Another idea ... I wrote a program that cannot be launched directly, it is launched only by an external file, so you can add a password entry section to it and encrypt the password so that it is not read very easily, I made an executable version of the vb program for testing. it writes a symbol to the skipped space, therefore, if the program sees that this value will not be executed, BUT the runner program has a different symbol, and it changes it to this symbol, and the program is intended to be included only if the symbol is correct, made only a runner, and then when he enters it, he changes it so that it does not remain open, I did this thing and it really works, there is always a way to defeat any defense, the goal is to slow them down or discourage them from starting or using your of programs s if you do not want it. I can include examples later.

0
source

Source: https://habr.com/ru/post/1303126/


All Articles