浅谈软件的破解与保护
摘要:保护知识产权,抵制盗版软件,是目前中国软件业所面临的迫切问题。目前绝大多数软件都采取了加密技术来应对,本文分析了软件破解中几个重要的专业术语和常见的软件破解方法,并具体介绍了软加密和硬加密技术。
Abstract: the protection of intellectual property rights, boycott pirated software, is one of the pressing problem facing China's software industry. By far the most software take encryption technology to deal with, this paper analyzes the software to crack a few important terms and common software decoding method, and introduces the software encryption and hardware encryption technology.
关键词:知识产权,软件加密,软件破解
Keywords: intellectual property, software encryption software to crack 1、引言 1, the introduction
开发软件时,尤其当用到商业用途时,注册码和激活码是非常重要的,未注册的用户会加上某些限制,如使用天数,延迟,未注册画面等等。但是现在的软件破解技术十分强大,各种国内外大型软件都有注册机
http://www.tamdjx.net/ http://www.lwylbls.com/
制,却同时也不断地被破解,国家一再加大力度,打击非法软件出版物,扶持正版软件,但实际效果并不理想。大多的软件商选择了购买加密产品或者加密技术来保护自己的软件,软件保护一般分为软加密和硬加密。
When developing software, especially when used in commercial purposes, registration code and the activation code is very important, unregistered users will add some limitations, such as using the number of days of delay, unregistered images and so on. But now the software decoding technology is very strong, all kinds of domestic and international large software has registered mechanism, but also being cracked and state has repeatedly, to crack down on illegal publications, software support the genuine software, but the actual effect is not ideal. Most vendors chose to buy encryption or encryption technology to protect their own software products, software protection is generally divided into software encryption and hardware encryption. 2、常见的软件破解方法
2, the common software decoding method 首先我们来了解一下破解中几个重要的专业术语。
First of all, we learn about the crack of several important terms. (1)断点,所谓断点就是程序被中断的地方,中断就是由于有特殊事件发生,计算机暂停当前的任务,转而去执行另外的任务,然后再返
http://www.lcjcgy.com/ http://www.fclqmm.com/
回原先的任务继续执行。解密的过程就是等到程序去获取我们输人的注册码并准备和正确的注册码相比较的时候将它中断下来,然后我们通过分析程序,找到正确的注册码。
(1) a breakpoint, a breakpoint is program is interrupted, interruption is due to special events, computer stop the current task and to perform other tasks, and then returned to continue with the original task. Decryption process is to wait until the program to get our registration code input and preparing when compared with the correct registration code will it break down, through the analysis procedure, and then we find the correct registration code.
(2)领空,所谓程序的领空,就是程序自己的领土地盘,也就是我们要破解的程序自己程序码所处的位置。每个程序的编写都没有固定的模式,所以我们要在想要切人程序的时候中断程序,就必须不依赖具体的程序设置断点,也就是我们设置的断点应该是每个程序都会用到的东西。
Airspace, (2) the airspace, the so-called program is the program your territory, which is we need to program their code position of crack. Each program writing all have no fixed pattern, so we're going to want to cut people program interrupt program, you must not depend on the specific program to set breakpoints, namely we should set the breakpoint is used in every program.
(3)API,即Application Programming Interface的简写,我们叫应用
http://www.tamdjx.net/ http://www.lwylbls.com/
程序编程接口,是一个系统定义函数的大集合,它提供了访问操作系统特征的方法。API包含了几百个应用程序调用的函数,这些函数执行所有必须的与操作系统相关的操作,如内存分配、向屏幕输出和创建窗口等,WINDOWS程序以API为基础来实现和系统打交道。无论什么样的应用程序,其底层最终都是通过调用各种API函数来实现各种功能的。
(3) API, the Application Programming Interface of the abbreviations, we called the Application Programming Interface, is a collection of defined function, a system which provides access to operating system features of the method. The API contains hundreds of application calls the function, these functions to perform all necessary operations related to operating systems, such as memory allocation, such as output to the screen and the creation of WINDOWS, WINDOWS program based on the API to implement the deal and system. No matter what kind of application, its bottom end is through various API function call to realize various functions. 了解了以上三个专业术语后,我们看下基本的软件破解方法。 After understanding the above three terms, we look at the basic of software decoding method.
2.1暴力破解法。这是最常见的也是最简单的破解方法,破解者直接利用编辑工具<例如ULTRAEDIT-32>对可执行文件进行修改,也就是说通过修改可属性程序的源文件来达到破解目的。某些元件在验证
http://www.lcjcgy.com/ http://www.fclqmm.com/
用户注册信息和注册码时候,如果用户输人的信息与软件通过的算法生成的注册码相等,程序就会注册成功,否则就会注册失败。 2.1 the brute force method. This is the most common is also the most simple method, crack jailbreakers directly using the editing tool (for example application ULTRAEDIT - 32 > modify executable file, that is to say by modify the program source file can be attribute to achieve purpose. Some components in authenticating the user registration information and the registration code, if the user input information and software registration code generated by the algorithm are equal, program will be registered successfully, registered or it will fail.
2.2利用算法注册机。算法注册机是要在分析了软件的注册码算法的基础上,制作出来的一种可以自动生成软件注册码的程序。所以软件的算法很重要,一般软件作者自己也编写,方便软件的销售使用。这类软件加密的特点是一个注册码只能在一台电脑上使用,像和电脑进行了一对一的绑定。使用步骤是首先运行试用的软件,得到本台机器的软件机器码,再用算法注册机算号注册,然后用算法注册机直接算出合适的注册码,最后用算出来的注册码直接注册。
2.2 registered machine using the algorithm. Algorithm is registered machine to the analysis of the software registration code algorithm, on the basis of making out a kind of can automatically generate software registration code of the program. So it's very important to
http://www.tamdjx.net/ http://www.lwylbls.com/
the algorithm of the software and general software the author himself to write, to cater for the needs of software sales. This software encryption feature is a registration code can only be used on a computer, like one-on-one binding and computer. Use step is first run the trial software, to get this machine's software machine code, reoccupy algorithm registration machine number is registered, then use algorithm registration machine directly calculate the appropriate registration code, the final register directly with calculated the registration code.
2.3利用内存破解。我们知道所有正在运行的程序的数据,全部都要加载到内存中去,软件在进行注册码认证的时候会有个比较的过程,所以我们只须知道所要破解软件的注册码的内存地址,就达到目的了。这种方法的优点是无须花大力气掌握软件注册码的算法,非常节省编写内存注册机的时间。步骤是先加载内存注册机,再通过它去获得内存中软件的真实注册码,或修改内存中软件相关的某些数据,来达到破解软件的目的。主要有2种方式,第一种直接从内存中得到注册码,第二种在内存中模拟已注册程序的运行环境。
2.3 use of memory. We know all running applications, all to be loaded into memory, software registration code certification of time will have a process, so we just have to know what to solve software registration code memory address, to the end. The advantage of this approach is no effort to master the software registration code
http://www.lcjcgy.com/ http://www.fclqmm.com/
algorithm, very save write memory register machine time. Registered machine, the first step is to load the memory through it again to get real memory software registration code, or change the memory in the software related to some of the data, to achieve the goal of software. Mainly has two ways, first get registration code directly from memory, the second analog registered program running environment in memory.
2.4补丁破解法和文件注册法。补丁破解法是指用相关的补丁程序来修改软件,以达到破解软件的目的。此方法一般是破解软件的验证注册码或时间,基本上都是修改原程序的判断语句。比如程序试用期是一个月,就可以把这个修改掉,来达到无限使用的目的。文件注册法就是把软件的注册内容放到一个文件里,以方便自己或别人用它来注册,主要有注册表导人和注册文件导人两种方式。
The 2.4 patch and file registration method. Patch crack method refers to the patch with related to modify the software, to achieve the purpose of software. Validation of this method is usually cracked software registration code or time, basically is to modify the original program statement. Probation period is one month such as procedure, we can drop this change, to achieve the purpose of unlimited use. File registration method is to put the software registration content to a file, use it to register for yourself or others, are mainly guide registry and the registration file guide in two ways.
http://www.tamdjx.net/ http://www.lwylbls.com/
3、常见的软件保护方法
3, the common software protection method
3.1注册码。软件的注册码一般都是一机一个,不能重复。下面我们来看看如何实现的。
3.1 registration code. Software registration code is commonly used one, can not repeat. Let's look at how to implement.
第一步根据硬盘卷标和CPU序列号,生成机器码,首先编写public static string GetDiskVolumeSerialNum-ber()函数取得设备硬盘的卷标号,其次编写public static string getCpu()函数获得CPU的序列号,最后生成机器码,函数如下:
First step according to the hard disk volume label and CPU serial number, generated machine code, write the public static string GetDiskVolumeSerialNum - ber () function to obtain equipment hard disk volume label and then write a public static string getCpu () function to obtain the serial number of the CPU, the generated machine code, function is as follows:
String Number; String public static string getsoftNum() String Number; String public static String getsoftNum ()
{strNum-=getCpu+GetDiskVolumeSerial-strsoftNum=strNum.Substring(0, 24);//从生成的字符串中取出前24个字符做为机器码return strsoftNum; }
http://www.lcjcgy.com/ http://www.fclqmm.com/
{strNum + GetDiskVolumeSerial - strsoftNum = - = getCpu strNum. Substring (0, 24); / / removed from the generated string before 24 characters as the machine code return strsoftNum; }
第二步根据机器码生成注册码,需要编写public static string getRegistNum()函数来实现。
The second step according to the generated machine code registration code, you need to write the public static string getRegistNum () function to implement.
第三步。检查注册状况,若没有注册,可自定义试用天数,延迟,未注册画面等等,可编写private void CheckRegist0 Cpl数来实现。 The third step. Check registration status, if not registered, customizable days trial, delay, unregistered images, and so on, can write private void CheckRegist0 Cpl number.
3.2软加密。所谓软加密就是不依靠特别硬件来实现的对软件的保护技术。当前国际上比较通用的软件都采取软加密的方式,例如微软的windows系统、杀毒软件等,它的最大优势在于极低的加密成本。目前主要有密码法、计算机硬件校验法、钥匙盘法等。目前比较流行的是使用外壳,外壳分为压缩壳和加密壳,其中压缩壳的保护性比较弱,所以一般采用加密壳,其原理是利用堆栈平衡原理,修改程序人口处代码,使其跳转到壳代码执行解密程序,将原程序代码解密后跳回原程序的OEP继续执行。目前比较强的加密壳采用的是动态解密代码、SMC , IAT加密技术,程序在运行过程中动态解密代码,执行完毕后
http://www.tamdjx.net/ http://www.lwylbls.com/
立刻删除,并且对IAT加密,当需要调用API时用解密算法算出API的实际地址来调用,更有甚者,壳里有壳。目前常见的比较强的5大壳有:( I ) EncryptPE,其特点是对IAT加密比较强,( 2 ) ASProtect,其特点是采用多层SEH,很容易把人转晕,( 3) ACProtect,其特点是采用stolen code的办法,( 4 ) Armadillo,其特点是双进程互相检测,(5)themida,其特点是采用虚拟机技术。好的加密效果在于让盗版者在破解被保护的软件时,付出巨大的代价,耗费极大的时间精力,最终被迫放弃攻击。
3.2 soft encryption. The so-called soft encryption is not rely on special hardware to achieve the protection of software technology. Comparison on current international common software is soft encryption, such as Microsoft's Windows system, anti-virus software, etc., its biggest advantage is the low cost of encryption. At present mainly has password, computer hardware calibration method, key disk method, etc. At present more popular is the use of shell, shell and encrypted shell shell is divided into compression, the compression shell protective weaker, so commonly used encryption shell, its principle is to use the stack balancing principle, modify the program code, the population make the jump to shell code execution decryption process, the original program code decrypted OEP continue jumping back to the original program. Presently the stronger encryption USES a dynamic decryption code,
http://www.lcjcgy.com/ http://www.fclqmm.com/
SMC, IAT encryption technology, the application in the process of running dynamic decryption code, executed immediately after deletion, the IAT and encryption, when need to call the API with decryption algorithm to calculate the API to invoke the actual address, what is more, the shell has a shell. At present common stronger 5 shells are: (I) EncryptPE, its characteristic is the IAT stronger encryption, (2) the ASProtect, its characteristic is to use multilayer SEH, it is easy to turn people dizzy, (3) ACProtect, its characteristic is using stolen code method, (4) the Armadillo, characterized by a dual process testing each other, (5) themida, its characteristic is using virtual machine technology. Good encryption effect is to make pirates in deciphering the protected software, pay a heavy price, cost a great deal of time and effort, finally forced to give up.
3.3硬加密。硬加密就是我们所说的加密狗或加密锁,是一种插在计算机USB口或并口上的软硬件结合的加密产品,目前绝大部分都是USB口形式,是基于硬件保护技术,其目的是通过对软件与数据的保护防止知识产权被非法使用,是保证高档软件在市场生命周期中免受盗版侵害的功能强大的工具。加密狗一般都有几十或几百字节的非易失性存储空间可供读写,现在较新的狗内部还包含了单片机。软件开发者可以通过接口函数和软件狗进行数据交换,来检查软件狗是否插在接口上。加密狗内置的单片机里包含有专用于加密的算法软件,
http://www.tamdjx.net/ http://www.lwylbls.com/
该软件被写人单片机后,就不能再被读出。这样,就保证了加密狗硬件不能被复制。同时,加密算法是不可预知、不可逆的。加密算法可以把一个数字或字符变换成一个整数,如DConvert (6)=67876,DConvert(X)=34567 0
3.3 hardware encryption. Hard is what we call encryption dog or can, is a kind of plug on the computer USB port or parallel port encryption products, combined with the hardware and software of the vast majority is USB port form, is based on the hardware protection technology, its purpose is to through to the software and data protection to prevent the illegal use of intellectual property rights in, is to ensure that high-grade software life cycle in the market from the powerful tool of piracy. Encryption dog usually have tens or hundreds of gigabytes of nonvolatile storage space is available for read and write, and now a new dog inside also contains a single chip microcomputer. Software developers can through the interface functions and software dog for data exchange, to check the dongle is plugged on the interface. Dongle built-in single-chip microcomputer contains is dedicated to software encryption algorithm, the software is written after single chip microcomputer, it can't be read. Thus guarantees the dongle hardware cannot be copied. At the same time, the encryption algorithm is unpredictable and irreversible. Encryption algorithm
http://www.lcjcgy.com/ http://www.fclqmm.com/
can convert a numeric or character into an integer, such as DConvert (6) = 67876, DConvert (X) = 0 34567 4、结束语 4, the conclusion
软件破解和软件加密就是矛和盾的关系,好的加密效果在于让盗版者在破解被保护的软件时,付出巨大的代价,耗费极大的时间精力,最终被迫放弃攻击。最后我们要认识到软件破解是不道德的,是违法《计算机软件保护条例》的,现如今软件的大众化、市场化,低价化,也让我们有机会有能力去使用正版软件,所以我们要提高觉悟,力所能及的不使用盗版,以实际行动支持中国的软件行业发展。
Software and software encryption is spear and shield, the relationship between good encryption effect is to make pirates in deciphering the protected software, pay a heavy price, cost a great deal of time and effort, finally forced to give up. We finally realize that software cracking is immoral, it is illegal to the computer software protection ordinance, nowadays software's popularization, marketization, DiJiaHua, also let us have the opportunity to have the ability to use legitimate software, so we should raise awareness, can not use pirated, take concrete actions to support China's software industry development.
因篇幅问题不能全部显示,请点此查看更多更全内容