CN102930005A - Method and device for binding file in host file - Google Patents
Method and device for binding file in host file Download PDFInfo
- Publication number
- CN102930005A CN102930005A CN2012104223851A CN201210422385A CN102930005A CN 102930005 A CN102930005 A CN 102930005A CN 2012104223851 A CN2012104223851 A CN 2012104223851A CN 201210422385 A CN201210422385 A CN 201210422385A CN 102930005 A CN102930005 A CN 102930005A
- Authority
- CN
- China
- Prior art keywords
- file
- host
- bundled
- information
- files
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种在宿主文件中捆绑文件的方法,宿主文件包括多个以一定顺序排列的用于存储数据的节,该方法包括:将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件,并生成捆绑文件的配置信息;将捆绑文件以及配置信息存储在宿主文件的最后一个节中;根据捆绑文件以及配置信息,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。根据本发明的在宿主文件中捆绑文件的方法和相应的装置,可以在宿主文件的最后一个节中捆绑任意长度的文件,由此解决了现有技术中只能捆绑零散的小文件,且由于宿主文件头部的信息量过于集中而可能导致报错的问题,取得了能够捆绑任意长度的大文件,且不易被报错的有益效果。
The invention discloses a method for binding files in a host file. The host file includes a plurality of sections arranged in a certain order for storing data. The method includes: converting the files to be bound into a format corresponding to the format of the host file The bundle file, and generate the configuration information of the bundle file; store the bundle file and configuration information in the last section of the host file; modify the structure information of the last section of the host file and the structure of the host file according to the bundle file and configuration information information. According to the method and corresponding device for bundling files in the host file of the present invention, files of any length can be bundled in the last section of the host file, thereby solving the problem of only bundling small scattered files in the prior art, and due to The amount of information in the header of the host file is too concentrated, which may lead to the problem of error reporting, and the beneficial effect of being able to bundle large files of any length and not being easily reported is achieved.
Description
技术领域technical field
本发明涉及通信领域,具体涉及一种在宿主文件中捆绑文件的方法及装置。The invention relates to the communication field, in particular to a method and device for bundling files in a host file.
背景技术Background technique
文件捆绑又可以称为文件隐藏,具体做法是在一个文件中捆绑其他的文件,以达到减少文件个数或隐藏部分文件的效果。其中,捆绑其他文件的文件称为宿主文件,被捆绑到宿主文件中的文件称为捆绑文件。File bundling can also be called file hiding. The specific method is to bundle other files in one file to achieve the effect of reducing the number of files or hiding some files. Wherein, the file bundled with other files is called a host file, and the file bundled into the host file is called a bundled file.
由于PE文件结构本身存在着很多冗余空间,因此,PE文件经常作为宿主文件,在其中捆绑其他文件。PE文件存在的通常比较大的空闲空间为:(1)相邻节表之间由于数据对齐所产生的冗余空间;(2)PE文件的最末的节表之后由于数据对齐产生的冗余空间。(3)PE结构中的DOS Stub是为DOS程序预留的,其只有当该文件在在DOS下执行时,才会发挥真正的作用。因此,在Windows平台下,DOS Stub完全没有作用,可以利用这部分的内容用来隐藏文件内容。(4)PE文件结构中的很多字段作为保留存在或者对可执行程序的执行没有影响,这部分的空间也可以用来隐藏文件内容,例如PE文件中的以下结构:MajorLinkerVersion、MinorLinkerVersion、ajorOperatingSystemVersion、MinorOperatingSystemVersion、CheckSum、SizeOfCode、SizeOfInitializedData以及SizeOfUninitializedData等。目前,在PE文件中捆绑其他文件时,首先需要寻找PE文件中的冗余空间,并计算出每个冗余空间的位置和大小,图1示出了对PE文件的冗余空间进行计算后得到的结果。从图1中可以看到,寻找到的PE文件中的冗余空间共有8处,其中,DOS Stub部分的空闲空间为264B,节表和节之间的空闲空间为3280B,最后一个节后面的空闲空间为3328B,另外,reloc(重定位表信息)节、rsrc(资源)节、idata(导入文件名表)节、rdata(只读的初始化数据)节以及text(.exe或.dll文件的可执行代码)节中也都存在着冗余空间,全部冗余空间的大小总共为17488B。Because there is a lot of redundant space in the PE file structure itself, PE files are often used as host files, in which other files are bundled. The usually relatively large free space in the PE file is: (1) the redundant space generated by data alignment between adjacent section tables; (2) the redundancy generated by data alignment after the last section table of the PE file space. (3) The DOS Stub in the PE structure is reserved for DOS programs, and it will only play a real role when the file is executed under DOS. Therefore, under the Windows platform, DOS Stub has no effect at all, and this part of the content can be used to hide the file content. (4) Many fields in the PE file structure are reserved or have no effect on the execution of the executable program. This part of the space can also be used to hide the file content, such as the following structures in the PE file: MajorLinkerVersion, MinorLinkerVersion, ajorOperatingSystemVersion, MinorOperatingSystemVersion , CheckSum, SizeOfCode, SizeOfInitializedData, SizeOfUninitializedData, etc. At present, when bundling other files in a PE file, it is first necessary to find the redundant space in the PE file, and calculate the position and size of each redundant space. Figure 1 shows that after calculating the redundant space of the PE file The results obtained. As can be seen from Figure 1, there are 8 redundant spaces in the found PE file, among which, the free space in the DOS Stub part is 264B, the free space between the section table and the section is 3280B, and the space after the last section is The free space is 3328B. In addition, the reloc (relocation table information) section, rsrc (resource) section, idata (import file name table) section, rdata (read-only initialization data) section and text (.exe or .dll file can Executing code) sections also have redundant space, and the size of all redundant spaces is 17488B in total.
然后,根据冗余空间的总数量以及每个冗余空间的大小,将捆绑文件分割成若干个指定大小的子文件,其中,子文件的个数可以小于或等于冗余空间的总数量,子文件的大小与冗余空间的大小基本一致。Then, according to the total amount of redundant space and the size of each redundant space, the bundled file is divided into several sub-files of specified size, wherein the number of sub-files can be less than or equal to the total amount of redundant space, and the sub-files The size of the file is basically the same as the size of the redundant space.
最后,将分割后的各个子文件按一定的算法分配到PE文件的冗余空间中。Finally, the divided sub-files are allocated to the redundant space of the PE file according to a certain algorithm.
但是,采用上述方式时,由于PE文件结构中的冗余空间容量较小且不连续,因此,比较适合对零散的小文件进行捆绑,通常无法对体积较大的文件进行捆绑。而且,由于PE文件结构中的冗余空间基本上都集中在PE文件的头部,因此,导致捆绑文件全部集中在PE文件的头部,信息量过于集中,因此,很容易被格式检查工具检测为异常进而报错,从而出现误报的情况。However, when the above method is adopted, since the redundant space capacity in the PE file structure is small and discontinuous, it is more suitable for bundling scattered small files, and usually cannot be bundled for larger files. Moreover, since the redundant space in the PE file structure is basically concentrated in the header of the PE file, all the bundled files are concentrated in the header of the PE file, and the amount of information is too concentrated, so it is easy to be detected by the format checking tool For abnormalities and then report errors, resulting in false positives.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的在宿主文件中捆绑文件的方法和相应的在宿主文件中捆绑文件的装置。In view of the above problems, the present invention is proposed to provide a method for bundling files in a host file and a corresponding device for bundling files in a host file, which overcome the above problems or at least partially solve the above problems.
依据本发明的一个方面,提供了一种在宿主文件中捆绑文件的方法,宿主文件包括多个以一定顺序排列的用于存储数据的节,该方法包括:将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件,并生成捆绑文件的配置信息;将捆绑文件以及配置信息存储在宿主文件的最后一个节中;根据捆绑文件以及配置信息,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。According to one aspect of the present invention, a method for bundling files in a host file is provided, the host file includes a plurality of sections arranged in a certain order for storing data, the method includes: converting the file to be bundled into a host file The format of the file corresponds to the bundle file, and generate the configuration information of the bundle file; store the bundle file and configuration information in the last section of the host file; modify the structure information of the last section of the host file according to the bundle file and configuration information And the structural information of the host file.
可选地,将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件的步骤之前进一步包括:对待捆绑的文件内容进行压缩和/或加密处理。Optionally, before the step of converting the file to be bundled into a bundled file corresponding to the format of the host file, it further includes: compressing and/or encrypting the content of the file to be bundled.
可选地,配置信息包括:用于指示捆绑文件是否可执行的参数信息、用于在宿主文件中定位捆绑文件的位置信息,以及用于指示捆绑文件执行时的跳转地址的跳转指令。Optionally, the configuration information includes: parameter information used to indicate whether the bundled file is executable, location information used to locate the bundled file in the host file, and a jump instruction used to indicate a jump address when the bundled file is executed.
可选地,宿主文件还包括多个以一定顺序排列的用于存储节的结构信息的节表,则修改宿主文件的最后一个节的结构信息具体包括:修改宿主文件的最后一个节表中的信息,最后一个节表用于存储最后一个节的结构信息,其中,最后一个节表中的信息包括:节数据的大小,以及节数据的属性。Optionally, the host file also includes a plurality of section tables arranged in a certain order for storing the structural information of the sections, then modifying the structural information of the last section of the host file specifically includes: modifying the last section table of the host file information, the last section table is used to store the structure information of the last section, wherein the information in the last section table includes: the size of the section data, and the attributes of the section data.
可选地,宿主文件的结构信息包括:宿主文件的文件大小以及宿主文件的入口函数。Optionally, the structural information of the host file includes: the file size of the host file and the entry function of the host file.
可选地,将捆绑文件以及配置信息存储在宿主文件的最后一个节中;根据捆绑文件以及配置信息的大小,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息的步骤具体包括:申请一块内存空间,将宿主文件复制到内存空间,在复制的宿主文件的最后一个节中存储捆绑文件以及配置信息;根据捆绑文件以及配置信息的大小,修改复制的宿主文件的最后一个节的结构信息以及复制的宿主文件的结构信息;将修改后的宿主文件复制回磁盘空间。Optionally, the binding file and configuration information are stored in the last section of the host file; according to the size of the binding file and configuration information, the steps of modifying the structural information of the last section of the host file and the structural information of the host file specifically include: Apply for a memory space, copy the host file to the memory space, store the bundle file and configuration information in the last section of the copied host file; modify the structure of the last section of the copied host file according to the size of the bundle file and configuration information information and the structure information of the copied host file; copy the modified host file back to disk space.
可选地,宿主文件为PE文件。Optionally, the host file is a PE file.
根据本发明的另一方面,提供了一种在宿主文件中捆绑文件的装置,宿主文件包括多个以一定顺序排列的用于存储数据的节,该装置包括:转换单元,其将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件,并生成捆绑文件的配置信息;捆绑单元,其将捆绑文件以及配置信息存储在宿主文件的最后一个节中;修改单元,其根据捆绑文件以及配置信息,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。According to another aspect of the present invention, a device for bundling files in a host file is provided, the host file includes a plurality of sections arranged in a certain order for storing data, and the device includes: a conversion unit that converts the The file is converted into a bundled file corresponding to the format of the host file, and the configuration information of the bundled file is generated; the bundled unit stores the bundled file and configuration information in the last section of the host file; the modification unit is based on the bundled file and Configuration information, modify the structure information of the last section of the host file and the structure information of the host file.
可选地,配置信息包括:用于指示捆绑文件是否可执行的参数信息、用于在宿主文件中定位捆绑文件的位置信息,以及用于指示捆绑文件执行时的跳转地址的跳转指令。Optionally, the configuration information includes: parameter information used to indicate whether the bundled file is executable, location information used to locate the bundled file in the host file, and a jump instruction used to indicate a jump address when the bundled file is executed.
可选地,宿主文件还包括多个以一定顺序排列的用于存储节的结构信息的节表,则修改单元具体用于:修改宿主文件的最后一个节表中的信息,最后一个节表用于存储最后一个节的结构信息,其中,最后一个节表中的信息包括:节数据的大小,以及节数据的属性。Optionally, the host file also includes a plurality of section tables arranged in a certain order for storing the structural information of the sections, and the modification unit is specifically used to: modify the information in the last section table of the host file, and the last section table uses It is used to store the structural information of the last section, where the information in the last section table includes: the size of the section data, and the attributes of the section data.
可选地,宿主文件的结构信息包括:宿主文件的文件大小以及宿主文件的入口函数。Optionally, the structural information of the host file includes: the file size of the host file and the entry function of the host file.
根据本发明的在宿主文件中捆绑文件的方法和相应的装置,可以在宿主文件的最后一个节中捆绑任意长度的文件,由此解决了现有技术中只能捆绑零散的小文件,且由于宿主文件头部的信息量过于集中而可能导致报错的问题,取得了能够捆绑任意长度的大文件,且不易被报错的有益效果。According to the method and corresponding device for bundling files in the host file of the present invention, files of any length can be bundled in the last section of the host file, thereby solving the problem of only bundling small scattered files in the prior art, and due to The amount of information in the header of the host file is too concentrated, which may lead to the problem of error reporting, and the beneficial effect of being able to bundle large files of any length and not being easily reported is achieved.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的附图标记表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to denote the same parts. In the attached picture:
图1示出了现有技术中对PE文件的冗余空间进行计算后得到的结果示意图;FIG. 1 shows a schematic diagram of results obtained after calculating the redundant space of a PE file in the prior art;
图2示出了根据本发明一个实施例的在宿主文件中捆绑文件的方法的流程图;Fig. 2 shows the flowchart of the method for bundling files in host files according to one embodiment of the present invention;
图3示出了本发明一个实施例的原始的宿主文件以及捆绑了三个捆绑文件之后的宿主文件的结构示意图;以及Fig. 3 shows the structural diagram of the original host file and the host file after three bundled files are bundled according to an embodiment of the present invention; and
图4示出了根据本发明一个实施例的在宿主文件中捆绑文件的装置的结构图。Fig. 4 shows a structural diagram of an apparatus for bundling files in a host file according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
图2示出了本发明实施例提供的一种在宿主文件中捆绑文件的方法。具体地,宿主文件可以是PE文件,或其他与PE文件具有类似结构的文件。在下面的描述中,以宿主文件是PE文件为例进行描述。Fig. 2 shows a method for bundling files in a host file provided by an embodiment of the present invention. Specifically, the host file may be a PE file, or other files having a similar structure to the PE file. In the following description, the host file is a PE file as an example for description.
为了便于理解,先简单介绍一下PE文件的结构。PE文件主要包括若干个以一定顺序排列的用于存储数据的节(section)。其中,每一个节所占用的存储空间相同,但是,每个节中存储的实际数据长度可能不同,因此,每个节中可能都具有用于存储数据的有效空间以及剩余的空闲空间。为了了解每个节中存储数据的情况,需要定义节的结构信息。节的结构信息具体包括:一个节中存储的实际数据长度、节的起始地址等。因此,为了对每一个节的结构信息进行存储,PE文件中还包括若干个以一定顺序排列的用于存储节的上述结构信息的节表(section table)。一般情况下,节表的数量与节的数量一致,每一个节表用于存储对应节的结构信息,例如,第一个节表用于存储第一个节的结构信息,第二个节表用于存储第二个节的结构信息,依此类推。In order to facilitate understanding, first briefly introduce the structure of the PE file. A PE file mainly includes several sections arranged in a certain order for storing data. Wherein, the storage space occupied by each section is the same, but the actual data length stored in each section may be different, therefore, each section may have valid space for storing data and remaining free space. In order to understand the data stored in each section, it is necessary to define the structural information of the section. The structural information of a section specifically includes: the actual data length stored in a section, the starting address of a section, and the like. Therefore, in order to store the structural information of each section, the PE file also includes several section tables arranged in a certain order for storing the above structural information of the section. Generally, the number of section tables is the same as the number of sections. Each section table is used to store the structural information of the corresponding section. For example, the first section table is used to store the structural information of the first section, and the second section table is used to store the structural information of the first section. Used to store structural information for the second section, and so on.
如图2所示,该方法始于步骤S210,在步骤S210中,将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件,并生成捆绑文件的配置信息。As shown in FIG. 2 , the method starts at step S210. In step S210, the file to be bundled is converted into a bundled file corresponding to the format of the host file, and configuration information of the bundled file is generated.
其中,宿主文件(即PE文件)的格式为汇编语言数据结构定义的格式,因此,在本步骤中,首先需要将待捆绑的文件转换为汇编语言数据结构定义格式的文件作为捆绑文件,从而与宿主文件的格式相对应。另外,还需要生成该捆绑文件的配置信息。其中,配置信息可以包括:用于指示捆绑文件是否可执行的参数信息、用于在宿主文件中定位捆绑文件的位置信息,以及用于指示捆绑文件执行时的跳转地址的跳转指令。Among them, the format of the host file (that is, the PE file) is the format defined by the assembly language data structure. Therefore, in this step, it is first necessary to convert the file to be bundled into a file in the format defined by the assembly language data structure as the bundled file, so as to be compatible with The format of the host file corresponds. In addition, configuration information for the bundle file needs to be generated. Wherein, the configuration information may include: parameter information used to indicate whether the bundled file is executable, location information used to locate the bundled file in the host file, and a jump instruction used to indicate a jump address when the bundled file is executed.
可选地,在执行步骤S210之前,还可以进一步对待捆绑的文件内容进行压缩和/或加密处理,以减少待捆绑的文件的体积,或者使待捆绑的文件无法被未授权者读取,以提高安全性。Optionally, before step S210 is performed, the contents of the files to be bundled may be further compressed and/or encrypted, so as to reduce the volume of the files to be bundled, or to prevent the files to be bundled from being read by unauthorized persons, so as to Improve security.
在执行完步骤S210,得到捆绑文件和配置信息之后,执行步骤S220。在步骤S220中,将步骤S210中生成的捆绑文件以及配置信息存储在宿主文件的最后一个节中。After step S210 is executed to obtain the binding file and configuration information, step S220 is executed. In step S220, store the binding file and configuration information generated in step S210 in the last section of the host file.
执行完步骤S220后,继续执行步骤S230。在步骤S230中,根据上述捆绑文件以及配置信息的大小,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。After step S220 is executed, continue to execute step S230. In step S230, the structure information of the last section of the host file and the structure information of the host file are modified according to the size of the bundled file and configuration information.
其中,在原始的宿主文件,即PE文件中,每个节所占用的存储空间都是相同的,且每个节对应的节表中存储了该节的结构信息,如该节存储的实际数据长度等。但是,在执行完步骤S220之后,由于在原始的宿主文件的最后一个节中进一步存储了上述的捆绑文件及配置信息,导致最后一个节的实际数据长度增加了,因此,最后一个节的结构信息也随之发生了改变,进而导致整个宿主文件的结构信息也发生了改变。所以,在步骤S230中需要根据上述的捆绑文件及配置信息的大小,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息,以便与加入捆绑文件后的情况相符。Among them, in the original host file, that is, the PE file, the storage space occupied by each section is the same, and the section table corresponding to each section stores the structural information of the section, such as the actual data stored in the section length etc. However, after step S220 is executed, since the above-mentioned binding file and configuration information are further stored in the last section of the original host file, the actual data length of the last section increases. Therefore, the structural information of the last section It also changed accordingly, which in turn led to a change in the structure information of the entire host file. Therefore, in step S230, it is necessary to modify the structure information of the last section of the host file and the structure information of the host file according to the size of the above-mentioned bundle file and configuration information, so as to match the situation after adding the bundle file.
其中,根据上面的描述可知,宿主文件中还包括多个以一定顺序排列的用于存储节的结构信息的节表,因此,在步骤S230中修改宿主文件的最后一个节的结构信息时,只需修改宿主文件的最后一个节表中的信息即可。另外,宿主文件的结构信息主要包括宿主文件的文件大小以及宿主文件的入口函数,因此,在步骤S230中还需要相应地修改上述信息。Wherein, according to the above description, it can be seen that the host file also includes a plurality of section tables arranged in a certain order for storing the structural information of the section, therefore, when modifying the structural information of the last section of the host file in step S230, only You need to modify the information in the last section table of the host file. In addition, the structural information of the host file mainly includes the file size of the host file and the entry function of the host file. Therefore, the above information needs to be modified accordingly in step S230.
具体地,在执行上述步骤S220和步骤S230时,可通过如下方式实现:首先,申请一块内存空间,将宿主文件复制到该内存空间中,在复制的宿主文件的最后一个节中存储捆绑文件以及配置信息;然后,根据捆绑文件以及配置信息,修改复制的宿主文件的最后一个节的结构信息以及复制的宿主文件的结构信息;最后,将修改后的宿主文件复制回磁盘空间即可。Specifically, when performing the above steps S220 and S230, it can be realized in the following manner: First, apply for a piece of memory space, copy the host file into the memory space, store the binding file and configuration information; then, according to the bundled file and the configuration information, modify the structure information of the last section of the copied host file and the structure information of the copied host file; finally, copy the modified host file back to the disk space.
采用上述方式可以实现对一个或多个文件的捆绑,而且,当捆绑文件的长度较长时,宿主文件最后一个节的长度可以扩展,因此,可以实现对大文件的捆绑。The above method can be used to bundle one or more files, and when the length of the bundled file is relatively long, the length of the last section of the host file can be extended, so the bundle of large files can be realized.
下面以一个优选实施例详细描述一下本发明提供的在宿主文件中捆绑文件的方法,在该方法中,宿主文件为PE文件。该方法包括以下步骤:The method for bundling files in a host file provided by the present invention will be described in detail below with a preferred embodiment. In this method, the host file is a PE file. The method includes the following steps:
步骤一:对待捆绑的文件进行压缩和/或加密处理。Step 1: Compress and/or encrypt the files to be bundled.
在本步骤中,可以对待捆绑的文件的文件内容进行压缩和/或加密两种处理方式。通过压缩可以缩小待捆绑文件的体积,从而更方便地捆绑到宿主文件中。在压缩时,可以采用多种算法,如aplib算法。通过加密可以使待捆绑的文件无法被未授权者读取,从而提高了文件的安全性。In this step, the contents of the files to be bundled can be compressed and/or encrypted. The volume of the file to be bundled can be reduced by compression, so that it can be bundled into the host file more conveniently. When compressing, various algorithms can be used, such as the aplib algorithm. Through encryption, the files to be bundled cannot be read by unauthorized persons, thereby improving the security of the files.
步骤二:将压缩和/或加密处理后的待捆绑文件转换为与宿主文件格式一致(即汇编语言数据结构定义的格式)的文件作为捆绑文件,在下文中,捆绑文件中的内容也称为字节码。Step 2: Convert the compressed and/or encrypted file to be bundled into a file that is in the same format as the host file (that is, the format defined by the assembly language data structure) as the bundled file. Hereinafter, the content in the bundled file is also called a word section code.
可选地,也可以不执行步骤一,直接执行步骤二,尤其是在待捆绑的文件也为PE文件的时候。Optionally, Step 1 may not be performed, and Step 2 may be directly performed, especially when the file to be bundled is also a PE file.
步骤三:生成捆绑文件的配置信息。Step 3: Generate the configuration information of the bundled file.
捆绑文件被捆绑到宿主文件中之后,当读取到捆绑在宿主文件中的捆绑文件时,会将捆绑文件释放出来。为了确定释放出来的捆绑文件是否可执行,以及何时执行,就需要用到本步骤中生成的配置信息。具体的,配置信息通常包括以下内容:用于指示捆绑文件是否可执行的参数信息、用于在宿主文件中定位捆绑文件的位置信息,以及用于指示捆绑文件执行时的跳转地址的跳转指令等。After the bundle file is bundled into the host file, when the bundle file bundled in the host file is read, the bundle file will be released. In order to determine whether the released bundled file is executable and when to execute it, the configuration information generated in this step is needed. Specifically, the configuration information usually includes the following content: parameter information used to indicate whether the bundled file is executable, location information used to locate the bundled file in the host file, and a jump used to indicate the jump address when the bundled file is executed instructions etc.
其中,用于指示捆绑文件是否可执行的参数例如可以通过一个标志变量isInExeSequence实现,如果isInExeSequence=0表示不对释放出来的捆绑文件执行运行操作,即捆绑文件不可执行,如果isInExeSequence=1表示要对释放出来的捆绑文件执行运行操作,即捆绑文件可执行。另外,还可以额外设置一个参数,用来规定释放出来的捆绑文件何时执行,例如立即执行,或3分钟后执行等。用于在宿主文件中定位捆绑文件的位置信息例如可以通过一个表示捆绑文件在宿主文件中的位置偏移的dwFileOffset参数来实现。另外,还可以设置一个dwFileSize参数来表示捆绑文件在宿主文件中所占的大小,同时还可以定义一个name参数来表示捆绑文件的名称。上述的参数可以通过如下的结构体进行定义:Among them, the parameter used to indicate whether the bundled file is executable can be realized by a flag variable isInExeSequence, for example. If isInExeSequence=0, it means that the released bundled file is not executed, that is, the bundled file is not executable. If isInExeSequence=1, it means that the released The resulting bundled file executes the run operation, that is, the bundled file is executable. In addition, an additional parameter can be set to specify when the released bundled file will be executed, such as executing immediately or after 3 minutes. The location information for locating the bundled file in the host file can be realized by, for example, a dwFileOffset parameter indicating the position offset of the bundled file in the host file. In addition, you can also set a dwFileSize parameter to indicate the size of the bundled file in the host file, and you can also define a name parameter to indicate the name of the bundled file. The above parameters can be defined by the following structure:
Typedef structTypedef struct
{{
String name;String name;
BOOL isInExeSequence;BOOL isInExeSequence;
DWORD dwFileOffset;DWORD dwFileOffset;
DWORD dwFileSize;DWORD dwFileSize;
}FILE_BINDED_STRUCT;}FILE_BINDED_STRUCT;
上述的结构体可以存储在捆绑文件中的内容(即字节码)的前面或后面,也可以插入字节码的中间。The above structure can be stored before or after the content (ie bytecode) in the bundle file, or inserted in the middle of the bytecode.
另外,用于指示捆绑文件执行时的跳转地址的跳转指令可以通过E9指令来实现。具体地,可以先将一个操作数为空的E9指令附加到字节码的最后,然后,在后续的步骤中根据实际情况修改E9指令的操作数,从而定义捆绑文件执行时的跳转地址。该跳转地址一般指向与字节码相对应的代码,该代码也存储在宿主文件中,用于具体执行字节码中的数据内容。In addition, the jump instruction used to indicate the jump address when the bundled file is executed can be implemented by the E9 instruction. Specifically, an E9 instruction with an empty operand can be appended to the end of the bytecode, and then, in subsequent steps, the operand of the E9 instruction can be modified according to the actual situation, so as to define the jump address when the bundled file is executed. The jump address generally points to the code corresponding to the bytecode, and the code is also stored in the host file to specifically execute the data content in the bytecode.
步骤四:将宿主文件复制到内存中,并将步骤二和步骤三中生成的捆绑文件和配置信息存储到宿主文件的最后一个节中。Step 4: Copy the host file into memory, and store the bundled file and configuration information generated in Step 2 and Step 3 into the last section of the host file.
可选地,为了在本步骤中更准确地对宿主文件进行定位,先要获得原始的宿主文件的大小,然后,计算宿主文件最后一个节表在文件中的偏移,以便读取最后一个节表中的数据。其中,计算最后一个节表在文件中的偏移时,可以采用如下代码实现:pSectionHeader=(PIMAGE_SECTION_HEADER)((BYTE*)pOptionalHeader+sizeof(IMAGE_OPTIONAL_HEADER));Optionally, in order to more accurately locate the host file in this step, first obtain the size of the original host file, and then calculate the offset of the last section table of the host file in the file, so as to read the last section the data in the table. Among them, when calculating the offset of the last section table in the file, the following code can be used to realize: pSectionHeader=(PIMAGE_SECTION_HEADER)((BYTE*)pOptionalHeader+sizeof(IMAGE_OPTIONAL_HEADER));
nSectionNum=pFileHeader->NumberOfSections;nSectionNum=pFileHeader->NumberOfSections;
for(int i=0;i<nSectionNum-1;i++)for(int i=0;i<nSectionNum-1;i++)
{{
pSectionHeader++;pSectionHeader++;
}其中,pSectionHeader表示最后一个节表在文件中的偏移量,通过上面的方式,即可确定出最后一个节表的位置,并读取其中的数据。具体地,节表中包含的数据包括:表示对应的节中存储的实际数据长度的SizeOfRawData参数,指示节的起始地址的PointerToRawData参数以及表示节的属性值的Characteristics参数。在本步骤中,主要是读取SizeOfRawData参数以及PointerToRawData参数的值,通过PointerToRawData参数可以确定最后一个节的起始地址,结合SizeOfRawData参数即可确定最后一个节中实际存储的数据的结束地址。} Among them, pSectionHeader represents the offset of the last section table in the file. Through the above method, the position of the last section table can be determined and the data in it can be read. Specifically, the data contained in the section table includes: a SizeOfRawData parameter indicating the actual data length stored in the corresponding section, a PointerToRawData parameter indicating the start address of the section, and a Characteristics parameter indicating the attribute value of the section. In this step, the value of the SizeOfRawData parameter and the PointerToRawData parameter is mainly read. The starting address of the last section can be determined through the PointerToRawData parameter, and the end address of the data actually stored in the last section can be determined in combination with the SizeOfRawData parameter.
通过上面的方式,确定出宿主文件的上述相关信息后,就可以根据宿主文件的最后一个节的起始地址和结束地址等信息,在最后一个节中存储捆绑文件和配置信息了。由于原始的宿主文件是存储在磁盘上的,如果直接在磁盘空间对原始的宿主文件进行修改,由于文件中存储的程序内部包含指针,且由于指针的使用容易产生错误,因此,在本实施例中,先将宿主文件复制到内存中,在内存中完成对宿主文件的修改之后再复制回磁盘,由此避免因指针问题而导致的错误。为此,需要先计算原始的宿主文件大小与捆绑文件和配置信息的大小之和,得出捆绑后的宿主文件大小。然后,根据计算出的捆绑后的宿主文件大小申请一块内存空间,将原始的宿主文件复制到该内存空间中,然后将捆绑文件和配置信息存储到复制后的宿主文件的最后一个节中。After the above-mentioned relevant information of the host file is determined through the above method, the bundled file and configuration information can be stored in the last section according to information such as the start address and end address of the last section of the host file. Since the original host file is stored on the disk, if the original host file is directly modified in the disk space, because the program stored in the file contains pointers, and the use of pointers is prone to errors, therefore, in this embodiment , first copy the host file to the memory, and then copy it back to the disk after completing the modification of the host file in the memory, thereby avoiding errors caused by pointer problems. To this end, it is necessary to first calculate the sum of the size of the original host file and the size of the bundled file and configuration information to obtain the size of the bundled host file. Then, apply for a piece of memory space according to the calculated size of the bundled host file, copy the original host file into the memory space, and store the bundled file and configuration information in the last section of the copied host file.
另外,由于宿主文件在磁盘空间中的对齐粒度和内存空间中的对齐粒度有可能不同,因此,当宿主文件在磁盘空间中的对齐粒度和内存空间中的对齐粒度不同时,为了将宿主文件复制到内存空间,还需要进一步计算宿主文件在内存空间中的对齐粒度,为此,可以按照内存空间中的对齐粒度将宿主文件的最后一个节进行对齐,以确定内存中宿主文件的最后一个节的数据长度。具体对齐时,可采用如下代码实现: In addition, because the alignment granularity of the host file in the disk space and the alignment granularity in the memory space may be different, when the alignment granularity of the host file in the disk space and the alignment granularity in the memory space are different, in order to copy the host file To the memory space, it is necessary to further calculate the alignment granularity of the host file in the memory space. To this end, the last section of the host file can be aligned according to the alignment granularity in the memory space to determine the alignment of the last section of the host file in memory. Data length. For specific alignment, the following code can be used to achieve:
其中,在上述代码中,定义了size参数用于指示宿主文件的总长度,ALIGN_BASE用于指示宿主文件在内存空间中对齐时的对齐粒度,返回的结果值ret用于指示将宿主文件按照对齐粒度对齐之后,剩余的数据长度,该剩余的数据长度即为内存中的宿主文件最后一个节的数据长度。 Among them, in the above code, the size parameter is defined to indicate the total length of the host file, ALIGN_BASE is used to indicate the alignment granularity of the host file when it is aligned in the memory space, and the returned result value ret is used to indicate the host file according to the alignment granularity After alignment, the remaining data length is the data length of the last section of the host file in memory.
步骤五:根据捆绑文件以及配置信息的大小,在内存中修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。Step 5: Modify the structure information of the last section of the host file and the structure information of the host file in the memory according to the bundled file and the size of the configuration information.
由于步骤四中在宿主文件中加入了捆绑文件和配置信息,导致原始的宿主文件的相关信息需要进行适应性地修改。首先,由于宿主文件的最后一个节中增加了内容,因此,宿主文件的最后一个节的结构信息需要适应性修改,具体实现时,可以通过修改最后一个节表中表示对应的节存储的实际数据长度的SizeOfRawData等参数的参数值实现,另外,还可以对宿主文件在内存中的起始地址进行修改,同时,还需要在节表中将最后一个节的属性值设置为可执行,可读可写,即0c0000060h。另外,还需要对宿主文件的结构信息进行修改,例如,修改表示宿主文件的文件大小的值,其中,内存中的宿主文件的文件大小通常叫做映像文件大小,用SizeOfImage值表示。同时修改宿主文件的入口函数,即程序入口点AddressEntryPoint,以确定宿主文件的执行开始点。最后,还需要对步骤三中操作数为空的E9指令进行修改,以使得E9指令指向与字节码相对应的代码,以便具体执行字节码中的数据内容。Since the bundled file and configuration information are added to the host file in step 4, the relevant information of the original host file needs to be modified adaptively. First of all, due to the addition of content in the last section of the host file, the structural information of the last section of the host file needs to be modified adaptively. In actual implementation, the actual data stored in the corresponding section can be represented by modifying the last section table In addition, the start address of the host file in memory can also be modified. At the same time, the attribute value of the last section in the section table needs to be set as executable, readable and readable. Write, ie 0c0000060h. In addition, the structural information of the host file also needs to be modified, for example, modify the value representing the file size of the host file, wherein the file size of the host file in memory is usually called the image file size, expressed by the SizeOfImage value. At the same time, modify the entry function of the host file, that is, the program entry point AddressEntryPoint, to determine the execution start point of the host file. Finally, it is also necessary to modify the E9 instruction whose operand is empty in step 3, so that the E9 instruction points to the code corresponding to the bytecode, so as to specifically execute the data content in the bytecode.
步骤六:将修改后的宿主文件从内存中复制回磁盘。Step 6: Copy the modified host file from the memory back to the disk.
通过上面的步骤,就实现了在宿主文件中捆绑其他文件的目的,在释放出宿主文件中包含的捆绑文件后,根据配置信息就可以控制捆绑文件是否可执行以及何时执行。具体地,还可以在一个宿主文件中捆绑多个捆绑文件,这样,在配置信息中还可以进一步定义多个捆绑文件的执行顺序,或者,多个捆绑文件也可以默认为顺序执行。Through the above steps, the purpose of bundling other files in the host file is realized. After releasing the bundled files contained in the host file, it is possible to control whether the bundled files are executable and when to execute them according to the configuration information. Specifically, multiple bundle files can also be bundled in one host file. In this way, the execution order of multiple bundle files can be further defined in the configuration information, or multiple bundle files can also be executed sequentially by default.
图3示出了原始的宿主文件以及捆绑了三个捆绑文件之后的宿主文件的结构示意图,其中,图3的左侧示意出了原始的宿主文件310,图3的右侧示意出了捆绑后的宿主文件320。Fig. 3 shows the structural diagram of the original host file and the host file after binding three bundled files, wherein, the left side of Fig. 3 shows the
另外,在宿主文件,即PE文件中,通常设置有用于存储数据的数据段,以及用于存储代码的代码段,在本实施例中,可以将宿主程序中的数据和代码都放在代码段中存储,从而避免了在数据和代码之间进行频繁地重定位,提高了执行效率。In addition, in the host file, that is, the PE file, there are usually a data segment for storing data and a code segment for storing code. In this embodiment, both the data and code in the host program can be placed in the code segment Stored in the middle, thus avoiding frequent relocation between data and code, and improving execution efficiency.
通过本发明实施例中的方法,可以在宿主文件中捆绑其他的文件,以减少文件体积和发布时系统中的独立文件个数,从而便于管理,且有利于软件的发布以及网上传输。而且,可以将一些特殊意义的文件(例如防止竞争对手破解的、逆向的)进行隐藏。另外,还可以将一系列单独功能的小程序集成到一个可执行文件中,对这一系列的小程序进行顺序执行,使一个可执行程序的执行实现了多个小程序的管道执行,提供了类似于管道命令的另一种实现。Through the method in the embodiment of the present invention, other files can be bundled in the host file, so as to reduce the file size and the number of independent files in the system during release, thereby facilitating management and facilitating software release and online transmission. Moreover, it is possible to hide some files with special meaning (for example, to prevent competitors from cracking and reverse engineering). In addition, a series of small programs with individual functions can also be integrated into an executable file, and the series of small programs are executed sequentially, so that the execution of one executable program realizes the pipeline execution of multiple small programs, providing Another implementation similar to the pipeline command.
而且,本发明最大的特点是,可以捆绑长度较长的文件,由于PE文件的结构特性,可以对最后一个节的长度进行扩展,因此,当捆绑文件和配置信息的长度超出了最后一个节中空闲的存储空间的长度时,可以对最后一个节的存储空间进行扩展,以便容纳下捆绑文件和配置信息,所以采用本方法捆绑文件时不受捆绑文件大小的限制,可以捆绑大文件甚至多个文件,拓宽了应用范围,而且,由于本方法没有在PE文件的文件头中增加过多信息,因而不会被格式检查工具报错。Moreover, the biggest feature of the present invention is that it can bundle files with a long length. Due to the structural characteristics of PE files, the length of the last section can be extended. Therefore, when the length of the bundled file and configuration information exceeds the length of the last section The storage space of the last section can be expanded to accommodate the bundled files and configuration information when the length of the free storage space is longer. Therefore, when using this method to bundle files, it is not limited by the size of the bundled files, and large files or even multiple files can be bundled. file, which broadens the scope of application, and because this method does not add too much information to the file header of the PE file, it will not be reported by the format checking tool.
本发明实施例还提供了一种在宿主文件中捆绑文件的装置,其中,宿主文件包括多个以一定顺序排列的用于存储数据的节。如图4所示,该装置包括:The embodiment of the present invention also provides a device for bundling files in a host file, wherein the host file includes a plurality of sections arranged in a certain order for storing data. As shown in Figure 4, the device includes:
转换单元410,其将待捆绑的文件转换为与宿主文件的格式相对应的捆绑文件,并生成捆绑文件的配置信息;a
捆绑单元420,其将捆绑文件以及配置信息存储在宿主文件的最后一个节中;a
修改单元430,其根据捆绑文件以及配置信息,修改宿主文件的最后一个节的结构信息以及宿主文件的结构信息。A modifying
可选地,配置信息包括:用于指示捆绑文件是否可执行的参数信息、用于在宿主文件中定位捆绑文件的位置信息,以及用于指示捆绑文件执行时的跳转地址的跳转指令。Optionally, the configuration information includes: parameter information used to indicate whether the bundled file is executable, location information used to locate the bundled file in the host file, and a jump instruction used to indicate a jump address when the bundled file is executed.
可选地,宿主文件还包括多个用于存储节的结构信息的节表,则修改单元具体用于:修改宿主文件的最后一个节表中的信息,最后一个节表用于存储最后一个节的结构信息,其中,最后一个节表中的信息包括:节数据的大小,以及节数据的属性。Optionally, the host file also includes multiple section tables for storing structural information of sections, and the modification unit is specifically used to: modify information in the last section table of the host file, and the last section table is used to store the last section structure information, wherein the information in the last section table includes: the size of the section data, and the attributes of the section data.
可选地,宿主文件的结构信息包括:宿主文件的文件大小以及宿主文件的入口函数。Optionally, the structural information of the host file includes: the file size of the host file and the entry function of the host file.
上述的转换单元410、捆绑单元420和捆绑单元430的具体实现方式可参见上述的方法实施例中的描述。For the specific implementation manners of the
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings), as well as any method or method so disclosed, may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的在宿主文件中捆绑文件的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of some or all of the components in the device for bundling files in a host file according to an embodiment of the present invention Function. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210422385.1A CN102930005B (en) | 2012-10-29 | 2012-10-29 | The method of bundled files and device in host file |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210422385.1A CN102930005B (en) | 2012-10-29 | 2012-10-29 | The method of bundled files and device in host file |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102930005A true CN102930005A (en) | 2013-02-13 |
| CN102930005B CN102930005B (en) | 2015-11-25 |
Family
ID=47644803
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210422385.1A Active CN102930005B (en) | 2012-10-29 | 2012-10-29 | The method of bundled files and device in host file |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102930005B (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104298919A (en) * | 2014-09-30 | 2015-01-21 | 珠海市君天电子科技有限公司 | Method and device for identifying whether PE file is resource file |
| CN106295402A (en) * | 2016-08-16 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | The hidden method of a kind of dll file and system |
| CN106650475A (en) * | 2016-12-02 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for hiding SO file |
| CN110795750A (en) * | 2019-10-25 | 2020-02-14 | 苏州浪潮智能科技有限公司 | Document encryption lodging method, system and device |
| CN111326216A (en) * | 2020-02-27 | 2020-06-23 | 中国科学院计算技术研究所 | A fast division method for big data gene sequencing files |
| CN113434863A (en) * | 2021-06-25 | 2021-09-24 | 上海观安信息技术股份有限公司 | Method and device for realizing remote control of host based on PE file structure |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070192761A1 (en) * | 2006-02-15 | 2007-08-16 | Ravi Sahita | Method for adding integrity information to portable executable (PE) object files after compile and link steps |
| CN101504656A (en) * | 2009-03-26 | 2009-08-12 | 成都磐石软件有限责任公司 | Combined execution method for PE document code |
-
2012
- 2012-10-29 CN CN201210422385.1A patent/CN102930005B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070192761A1 (en) * | 2006-02-15 | 2007-08-16 | Ravi Sahita | Method for adding integrity information to portable executable (PE) object files after compile and link steps |
| CN101504656A (en) * | 2009-03-26 | 2009-08-12 | 成都磐石软件有限责任公司 | Combined execution method for PE document code |
Non-Patent Citations (2)
| Title |
|---|
| 李钱等: ""基于PE文件无容量限制的信息隐藏技术研究"", 《计算机应用研究》 * |
| 邵利平: ""基于PE文件格式的信息隐藏技术研究"", 《中国优秀硕士学位论文全文数据库(电子期刊)》 * |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104298919A (en) * | 2014-09-30 | 2015-01-21 | 珠海市君天电子科技有限公司 | Method and device for identifying whether PE file is resource file |
| CN104298919B (en) * | 2014-09-30 | 2017-04-26 | 珠海市君天电子科技有限公司 | Method and device for identifying whether PE file is resource file |
| CN106295402A (en) * | 2016-08-16 | 2017-01-04 | 武汉斗鱼网络科技有限公司 | The hidden method of a kind of dll file and system |
| CN106295402B (en) * | 2016-08-16 | 2020-03-31 | 武汉斗鱼网络科技有限公司 | DLL file hiding method and system |
| CN106650475A (en) * | 2016-12-02 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for hiding SO file |
| CN110795750A (en) * | 2019-10-25 | 2020-02-14 | 苏州浪潮智能科技有限公司 | Document encryption lodging method, system and device |
| CN111326216A (en) * | 2020-02-27 | 2020-06-23 | 中国科学院计算技术研究所 | A fast division method for big data gene sequencing files |
| CN111326216B (en) * | 2020-02-27 | 2023-07-21 | 中国科学院计算技术研究所 | A fast partitioning method for big data gene sequencing files |
| CN113434863A (en) * | 2021-06-25 | 2021-09-24 | 上海观安信息技术股份有限公司 | Method and device for realizing remote control of host based on PE file structure |
| CN113434863B (en) * | 2021-06-25 | 2023-11-24 | 上海观安信息技术股份有限公司 | A method and device for remote control of host based on PE file structure |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102930005B (en) | 2015-11-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102930005B (en) | The method of bundled files and device in host file | |
| US9336001B2 (en) | Dynamic instrumentation | |
| KR101625258B1 (en) | Platform extensibility framework | |
| US10929149B2 (en) | Method and system for updating firmware | |
| US20150058829A1 (en) | Testing a software interface for a streaming hardware device | |
| JP2005129028A (en) | Method for preparing language independent file and language specific resource file for component | |
| TW201237750A (en) | Address generation in a data processing apparatus | |
| CN104321742B (en) | Apparatus and method for providing multi-core programming platform | |
| JP2014525622A (en) | Description of the operating system's native application programming interface using metadata | |
| CN107346268A (en) | Broad sense write operation verification method | |
| EP2511820A1 (en) | Bypassing user mode redirection | |
| CN113553010A (en) | Optical disc file checking method, optical disc recording method and computing device | |
| CN102982073B (en) | File is to the binding method in host file and device | |
| CN101794219B (en) | Compression method and device of .net files | |
| WO2018149157A1 (en) | Method and device for scheduling vcpu thread | |
| EP3837600A1 (en) | System, method and apparatus for executing instructions | |
| US9158550B2 (en) | Caching based operating system installation | |
| CN112949264B (en) | React component property hinting methods, devices, and computing equipment based on VS Code | |
| CN103347059A (en) | Method, client-side and system for realizing user configuration parameter transmission | |
| CN111752620B (en) | Processing method and loading method of kernel module | |
| US20060288019A1 (en) | Flexible data file format | |
| CN117462961A (en) | A non-stop game publishing method, system, equipment and medium | |
| US8661425B1 (en) | Method, apparatus, and computer-readable medium for storing data associated with a firmware program | |
| CN101770368B (en) | Compressing method and compressing device of namespace in .net file | |
| CN113821829B (en) | A method, device and storage medium for data verification |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder |
Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee after: Beijing Qizhi Business Consulting Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
| CP01 | Change in the name or title of a patent holder | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20220329 Address after: 100016 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing Patentee after: Sanliu0 Digital Security Technology Group Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Beijing Qizhi Business Consulting Co.,Ltd. |
|
| TR01 | Transfer of patent right |



