加密软件VMProtect教程:序列号格式阐述

VMProtect是新一代软件保护实用程序。VMProtect支持德尔菲、Borland C Builder、Visual C/C++、Visual Basic(本机)、Virtual Pascal和XCode编译器。

同时,VMProtect有一个内置的反汇编程序,可以与Windows和Mac OS X可执行文件一起使用,并且还可以链接编译器创建的MAP文件,以快速选择要保护的代码片段。

为了轻松实现应用程序保护任务的自动化,VMProtect实现了内置脚本语言。VMProtect完全支持Windows系列的32/64位操作系统(从Windows 2000开始)和Mac OSX(从版本10.6开始)。重要的是,无论目标平台如何,VMProtect都支持所有范围的可执行文件,即Windows版本可以处理Mac OS X版本的文件,反之亦然。

序列号结构

序列号由块组成。每个区块从一个标识符字节开始,表示该区块的内容和可能的长度。最后一个区块有255个标识符,包含除最后一个区块外的序列号的校验。

根据块的类型,它可以有恒定的或可变的长度。在后一种情况下,长度在块标识符之后的字节中指定。每个区块的确切格式在下面描述。

区块格式

IDNameSize (byte)DescriptionExample
0×01Version1该块包含一个版本的序列号,1字节大小。该版本应是1。01 01
0×02User name1 + N该块包含一个UTF-8编码的用户名。在用户名之前,有1个字节保存着用户名的长度。因此,一个用户名的总长度不能超过255字节。不需要尾部的0。02 04 4A 5F 48 4E
0×03E-Mail1 + N该块包含一个UTF-8编码的用户的电子邮件。在电子邮件之前,有1个字节用来表示长度。因此,一封电子邮件的总长度不能超过255字节。不需要尾部的0。03 07 61 40 62 2E 63 6F 6D
0×04Hardware identifier1 + N该块包含由VMProtectGetCurrentHWID()函数返回的硬件标识符。该函数返回一个base-64的字符串。该字符串的解码版本被放到序列号中。数据块的长度应是4的倍数,数据块前有一个长度字节。最大的数据块长度是32字节。04 08 E1 E2 E3 E4 A1 A2 A3 A4
0×05License expiration date4该区块包含序列号过期日期 日期格式描述如下。05 01 0A 07 DA
0×06Maximum operation time1该块包含1个字节,保存程序可以运行的时间(分钟)。因此,最大的时间可以是255分钟。06 05
0×07Product code8该块包含一个产品代码--由VMProtect创建的8个字节,与产品参数一起导出。这些数据是以base-64编码导出的,在放到序列号之前必须解码为一个字节数组。该数组的大小应正好是8个字节。 若缺失,受保护的程序将不能正常工作。07 01 02 03 04 05 06 07 08
0×08User data1 + N该块最多包含255字节的自定义用户数据。许可证系统不分析这些数据,当调用VMProtectGetSerialNumberData()函数时,会返回这些数据。在数据块之前,有一个字节保存着用户数据的大小。08 05 01 02 03 04 05
0×09Maximum build date4该块包含应用程序的最大构建日期。其格式描述如下。09 01 0A 07 DA
0xFFChecksum4该区块包含序列号校验和。该区块位于最后一个区块之前,校验和是针对之前所有区块计算的。下面描述了校验和的计算机制。FF 01 02 03 04

日期存储格式
日期以双字的形式存储在序列号中 - 0xYYYYMMDD。高阶字包含年,低阶字包含日和月。字节遵循小尾数表示法--从低到高。如果有一个指向记录的第一个字节的指针,可以用下面的代码读取或写入日期:

byte *pDate = 0xNNNNNN; // date address

*(DWORD *)pDate = (2010 << 16) | (10 << 8) | 1; // October 1, 2010

DWORD dwExp = *(DWORD *)pDate;

校验和计算

序列号的校验和是使用SHA-1散列算法计算的。其结果是五个32位的字组成。第一个字既被用作序列号的校验和又是小端数(从低到高)。SHA-1散列的字符串表示法使用的是Big Endian - 数字从高字节到低字节,所以如果SHA-1散列是由字符串函数生成的(比如在PHP中),散列的前四个字节应颠倒过来。

其他信息

许可证系统会忽略那些编号不在上面的区块。在较新的版本中可能会增加新的区块。我们不建议使用非占用的标识符创建新的区块! 首先,这可能使密钥在较新版本的授权系统中失去功能。其次,受保护的程序无论如何也无法读取这些区块的值。要在密钥中存储额外的信息,请通过用户数据字段来代替。


序列号没有SALT,这是一种随机信息,旨在提供相同输入数据的密钥。这个任务是强加给加密算法的。例如,在向一个组织出售一系列密钥时,你可以在用户名字段中添加单独的索引("公司 "LLC,10个密钥中的1个),或者以任何适当的格式将这些信息插入到用户数据字段中。

以上便是关于几个秘钥生成器的分享,如果您有任何疑问,欢迎在评论区留言~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
What is VMProtect? VMProtect protects code by executing it on a virtual machine with non-standard architecture that makes it extremely difficult to analyze and crack the software. Besides that, VMProtect generates and verifies serial numbers, limits free upgrades and much more. VMProtect Features Here you can find the description of the most important features of VMProtect, some screenshots and other useful information. For the full list of supported features, see the comparison chart. Supported Files And Formats VMProtect supports both 32 and 64-bits executable files, dynamically loaded libraries and drivers. This includes screensavers, Active-X components, BPL libraries and other files in PE-format. Protected files are run on almost any version of Windows, even old Windows 95! However, licensing feature requires at least Windows 2000. VMProtect doesn’t support .NET executables. Serial Numbers The Ultimate edition of VMProtect allows to add serial numbers to the protected application with minimal efforts. The feature is supported by PayPro Global e-commerce provider, so you even don’t need to setup your own serial number generator (of course, you can do that if you really need). Licensing feature allows to limit the period of free updates, set the time of life of serial number, prevent the code execution without serial numbers and much more. Any serial number can be blocked and newly protected files will not accept it. User Interface VMProtect features two modes of the user interface: simple and expert. Simple mode allows to easily pick functions for protection, adjust options and get the protected file with just a few mouse clicks. Expert mode is for advanced users, it shows assembly code, allows to write scripts, bundle DLLs and much more. It also features more settings on the “Options” tab. Console Version The Professional and Ultimate editions of VMProtect have a console version that supports command line parameters and can be used in automatic building process. It fully supports scripts, watermarks, serial numbers and all the other features of VMProtect.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值