I even seen apps that hacked unused OS variables to store custom data in registry.
But the simplest method is to register a handler for a custom unused file type like .sof (if that is there, it was installed before) Edit 1 You have to register the handle to open a known executable on the system, not to your app. Because cleaners will detect if points to a no longer existing app location. As for storing additional params like date of trial expiry you can include them in the path as a param, like: cmd.exe -o 2010-02-09
我用两种方式处理了这个问题。首先,在 Windows 应用程序中,我放入了一个加密的注册表项,该注册表项不在标准位置,因此不容易找到。如果您不介意人们 a) 经常重新格式化,从而删除所有注册表项,或者 b) 在虚拟机上使用您的软件,可以快速恢复到预试用状态(因此您的踪迹可以很快就能再次使用)。
更好的选择是使用在线注册表组件来捕获加载试用版的计算机的 MAC 地址。每当重新加载试用版时,软件都会检查 Web 服务以查看以前是否见过该 MAC 地址。解决这个问题的唯一方法是再次使用能够更改 MAC 地址的虚拟机。但是,如果您有一个走极端的用户,他们无论如何都会使用您的试用版。
I have handled this in two ways. First, in windows apps, I put in an encrypted Registry entry which is not in a standard location so that it is not easily found. This is a good solution if you don't mind people who either a) reformat often which removes all registry entries or b) use your software on a virtual machine which can be quickly reverted to a pre-trial state (and thus your trail can be used again quickly).
The better alternative is to have an online registry component which catches the MAC address of the machine which the trial is loaded on. Whenever the trial is reloaded, the software checks against a web service to see if the MAC address has been seen before. The only way around this is again using a Virtual Machine with the ability to change the MAC address. However, if you have a user that goes to this extreme, they'll use your trial regardless.
Probably the most foolproof way of licensing (when done right) is through something the user physically has - some kind of hardware dongle.
very hard to copy/duplicate
not dependent on network access
tamper-resistant (compared to software)
user-friendly (when working correctly)
licence count enforcement (can't easily plug 1 dongle into 10 machines at once)
Of course, it has also numerous disadvantages:
expensive to produce
hard to repair/replace
actually requires you to communicate with the dongle in a cryptographically secure way - any kind of if(dongle_ok()) { do_stuff() } is an invitation for crackers to patch that over to if (1) { do_stuff() }...
...which will require special drivers...
...maybe even a special interface (I still have a LPT dongle, but no LPT ports; USB<->LPT sucks)
don't even think of hooking it up to a virtual machine (although peripheral support is better in VMs nowadays)
support hell (is it connected? is it not broken? is the driver not broken? are the signatures/keys right and unexpired?)
fragile, esp. if it sticks out of the computer and/or has destructive anti-tamper mechanisms
may break communication with other peripherals (esp. those "pass-through" things were notorious for this)
For most programs, the disadvantages far outweigh the advantages; however, if you're making expensive, complex software (think "production plant control"), your clients are rather cavalier about licensing (in other words, "would buy a single copy (crack it if necessary) and run it on 50 machines if they could get away with it"), and lawsuits are impractical (take too long, you don't have much evidence, uncertain outcome), this may be useful. (I didn't say simple, did I?)
They save it wherever they can, secret files, secret registry keys. There are commercial products that offer this kind of protection, like asprotect, armadillo, etc.
Could also try making the file or folder hidden - most users don't know to reveal hidden files and folders. Then you can put it anywhere really. C:/WINDOWS is sometimes a good choice because of that silly window that shows up when you click it for the first time that says "DANGER! DO NOT EDIT ANYTHING IN THIS FOLDER OR YOUR OS WILL MESS UP!" This will hide most anything from the lay man, but let's face the facts, you're not hiding anything from anyone that is active on stack overflow. :)
发布评论
评论(6)
cmd.exe -o 2010-02-09
cmd.exe -o 2010-02-09
我用两种方式处理了这个问题。首先,在 Windows 应用程序中,我放入了一个加密的注册表项,该注册表项不在标准位置,因此不容易找到。如果您不介意人们 a) 经常重新格式化,从而删除所有注册表项,或者 b) 在虚拟机上使用您的软件,可以快速恢复到预试用状态(因此您的踪迹可以很快就能再次使用)。
更好的选择是使用在线注册表组件来捕获加载试用版的计算机的 MAC 地址。每当重新加载试用版时,软件都会检查 Web 服务以查看以前是否见过该 MAC 地址。解决这个问题的唯一方法是再次使用能够更改 MAC 地址的虚拟机。但是,如果您有一个走极端的用户,他们无论如何都会使用您的试用版。
I have handled this in two ways. First, in windows apps, I put in an encrypted Registry entry which is not in a standard location so that it is not easily found. This is a good solution if you don't mind people who either a) reformat often which removes all registry entries or b) use your software on a virtual machine which can be quickly reverted to a pre-trial state (and thus your trail can be used again quickly).
The better alternative is to have an online registry component which catches the MAC address of the machine which the trial is loaded on. Whenever the trial is reloaded, the software checks against a web service to see if the MAC address has been seen before. The only way around this is again using a Virtual Machine with the ability to change the MAC address. However, if you have a user that goes to this extreme, they'll use your trial regardless.
也许最万无一失的许可方式(如果做得正确)是通过用户实际拥有的东西 - 某种硬件加密狗。
当然,它还具有众多缺点:
if(dongle_ok()) { do_stuff() }< /code> 邀请破解者将其修补到
if (1) { do_stuff() }
...对于大多数程序来说,缺点远远超过优点;然而,如果你正在制作昂贵、复杂的软件(想想“生产工厂控制”),你的客户对许可就会相当漫不经心(换句话说,“会购买一个副本(如果需要的话破解它)并在 50 台机器上运行它”如果他们能逃脱惩罚”),并且诉讼是不切实际的(花费太长时间,没有太多证据,结果不确定),这可能会有用。 (我没有说简单,是吗?)
Probably the most foolproof way of licensing (when done right) is through something the user physically has - some kind of hardware dongle.
Of course, it has also numerous disadvantages:
if(dongle_ok()) { do_stuff() }
is an invitation for crackers to patch that over toif (1) { do_stuff() }
...For most programs, the disadvantages far outweigh the advantages; however, if you're making expensive, complex software (think "production plant control"), your clients are rather cavalier about licensing (in other words, "would buy a single copy (crack it if necessary) and run it on 50 machines if they could get away with it"), and lawsuits are impractical (take too long, you don't have much evidence, uncertain outcome), this may be useful. (I didn't say simple, did I?)
他们将其保存在任何可能的地方:秘密文件、秘密注册表项。有一些商业产品提供这种保护,例如 asprotect、armadillo 等。
They save it wherever they can, secret files, secret registry keys. There are commercial products that offer this kind of protection, like asprotect, armadillo, etc.
有些产品会利用ADS(备用数据流)并将数据隐藏在不同的地方。
其他人会留下“rootkit”咳嗽索尼。
另外,有些会创建无法轻松删除的特殊注册表项,例如
有时取决于开发商的谨慎程度。
Some products will utilize ADS (Alternate Data Streams) and hide the data in various places.
Others will leave behind "rootkits" cough SONY.
Also some will create special registry entries that cannot be delete easily, such as entries with NULLs in the name.
It sometimes depends on how scrupulous the developer is.
还可以尝试隐藏文件或文件夹 - 大多数用户不知道显示隐藏的文件和文件夹。然后你就可以把它放在任何地方了。 C:/WINDOWS 有时是一个不错的选择,因为当您第一次单击它时,会出现一个愚蠢的窗口,上面写着“危险!请勿编辑此文件夹中的任何内容,否则您的操作系统会搞砸!”这将对外行人隐藏大部分内容,但让我们面对事实,您并没有对任何活跃在堆栈溢出上的人隐藏任何内容。 :)
Could also try making the file or folder hidden - most users don't know to reveal hidden files and folders. Then you can put it anywhere really. C:/WINDOWS is sometimes a good choice because of that silly window that shows up when you click it for the first time that says "DANGER! DO NOT EDIT ANYTHING IN THIS FOLDER OR YOUR OS WILL MESS UP!" This will hide most anything from the lay man, but let's face the facts, you're not hiding anything from anyone that is active on stack overflow. :)