如何保护软件免受系统日期更改? [英] How to protect software from system date-time changes?

查看:215
本文介绍了如何保护软件免受系统日期更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向应用程序添加许可证制度。例如:用户购买许可证1个月,程序到期后(Kinda Anti-Virus风格?)。



问题是应用程序应该运行在可能会或可能无法连接到互联网,所以如何保护日期更改?



将加密文件中的应用程序启动和关闭时间保存到可以更改日期工作(每天8小时的程序正常运行时间,在理想情况下可以将许可证扩展到近300% - 在启动程序之前更改应用程序关闭时间+ 1秒)。

另一个问题 - 有什么办法来保护软件,如 http://en.wikipedia.org/wiki/Deep_Freeze_(软件)? (也许扫描驱动程序?)



编辑:

我目前正在使用智能卡存储许可信息,并将在关键功能上使用代码虚拟器(我知道关于API调用断点和检查传递的数据 - 不需要隐藏数据,只是为了确保事情按计划进行)

解决方案

步骤1:在Windows注册表和文件中以加密格式创建trial_tracker条目。



步骤2:将app install timestamp(yyyy-mm-dd-hh-mm-ss)分配给trial_tracker



每当应用启动时,检查当前系统时间戳是否大于trial_tracker,然后小于预期到期日期




  • 如果是,将trial_tracker更新为当前系统时间戳,继续。


  • 如果没有,则trial_tracker已被篡改或试用期过期。请求用户购买完整版本或退出。




注意:这通过删除Windows注册表项和加密文件(如果他能够找到它们)。
在这种情况下,可以添加进一步的检查。例如,创建辅助Windows注册表项,以检查是否存在主注册表和加密文件。



随着这些,可以应用其他远程检查,这取决于互联网连接(可选)


I would like to add licensing system to application. For example: user buys license for 1 month and after that program expires (Kinda Anti-Virus style?).

Problem is that application is supposed to run in systems which may or may not be connected to internet, so how to protect from date-time changes?

Storing app startup and close times in encrypted file won't work as date can be changed (with program uptime of 8 hours per day, would be possible to extend license to almost 300% in ideal case - change time to app close time + 1 second before launching program).

Another question - is there any way to protect from software like http://en.wikipedia.org/wiki/Deep_Freeze_(software)? (maybe scan drivers?)

EDIT:
I'm currently using smart card to store licensing information and will use code virtualizer on critical functions (I know about making breakpoints on API calls and inspecting passed data - don't need to hide that data, just to ensure things go as planned)

解决方案

Step 1: Create trial_tracker entry in an encrypted format in a windows registry and in file.

Step 2: Assign app install timestamp ( yyyy-mm-dd-hh-mm-ss ) to trial_tracker

Whenever app starts, check if current system timestamp is greater than trial_tracker and less then expected expiry date

  • If yes, update trial_tracker to current system timestamp and continue.

  • If no, trial_tracker has been tampered or trial time expired. Ask user to purchase full version or exit.

Note: User can get away with this by deleting windows registry entry and encrypted file.( if he is able to find them ). In such case, further checks can be added. For example create secondary windows registry entry which checks for existence of primary registry and encrypted file.

Along with these, additional remote checks can be applied which depends on internet connection ( optional )

这篇关于如何保护软件免受系统日期更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆