WO2020177430A1 - 应用加固的方法、装置、计算设备及计算机存储介质 - Google Patents

应用加固的方法、装置、计算设备及计算机存储介质 Download PDF

Info

Publication number
WO2020177430A1
WO2020177430A1 PCT/CN2019/123873 CN2019123873W WO2020177430A1 WO 2020177430 A1 WO2020177430 A1 WO 2020177430A1 CN 2019123873 W CN2019123873 W CN 2019123873W WO 2020177430 A1 WO2020177430 A1 WO 2020177430A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
source code
security
program source
hardened
Prior art date
Application number
PCT/CN2019/123873
Other languages
English (en)
French (fr)
Inventor
汪德嘉
邵根波
钱潇龄
孟啸龙
Original Assignee
江苏通付盾信息安全技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 江苏通付盾信息安全技术有限公司 filed Critical 江苏通付盾信息安全技术有限公司
Publication of WO2020177430A1 publication Critical patent/WO2020177430A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the invention relates to the technical field of application security, in particular to a method, a device, a computing device and a computer storage medium for application reinforcement.
  • the inventor found that the existing SDK hardening solution has the defects of incomplete protection and inability to flexibly combine applications.
  • the present invention is proposed to provide a method, device, computing device, and computer storage medium for application reinforcement that overcome the above problems or at least partially solve the above problems.
  • a method of application reinforcement including:
  • the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file
  • a device for applying reinforcement including:
  • the pre-compiled module is adapted to insert the security SDK into the program source code of the application to be hardened and perform pre-compilation to generate an archive file when the application to be hardened selected by the user is received;
  • the effective information extraction module is adapted to extract effective information of the application to be reinforced from the archive file, and encapsulate the effective information
  • the binding module is suitable for forming the encapsulated effective information and the security SDK into a reinforced security component, and binding the reinforced security component with the program source code;
  • the hardening module is suitable for exporting the program files of the application to be hardened after binding to complete the hardening of the application to be hardened.
  • a computing device including: a processor, a memory, a communication interface, and a communication bus.
  • the processor, the memory, and the communication interface complete mutual communication through the communication bus.
  • the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the aforementioned application hardening method.
  • a computer storage medium wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform operations corresponding to the application hardening method described above.
  • the user only needs to select the application to be hardened, and the client can automatically complete the following hardening process: insert the security SDK into the program source code of the application to be hardened And perform pre-compilation to make the extracted effective information consistent with the final runtime; extract the effective information and encrypt and encapsulate, bind the encapsulated effective information and the security SDK as a reinforced security component to protect the security of the application to be reinforced , So that the attacker can not only crack the SDK or crack the effective information to achieve the role of cracking the application; binding the hardened security component with the program source code of the application to be hardened, and then the hardening functions of the security SDK (such as operating environment detection) ) Combined with the application tamper-proof packaging function to enhance the reinforcement effect.
  • the solution of the present invention is based on the program source code of the application, and performs operations such as integrated packaging and extraction on the basis of the source code,
  • Fig. 1 shows a flowchart of a method for application reinforcement according to an embodiment of the present invention
  • Figure 2 shows a flowchart of a method for application reinforcement according to another embodiment of the present invention
  • Figure 3 shows a flowchart of application reinforcement in a specific embodiment of the present invention
  • Figure 4 shows a functional block diagram of a device for applying reinforcement according to an embodiment of the present invention
  • Fig. 5 shows a schematic structural diagram of a computing device according to an embodiment of the present invention.
  • Workspace Workstation, compilation directory, multiple projects share a compilation directory
  • Project program Project program, including multiple products (Target);
  • a workspace can contain multiple projects, and a project can contain multiple targets.
  • Schemes are different configurations when compiling targets. Each set of configurations corresponds to a scheme.
  • the solution of the present invention can be widely applied to the application reinforcement of various systems.
  • the application reinforcement of the IOS system is mainly used for description. Those skilled in the art should understand that the present invention is not limited thereto.
  • Fig. 1 shows a flowchart of a method for applying reinforcement according to an embodiment of the present invention. As shown in Figure 1, the method includes:
  • Step S101 When the application to be hardened selected by the user is received, the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file.
  • the user when the reinforcement client is started, the user can select the application to be reinforced according to the protection requirements, and after receiving the application to be reinforced selected by the user, the subsequent reinforcement process can be fully automated, which can realize one-click Reinforcement.
  • the client imports and links the security SDK, inserts the security SDK into the program source code of the application to be hardened, and packs the data of the security SDK into the executable file of the project during precompilation.
  • the application binary files before and after the reinforcement are kept consistent, so as to ensure that the executable binary information extracted later (effective information below) is consistent with the final running version, so as to facilitate the accurate judgment of the application after the reinforcement on the anti-tampering level.
  • an archive file is generated, that is, an archive file.
  • the source of the security SDK is not limited in the present invention, nor is it limited to the reinforcement functions included in the security SDK. During specific implementation, those skilled in the art can flexibly choose the source of the security SDK, including different reinforcements. Functional SDK, and flexible opening or closing of the hardening options in the default security SDK.
  • Step S102 Extract effective information of the application to be reinforced from the archive file, and encapsulate the effective information.
  • the solution of the present invention not only relies on the security SDK to protect the application, but also extracts the effective information of the application to be reinforced so as to realize the anti-tampering of the application by comparing the effective information.
  • the effective information of the application to be reinforced is extracted from the archive file obtained after precompilation, the effective information is consistent with the information of the application that has not been tampered with, and the effective information is encrypted and encapsulated so that the effective information cannot be easily Obtained and tampered by attackers.
  • the present invention does not limit the information items of effective information.
  • the valid information may include application name (Bundle Name), signature information, etc.
  • the effective information is extracted and the effective information is encapsulated, so that the effective information is used in application tamper-proof detection.
  • Step S103 The encapsulated effective information and the security SDK are formed into a reinforced security component, and the reinforced security component is bound with the program source code.
  • Binding the encapsulated effective information and the security SDK is used as a hardening security component to protect the security of the application to be hardened, so that an attacker cannot simply crack the SDK or crack the effective information to achieve the purpose of cracking the application.
  • Step S104 After binding, export the program file of the application to be hardened, and complete the hardening of the application to be hardened.
  • the program file of the application to be hardened is exported by compiling, packaging, and exporting, and the exported program file is the hardened application file.
  • the user only needs to select the application to be hardened, and the client can automatically complete the following hardening process: insert the security SDK into the program source code of the application to be hardened and pre-compile it so that The extracted effective information is consistent with the final runtime; the effective information is extracted and encrypted and encapsulated, and the encapsulated effective information is bound with the security SDK as a reinforced security component to protect the security of the application to be reinforced, so that the attacker cannot be single
  • the application can be cracked by cracking the SDK or cracking the effective information; binding the hardened security component with the program source code of the application to be hardened, so that the security SDK's hardening functions (such as operating environment detection) and application tamper-proof packaging functions can be combined Combined to enhance the reinforcement effect.
  • the solution of the present invention is based on the program source code of the application, and performs operations such as integrated packaging and extraction on the basis of the source code, so that it can be more flexibly combined with
  • Fig. 2 shows a flowchart of a method for applying reinforcement according to another embodiment of the present invention. As shown in Figure 2, the method includes:
  • Step S201 When the application to be hardened selected by the user is received, the hardening item selected by the user is received, and the corresponding function item of the security SDK is turned on according to the hardening item selected by the user.
  • the user when the application to be hardened selected by the user is received, the user is further allowed to select hardening items, for example, by checking the jailbreak detection to determine that the jailbreak detection is required, the configuration of the entire hardening function is more flexible, and Overcome the defect that the prior art cannot provide customized reinforcement solutions for different applications.
  • the hardening client is started, the user selects the source code of the program to be hardened and the hardening project, and the corresponding function item of the security SDK is turned on according to the user's choice.
  • the security SDK turns on all the function items by default, and then the user chooses to turn off the function items that do not require reinforcement.
  • the functional items of the security SDK include but are not limited to at least one of the following: running self-starting items, re-signature detection items, dynamic library injection detection items, debugger injection detection items, dynamic debugging monitoring items, tampering monitoring items, operating environment detection Item and string decryption item.
  • the operating environment monitoring further includes jailbreak detection, network agent monitoring, and screenshot monitoring.
  • the security SDK includes hardening functions that are not limited to the functional items listed above. Those skilled in the art can flexibly add or delete the hardening functions of the security SDK to meet the corresponding detection requirements. .
  • Step S202 Insert the security SDK into the program source code of the application to be hardened and perform pre-compilation to generate an archive file.
  • the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file.
  • the client imports and links the security SDK, calls the xcodebuild command for pre-compilation, and generates an archive file.
  • This pre-compilation operation can ensure that the user's current source code is a complete version that can be compiled and packaged normally, and can provide data support for subsequent extraction of effective information.
  • the link flag information of the modified application configuration project file includes, but is not limited to, the modified library file link flag (OTHER_LDFLAGS), header file link flag (GCC_PREFIX_HEADER), thereby ensuring that the security SDK can work first.
  • the security SDK is provided with location identifications of multiple detection points of the program source code. During the pre-compilation process, the security SDK is called when the program source code runs to the detection points corresponding to the location identification. Before inserting the security SDK, set multiple detection points, that is, call security detection at the multiple detection points of the program source code. Here, the security SDK is called at multiple detection points during pre-compilation, also to ensure the follow-up
  • the extracted executable binary information (valid information below) is consistent with the final running version.
  • step S205 in the process of recompiling and packaging, the security SDK is called when the program source code runs to the detection point identified by the corresponding location, and the reinforcement of multiple detection points can be implemented, so that the attacker can even attack one of them.
  • the reinforcement effect can still be used normally.
  • Step S203 Extract valid information of the application to be reinforced from the archive file, and encapsulate the valid information.
  • the valid information includes but is not limited to at least one of the following: Bundle Identifier, Bundle Name, Bundle Display Name, App Version, Resource File (such as PNG, JPEG) , Avi, etc.) and signature information.
  • the archive file of the application to be reinforced is decompressed, and the effective information is filtered out, then the effective information is consistent with the application information that has not been tampered with in the final operation, and the effective information is encrypted and encapsulated to reduce the possibility of the application being cracked and make it effective Information cannot be easily obtained and tampered with by attackers, bypassing the detection methods in the reinforcement, and at the same time, it can provide security for the security SDK.
  • the effective information can also provide data backup for the application, and can check whether the application uses a private API, which helps to improve the pass rate of store review.
  • the secondary packaging detection is mainly the Bundle Identifier in the Info.plist file
  • the secondary packaging detection can be easily bypassed.
  • the signature information segment is encrypted and encapsulated.
  • Step S204 The encapsulated effective information and the security SDK form a reinforced security component, and the string encryption package is added to the reinforced security component.
  • the hardened security component includes not only the encapsulated valid information and the security SDK, but also a string encryption package, that is, the string encryption package is integrated into the security SDK or program source code to work, and the application data can be further guaranteed Security.
  • the string encryption package includes an encryption script and a decryption script.
  • the encryption script is used to extract and encrypt a specific string in the program source code
  • the decryption script is used to decrypt the cipher text.
  • the specific character string includes: hard-coded keywords, communication server address, data request interface, and/or parameter information.
  • Step S205 Bind the hardened security component with the program source code.
  • the reinforced security component is added to the program source code through parameterized configuration modification and re-compiled and packaged to complete the automatic link of the security SDK and the automatic link of the header file.
  • call the string encryption package in the security reinforcement component to encrypt specific strings in the program source code to ensure that the strings in the compiled and packaged application have been encrypted and protected.
  • the string decryption script coordinated to ensure data security.
  • Step S206 After binding, export the program file of the application to be hardened, and complete the hardening of the application to be hardened.
  • the archive file generated by compiling and packaging in step S205 is invoked by Xcode's own signature tool to complete the application signature, and export it into a final reinforcement program file, such as an ipa file.
  • Figure 3 shows a flow chart of application reinforcement in a specific embodiment of the present invention.
  • the difference from Figure 2 is that in Figure 3, when determining the application to be hardened and its hardening project, it is necessary to judge whether the application is a workstation management application. Since Xcode's workstation can manage multiple applications at the same time, some common plug-ins, resource libraries, etc. are shared among multiple applications. If it is a workstation-managed application, the script during compilation is different from a purely independent application.
  • users only need to select applications and reinforcement items, and click reinforcement to automatically complete all subsequent operations, such as effective information screening, operating environment monitoring, anti-reverse protection, and important information encryption.
  • anti-reverse protection mainly uses code obfuscation and string encryption to inflate, deform, and obscure the decompiled code.
  • the user can further select hardening items based on selecting the application to be hardened, and then can carry out personalized detection settings for the application; and adopt the technical solution of strengthening the client to carry out product hardening.
  • the client side reinforcement takes the code as the origin, and on this basis, it carries out parameterized configuration, security component protection, and package integration, which can be more flexibly combined with applications and has better compatibility; by combining the packaged effective information, security SDK with The three string encryption packages form a complete set of hardened security components, which can realize the detection of corresponding hardened items of the corresponding security SDK, such as operating environment detection, and can also realize application anti-tampering through the comparison of the encrypted and encapsulated effective information And, application data protection is realized through encryption of key information (specific character strings). It can be seen that the use of the reinforced security component of this embodiment can further increase the reinforcement effect.
  • Fig. 4 shows a functional block diagram of a device for applying reinforcement according to an embodiment of the present invention. As shown in Figure 4, the device includes:
  • the pre-compilation module 401 is adapted to insert the security SDK into the program source code of the application to be hardened and perform pre-compilation to generate an archive file when the application to be hardened selected by the user is received;
  • the effective information extraction module 402 is adapted to extract effective information of the application to be reinforced from the archive file, and encapsulate the effective information;
  • the binding module 403 is adapted to form a reinforced security component from the encapsulated effective information and the security SDK, and to bind the reinforced security component with the program source code;
  • the reinforcement module 404 is adapted to export the program file of the application to be reinforced after binding to complete the reinforcement of the application to be reinforced.
  • the device further includes:
  • the function item opening module 405 is adapted to receive the reinforcement item selected by the user, and enable the corresponding function item of the security SDK according to the reinforcement item selected by the user.
  • the functional items of the security SDK include at least one of the following: running self-starting items, re-signature detection items, dynamic library injection detection items, debugger injection detection items, dynamic debugging monitoring items, tampering detection Items, operating environment detection items, and string decryption items.
  • the device further includes:
  • the source code backup module 406 is adapted to copy the program source code of the application to be reinforced to obtain a copy sample of the program source code
  • the pre-compilation module 401 is further adapted to insert the security SDK into the copy sample of the program source code and perform pre-compilation.
  • the pre-compilation module 401 is further adapted to:
  • the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file.
  • the security SDK is provided with position identifications of multiple detection points of the program source code
  • the pre-compilation module 401 is further adapted to:
  • the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file; wherein, during the pre-compilation process, the security SDK is invoked when the program source code runs to the detection point corresponding to the location mark.
  • the valid information includes at least one of the following: package name, application name, terminal display name, version number, resource file, and signature information.
  • the binding module 403 is further adapted to:
  • the hardened security components are added to the program source code through parameterized configuration modification and re-compiled and packaged to complete the automatic linking of the security SDK and the automatic linking of the header files.
  • the device further includes: an adding module 407, adapted to add a string encryption package to the reinforced security component;
  • the string encryption package includes an encryption script for extracting a specific string in the program source code and encrypting the specific string, and a decryption script for decrypting ciphertext;
  • the binding module 403 is further adapted to: during the re-compiling and packaging, calling the string encryption package in the hardened security component to encrypt the specific string in the program source code.
  • the specific character string includes: a hard-coded keyword, a communication server address, a data request interface, and/or parameter information.
  • the embodiment of the present application provides a non-volatile computer storage medium, the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the application hardening method in any of the foregoing method embodiments.
  • FIG. 5 shows a schematic structural diagram of a computing device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
  • the computing device may include: a processor (processor) 502, a communication interface (Communications Interface) 504, a memory (memory) 506, and a communication bus 508.
  • processor processor
  • communication interface Communication Interface
  • memory memory
  • the processor 502, the communication interface 504, and the memory 506 communicate with each other through the communication bus 508.
  • the communication interface 504 is used to communicate with other devices such as network elements such as clients or other servers.
  • the processor 502 is configured to execute a program 510, and specifically can execute relevant steps in the foregoing application reinforcement method embodiment.
  • the program 510 may include program code, and the program code includes computer operation instructions.
  • the processor 502 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention.
  • the one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
  • the memory 506 is used to store the program 510.
  • the memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the program 510 may be specifically used to cause the processor 502 to perform the following operations:
  • the security SDK is inserted into the program source code of the application to be hardened and pre-compiled to generate an archive file
  • the program 510 may be further specifically configured to cause the processor 502 to perform the following operations: receive a reinforcement item selected by the user, and enable corresponding function items of the security SDK according to the reinforcement item selected by the user.
  • the functional items of the security SDK include at least one of the following: running self-starting items, re-signature detection items, dynamic library injection detection items, debugger injection detection items, dynamic debugging monitoring items, tampering detection Items, operating environment detection items, and string decryption items.
  • the program 510 may be further specifically used to cause the processor 502 to perform the following operations: copy the program source code of the application to be hardened to obtain a copy sample of the program source code;
  • the program 510 may be further used to make the processor 502 perform the following operations: insert the security SDK into the program source code of the application to be hardened by modifying the link flag information in the program source code And pre-compiled to generate archive files.
  • the security SDK is provided with position identifications of multiple detection points of the program source code; the program 510 may specifically be further used to cause the processor 502 to perform the following operations: insert the security SDK into the The program source code of the application to be reinforced is pre-compiled to generate an archive file; wherein, during the pre-compilation process, the security SDK is invoked when the program source code runs to the detection point corresponding to the location mark.
  • the valid information includes at least one of the following: package name, application name, terminal display name, version number, resource file, and signature information.
  • the program 510 may be further used to make the processor 502 perform the following operations: add the hardened security component to the program source code through parameterized configuration modification and recompile and package to complete the security SDK Automatic linking and automatic linking of header files.
  • the program 510 may be further specifically used to cause the processor 502 to perform the following operations: add a string encryption package to the hardened security component;
  • the string encryption package includes an encryption script for extracting a specific string in the program source code and encrypting the specific string, and a decryption script for decrypting ciphertext;
  • the string encryption package in the reinforced security component is called to encrypt the specific string in the program source code.
  • the specific character string includes: a hard-coded keyword, a communication server address, a data request interface, and/or parameter information.
  • modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and/or processes or units are mutually exclusive, any combination can be used to compare all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method or methods disclosed in this manner or All the processes or units of the equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented by hardware, or by software modules running on one or more processors, or by their combination.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the device for application reinforcement according to the embodiments of the present invention.
  • DSP digital signal processor
  • the present invention can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing 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 have the form of one or more signals. Such signals can be downloaded from Internet websites, or provided on carrier signals, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)
  • Storage Device Security (AREA)

Abstract

一种应用加固的方法、装置、计算设备及计算机存储介质,其中,方法包括:当接收到用户选择的待加固应用时,将安全SDK插入至待加固应用的程序源码中并进行预编译,生成归档文件(S101);从归档文件中提取待加固应用的有效信息,对有效信息进行封装处理(S102);将封装后的有效信息和安全SDK形成加固安全组件,以及将加固安全组件与程序源码进行绑定(S103);在绑定后,导出待加固应用的程序文件,完成待加固应用的加固(S104)。该方案在应用源码的基础上进行集成加固,可以更灵活的与应用相结合,兼容性更好;以及,将安全SDK和封装后的有效信息共同形成加固安全组件,则可将SDK的加固功能与应用防篡改打包功能相结合,加固效果更强。

Description

应用加固的方法、装置、计算设备及计算机存储介质 技术领域
本发明涉及应用安全技术领域,具体涉及一种应用加固的方法、装置、计算设备及计算机存储介质。
背景技术
随着移动互联网技术的日新月异,应用的安全问题层出不穷,如远程控制、流量损耗、应用仿冒、隐私数据窃取等,严重损害应用厂家及终端用户的切身利益。为了应对这些安全问题,信息安全等级保护也从1.0跨入2.0时代,对于安全体系制度有了更高层次的要求,移动互联网的安全引起了越来越多企业的重视。
现有的很多互联网公司,在考虑产品安全性的同时,出于投入产出比和利益考量,会向第三方取得安全资质的企业寻求帮助。与此同时,由于SDK加固有着集成方便、使用灵活等特点,这类企业在面对大规模的需求,则通过统一提供SDK的方式进行批量保护。
然而,发明人在实施本发明实施例的时候,发现现有的SDK加固方案存在保护不完全,无法灵活的结合应用的缺陷。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的应用加固的方法、装置、计算设备及计算机存储介质。
根据本发明的一个方面,提供了一种应用加固的方法,包括:
当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安 全组件与程序源码进行绑定;
在绑定后,导出待加固应用的程序文件,完成待加固应用加固的。
根据本发明的另一方面,提供了一种应用加固的装置,包括:
预编译模块,适于当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
有效信息提取模块,适于从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;
绑定模块,适于将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安全组件与程序源码进行绑定;
加固模块,适于在绑定后,导出待加固应用的程序文件,完成待加固应用加固的。
根据本发明的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;
所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行上述所述的应用加固的方法对应的操作。
根据本发明的再一方面,提供了一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如上述所述的应用加固的方法对应的操作。
根据本发明的应用加固的方法、装置、计算设备及计算机存储介质,用户仅需选择待加固应用,则可由客户端自动完成下述加固的全过程:将安全SDK插入待加固应用的程序源码中并进行预编译,以使提取得到得有效信息与最终运行时的一致;提取有效信息并进行加密封装,将封装后的有效信息和安全SDK进行绑定后作为保护待加固应用安全的加固安全组件,使攻击者不能单一的通过破解SDK或破解有效信息以达到破解应用的作用;将该加固安全组件与待加固应用的程序源码进行绑定,进而可以将安全SDK的加固功能(例如运行环境检测)和应用防篡改打包功能相结合,增强加固效果。另外,本发明方案立足于应用的程序源码,在源代码的基础上进行集成封装提取等操作,进而可以更 灵活的与应用相结合,兼容性更好。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的应用加固的方法的流程图;
图2示出了根据本发明另一个实施例的应用加固的方法的流程图;
图3使出了本发明一个具体实施例中的应用加固的流程图;
图4示出了根据本发明一个实施例的应用加固的装置的功能框图;
图5示出了根据本发明实施例的一种计算设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
在实施本发明实施例之前,首先明确本文中涉及的如下概念:
Workspace:工作站、编译目录,多个项目共享一个编译目录;
Project:项目程序,包含多个产品(Target);
Scheme:构建一个产品(Target)的所有配置的集合;
一个workspace可以包含多个project,一个project可以包含多个target,Scheme为对target进行编译时的不同配置,每个配置的集合对应一个scheme。
另外,本发明方案可广泛适用于各种系统的应用加固,而在下文中,主要以IOS系统的应用加固来进行说明,本领域技术人员应该理解的是,本发明并不以此为限。
图1示出了根据本发明一个实施例的应用加固的方法的流程图。如图1所示,该方法包括:
步骤S101:当接收到用户选择的待加固应用时,将安全SDK插入至待加固应用的程序源码中并进行预编译,生成归档文件。
在本发明中,当启动加固客户端后,用户可根据保护需求选择待加固应用,并且,在接收到用户选择的待加固应用后,后续的加固过程可完全自动的进行,即可实现一键加固。
具体的,接收用户选择的待加固应用,客户端导入并链接安全SDK,将安全SDK插入到待加固应用的程序源码,而在预编译时会将安全SDK的数据一起打包到项目的可执行文件中,使加固前后应用二进制文件保持一致,进而可以保证后续提取的可执行二进制信息(下文中的有效信息)与最终的运行版本一致,以利于加固后的应用在防篡改层面的准确判断。以及,在经过预编译后,生成归档文件,即:archive文件。
需要在此说明的是,在本发明中不限定安全SDK的来源,以及不限定安全SDK包括的加固功能,具体实施时,本领域技术人员可灵活选择安全SDK的来源,灵活选择包括不同的加固功能的SDK,以及灵活开启或关闭默认安全SDK中的加固选项。
步骤S102:从归档文件中提取待加固应用的有效信息,对有效信息进行封装处理。
本发明方案,不仅依靠安全SDK对应用进行保护,而且通过提取待加固应用的有效信息,以便利用有效信息的比对来实现应用防篡改。
具体的,从预编译后得到的归档文件中提取待加固应用的有效信息,则该有效信息与最终运行的未被篡改的应用的信息一致,以及对有效信息进行加密封装,使有效信息不能轻易被攻击者获取及篡改。
并且,本发明也不限定有效信息的信息项,具体实施时,本领域技术人员 可灵活选择提取的有效信息的信息项。可选的,有效信息可以包括应用名(Bundle Name),签名信息等。
经过上述步骤S101和步骤S102提取出有效信息并对有效信息进行封装,以将该有效信息用于应用防篡改检测中。
步骤S103:将封装后的有效信息和安全SDK形成加固安全组件,以及将加固安全组件与程序源码进行绑定。
将封装后的有效信息和安全SDK进行绑定后作为保护待加固应用安全的加固安全组件,使攻击者不能单一的通过破解SDK或破解有效信息以达到破解应用的目的。
以及,将加固安全组件与程序源码进行绑定,使安全加固组件可以用于对待加固应用的运行环境、以及有效信息进行检测。
步骤S104:在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
在完成上述绑定后,通过编译打包并导出待加固应用的程序文件,该导出的程序文件即为完成了加固的应用程序文件。
根据本实施例提供的应用加固的方法,用户仅需选择待加固应用,则可由客户端自动完成下述加固的全过程:将安全SDK插入待加固应用的程序源码中并进行预编译,以使提取得到的有效信息与最终运行时的一致;提取有效信息并进行加密封装,将封装后的有效信息和安全SDK进行绑定后作为保护待加固应用安全的加固安全组件,使攻击者不能单一的通过破解SDK或破解有效信息以达到破解应用的作用;将该加固安全组件与待加固应用的程序源码进行绑定,进而可以将安全SDK的加固功能(例如运行环境检测)和应用防篡改打包功能相结合,增强加固效果。另外,本发明方案立足于应用的程序源码,在源代码的基础上进行集成封装提取等操作,进而可以更灵活的与应用相结合,兼容性更好。
图2示出了根据本发明另一个实施例的应用加固的方法的流程图。如图2所示,该方法包括:
步骤S201:当接收到用户选择的待加固应用时,接收用户选择的加固项目, 根据用户选择的加固项目开启安全SDK的相应功能项。
在本实施例中,当接收到用户选择的待加固应用时,进一步允许用户选择加固项目,例如,通过勾选越狱检测来确定需要进行越狱检测,使整个加固功能的配置更具灵活性,以克服现有技术中无法针对不同的应用提供自定义的加固解决方案的缺陷。
具体的,启动加固客户端,用户选择待加固的程序源码以及选择加固项目,并根据用户选择开启安全SDK的相应功能项。在本发明的一个具体实施例中,安全SDK默认开启全部的功能项,然后由用户选择关闭无需加固的功能项。其中,安全SDK的功能项包括但不限于以下至少一项:运行自启动项、重签名检测项、动态库注入检测项、调试器注入检测项、动态调试监测项、篡改监测项、运行环境检测项和字符串解密项。其中,运行环境监测进一步包括越狱检测、网络代理监测、以及截屏监测。需要在此说明的是,具体实施时,安全SDK包括的加固功能并不以上述列举出的功能项为限,本领域技术人员可灵活增加或删除安全SDK的加固功能,以适应相应的检测需求。
步骤S202:将安全SDK插入至待加固应用的程序源码中并进行预编译,生成归档文件。
具体的,通过修改程序源码中的链接标志位信息,将安全SDK插入至待加固应用的程序源码中并进行预编译,生成归档文件。客户端导入并链接安全SDK,调用xcodebuild命令进行预编译,生成archive文件。该预编译的操作可以确保用户的当前源码是一个可以正常编译打包的完整版本,以及可以为之后的有效信息提取提供数据支撑。并且,修改应用的配置项目文件的链接标志位信息包括但不限于修改库文件链接标志位(OTHER_LDFLAGS),头文件链接标志位(GCC_PREFIX_HEADER),进而保证安全SDK可以优先工作。
进一步的,安全SDK中设置有程序源码的多个检测点的位置标识,预编译过程中,程序源码运行至对应位置标识的检测点时调用安全SDK。在进行安全SDK的插入前,设置多个检测点,即在程序源码的该多个检测点的位置均调用安全检测,此处预编译时在多个检测点调用安全SDK,同样是为了保证后续提取的可执行二进制信息(下文中的有效信息)与最终的运行版本一致。而在后文步骤S205中,在再次编译打包的过程中,在程序源码运行至对应位置标识的 检测点时调用安全SDK,则可以实现多个检测点位置的加固,使得攻击者即使攻击其中一处,加固效果还能正常使用。
另外,在本发明的一个可选的实施例中,为了防止代码污染,复制待加固应用的程序源码,得到程序源码的复制样本,即对程序源码进行备份;然后,在进行SDK插入及编译时,将安全SDK插入至程序源码的复制样本中并进行预编译,即使加固过程出现异常,也不会影响程序源码,防止代码污染。
步骤S203:从归档文件中提取待加固应用的有效信息,对有效信息进行封装处理。
其中,有效信息包括但不限于以下至少一项:包名(Bundle Identifier)、应用名(Bundle Name)、终端显示名称(Bundle Display Name)、版本号(App Version)、资源文件(如PNG、JPEG、avi等)和签名信息。
具体的,解压待加固应用的archive文件,筛选出有效信息,则该有效信息与最终运行的未被篡改的应用信息一致,以及对有效信息进行加密封装,降低应用被破解的可能性,使有效信息不能轻易被攻击者获取及篡改,绕过加固中的检测手段,同时还可为安全SDK提供了安全保障。另外,该有效信息还可以为应用提供数据备份,以及可以检查应用是否使用私有API,有助于提高商店审核的通过率。
在本发明的一些具体实施例中,考虑到现有技术中,二次打包检测的主要是Info.plist文件中的Bundle Identifier,若攻击者采用企业签名,则可以轻松绕过二次打包检测,达到重签安装的目的。相应的,在这些具体的实施例中,不仅对Info.plist文件中的Bundle Identifier进行加密封装,还对签名信息段进行加密封装,在进行检测时,则可以有效拦截各种二次打包。
步骤S204:将封装后的有效信息和安全SDK形成加固安全组件,将字符串加密包添加至加固安全组件中。
在本实施例中,加固安全组件除了包括封装后的有效信息以及安全SDK外,还包括字符串加密包,即将字符串加密包集成到安全SDK或程序源码中进行工作,则可以进一步保证应用数据的安全。
其中,字符串加密包加密脚本和解密脚本,加密脚本用于提取程序源码中 的特定字符串并对特定字符串进行加密,解密脚本用于将密文进行解密。其中,特定字符串包括:硬编码的关键字、通信服务器地址、数据请求接口、和/或参数信息。
步骤S205:将加固安全组件与程序源码进行绑定。
具体的,将加固安全组件通过参数化配置修改添加至程序源码中并进行再次编译打包,以完成安全SDK的自动链接以及头文件自动链接。并且,在进行再次编译打包时,调用加固安全组件中的字符串加密包对程序源码中的特定字符串进行加密,保证编译打包后的应用中的字符串已完成加密保护,与安全加固组件中的字符串解密脚本协调作用,保证数据的安全。
步骤S206:在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
将步骤S205中编译打包生成的archive文件通过调用Xcode自带的签名工具,完成应用签名,导出成最终的加固程序文件,例如导出ipa文件。
图3使出了本发明一个具体实施例中的应用加固的流程图。与图2所不同的是,图3中在确定待加固应用及其加固项目时,需要判断该应用是否为工作站管理的应用。由于Xcode的工作站中可以同时管理多个应用,多个应用之间共用了某些公共插件、资源库等,如果是工作站管理的应用,其编译时的脚本与单纯的独立应用是不一样的。经过图3的加固流程,用户只需选择应用及加固项目,点击加固即可自动化完成后期所有操作,如有效信息筛选、运行环境监测、反逆向保护、重要信息加密等。其中,反逆向保护,主要通过代码混淆、字符串加密等方式使得反编译后的代码膨胀、变形、模糊化。
根据本实施例提供的应用加固的方法,用户在选择待加固应用的基础上,可以进一步选择加固项目,进而可以针对应用进行个性化的检测设置;以及,采用加固客户端的技术方案来进行产品加固,客户端加固以代码为原点,在此基础上进行参数化配置,安全组件保护,打包集成,可以更灵活的与应用相结合,兼容性更好;通过将封装后的有效信息、安全SDK与字符串加密包三者形成一套完整的加固安全组件,可以在实现对应安全SDK的相应加固项的检测的同时,例如运行环境检测,还可以通过加密封装的有效信息的比对实现应用防篡改,以及,通过关键信息(特定字符串)的加密,实现应用数据保护,可见, 利用本实施例的加固安全组件,可以使进一步增加加固效果。
图4示出了根据本发明一个实施例的应用加固的装置的功能框图。如图4所示,该装置包括:
预编译模块401,适于当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
有效信息提取模块402,适于从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;
绑定模块403,适于将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安全组件与程序源码进行绑定;
加固模块404,适于在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
在一种可选的实施方式中,所述装置还包括:
功能项开启模块405,适于接收用户选择的加固项目,根据用户选择的加固项目开启安全SDK的相应功能项。
在一种可选的实施方式中,安全SDK的功能项包括以下至少一项:运行自启动项、重签名检测项、动态库注入检测项、调试器注入检测项、动态调试监测项、篡改监测项、运行环境检测项和字符串解密项。
在一种可选的实施方式中,所述装置还包括:
源码备份模块406,适于复制所述待加固应用的程序源码,得到程序源码的复制样本;
所述预编译模块401进一步适于:将安全SDK插入至程序源码的复制样本中并进行预编译。
在一种可选的实施方式中,所述预编译模块401进一步适于:
通过修改程序源码中的链接标志位信息,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件。
在一种可选的实施方式中,所述安全SDK中设置有程序源码的多个检测点的位置标识;
所述预编译模块401进一步适于:
将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;其中,预编译过程中,程序源码运行至对应所述位置标识的检测点时调用所述安全SDK。
在一种可选的实施方式中,所述有效信息包括以下至少一项:包名、应用名、终端显示名称、版本号、资源文件和签名信息。
在一种可选的实施方式中,所述绑定模块403进一步适于:
将加固安全组件通过参数化配置修改添加至程序源码中并进行再次编译打包,以完成安全SDK的自动链接以及头文件自动链接。
在一种可选的实施方式中,所述装置还包括:添加模块407,适于将字符串加密包添加至所述加固安全组件中;
其中,所述字符串加密包包括用于提取程序源码中的特定字符串并对所述特定字符串进行加密的加密脚本,以及包括用于将密文进行解密的解密脚本;
绑定模块403进一步适于:在所述进行再次编译打包时,调用加固安全组件中的字符串加密包对程序源码中的特定字符串进行加密。
在一种可选的实施方式中,所述特定字符串包括:硬编码的关键字、通信服务器地址、数据请求接口、和/或参数信息。
本申请实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的应用加固的方法。
图5示出了根据本发明实施例的一种计算设备的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。
如图5所示,该计算设备可以包括:处理器(processor)502、通信接口(Communications Interface)504、存储器(memory)506、以及通信总线508。
其中:
处理器502、通信接口504、以及存储器506通过通信总线508完成相互间的通信。
通信接口504,用于与其它设备比如客户端或其它服务器等的网元通信。
处理器502,用于执行程序510,具体可以执行上述应用加固的方法实施例中的相关步骤。
具体地,程序510可以包括程序代码,该程序代码包括计算机操作指令。
处理器502可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。
存储器506,用于存放程序510。存储器506可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
程序510具体可以用于使得处理器502执行以下操作:
当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安全组件与程序源码进行绑定;
在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
在一种可选的实施方式中,程序510具体可以进一步用于使得处理器502执行以下操作:接收用户选择的加固项目,根据用户选择的加固项目开启安全SDK的相应功能项。
在一种可选的实施方式中,安全SDK的功能项包括以下至少一项:运行自启动项、重签名检测项、动态库注入检测项、调试器注入检测项、动态调试监测项、篡改监测项、运行环境检测项和字符串解密项。
在一种可选的实施方式中,程序510具体可以进一步用于使得处理器502执行以下操作:复制所述待加固应用的程序源码,得到程序源码的复制样本;
将安全SDK插入至程序源码的复制样本中并进行预编译。
在一种可选的实施方式中,程序510具体可以进一步用于使得处理器502执行以下操作:通过修改程序源码中的链接标志位信息,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件。
在一种可选的实施方式中,所述安全SDK中设置有程序源码的多个检测点的位置标识;程序510具体可以进一步用于使得处理器502执行以下操作:将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;其中,预编译过程中,程序源码运行至对应所述位置标识的检测点时调用所述安全SDK。
在一种可选的实施方式中,所述有效信息包括以下至少一项:包名、应用名、终端显示名称、版本号、资源文件和签名信息。
在一种可选的实施方式中,程序510具体可以进一步用于使得处理器502执行以下操作:将加固安全组件通过参数化配置修改添加至程序源码中并进行再次编译打包,以完成安全SDK的自动链接以及头文件自动链接。
在一种可选的实施方式中,程序510具体可以进一步用于使得处理器502执行以下操作:将字符串加密包添加至所述加固安全组件中;
其中,所述字符串加密包包括用于提取程序源码中的特定字符串并对所述特定字符串进行加密的加密脚本,以及包括用于将密文进行解密的解密脚本;
在所述进行再次编译打包时,调用加固安全组件中的字符串加密包对程序源码中的特定字符串进行加密。
在一种可选的实施方式中,所述特定字符串包括:硬编码的关键字、通信服务器地址、数据请求接口、和/或参数信息。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细 示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的应用加固的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可 以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。

Claims (22)

  1. 一种应用加固的方法,包括:
    当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
    从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安全组件与程序源码进行绑定;
    在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
  2. 根据权利要求1所述的方法,其中,在所述将安全SDK插入至所述待加固应用的程序源码中并进行预编译之前,所述方法还包括:
    接收用户选择的加固项目,根据用户选择的加固项目开启安全SDK的相应功能项。
  3. 根据权利要求2所述的方法,其中,安全SDK的功能项包括以下至少一项:运行自启动项、重签名检测项、动态库注入检测项、调试器注入检测项、动态调试监测项、篡改监测项、运行环境检测项和字符串解密项。
  4. 根据权利要求1所述的方法,其中,在所述将安全SDK插入至所述待加固应用的程序源码中并进行预编译之前,所述方法还包括:
    复制所述待加固应用的程序源码,得到程序源码的复制样本;
    所述将安全SDK插入至所述待加固应用的程序源码中并进行预编译具体为:将安全SDK插入至程序源码的复制样本中并进行预编译。
  5. 根据权利要求1-4任一项所述的方法,其中,所述将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件进一步包括:
    通过修改程序源码中的链接标志位信息,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件。
  6. 根据权利要求1-5任一项所述的方法,其中,所述安全SDK中设置有程序源码的多个检测点的位置标识;
    所述将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件具体为:
    将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;其中,预编译过程中,程序源码运行至对应所述位置标识的检测点时调用所述安全SDK。
  7. 根据权利要求1所述的方法,其中,所述有效信息包括以下至少一项:包名、应用名、终端显示名称、版本号、资源文件和签名信息。
  8. 根据权利要求1所述的方法,其中,所述将所述加固安全组件与程序源码进行绑定进一步包括:
    将加固安全组件通过参数化配置修改添加至程序源码中并进行再次编译打包,以完成安全SDK的自动链接以及头文件自动链接。
  9. 根据权利要求8所述的方法,其中,所述方法还包括:将字符串加密包添加至所述加固安全组件中;
    其中,所述字符串加密包包括用于提取程序源码中的特定字符串并对所述特定字符串进行加密的加密脚本,以及包括用于将密文进行解密的解密脚本;
    在所述进行再次编译打包时,调用加固安全组件中的字符串加密包对程序源码中的特定字符串进行加密。
  10. 根据权利要求9所述的方法,其中,所述特定字符串包括:硬编码的关键字、通信服务器地址、数据请求接口、和/或参数信息。
  11. 一种应用加固的装置,包括:
    预编译模块,适于当接收到用户选择的待加固应用时,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;
    有效信息提取模块,适于从所述归档文件中提取待加固应用的有效信息,对所述有效信息进行封装处理;
    绑定模块,适于将封装后的有效信息和安全SDK形成加固安全组件,以及将所述加固安全组件与程序源码进行绑定;
    加固模块,适于在绑定后,导出待加固应用的程序文件,完成待加固应用的加固。
  12. 根据权利要求11所述的装置,其中,所述装置还包括:
    功能项开启模块,适于接收用户选择的加固项目,根据用户选择的加固项目开启安全SDK的相应功能项。
  13. 根据权利要求12所述的装置,其中,安全SDK的功能项包括以下至少一项:运行自启动项、重签名检测项、动态库注入检测项、调试器注入检测项、动态调试监测项、篡改监测项、运行环境检测项和字符串解密项。
  14. 根据权利要求11所述的装置,其中,所述装置还包括:
    源码备份模块,适于复制所述待加固应用的程序源码,得到程序源码的复制样本;
    所述预编译模块进一步适于:将安全SDK插入至程序源码的复制样本中并进行预编译。
  15. 根据权利要求11-14任一项所述的装置,其中,所述预编译模块进一步适于:
    通过修改程序源码中的链接标志位信息,将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件。
  16. 根据权利要求11-15任一项所述的装置,其中,所述安全SDK中设置有程序源码的多个检测点的位置标识;
    所述预编译模块进一步适于:
    将安全SDK插入至所述待加固应用的程序源码中并进行预编译,生成归档文件;其中,预编译过程中,程序源码运行至对应所述位置标识的检测点时调用所述安全SDK。
  17. 根据权利要求11所述的装置,其中,所述有效信息包括以下至少一项:包名、应用名、终端显示名称、版本号、资源文件和签名信息。
  18. 根据权利要求11所述的装置,其中,所述绑定模块进一步适于:
    将加固安全组件通过参数化配置修改添加至程序源码中并进行再次编译打包,以完成安全SDK的自动链接以及头文件自动链接。
  19. 根据权利要求18所述的装置,其中,所述装置还包括:添加模块,适于将字符串加密包添加至所述加固安全组件中;
    其中,所述字符串加密包包括用于提取程序源码中的特定字符串并对所述特定字符串进行加密的加密脚本,以及包括用于将密文进行解密的解密脚本;
    绑定模块进一步适于:在所述进行再次编译打包时,调用加固安全组件中的字符串加密包对程序源码中的特定字符串进行加密。
  20. 根据权利要求19所述的装置,其中,所述特定字符串包括:硬编码的关键字、通信服务器地址、数据请求接口、和/或参数信息。
  21. 一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行如权利要求1-10中任一项所述的应用加固的方法对应的操作。
  22. 一种计算机存储介质,所述存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行如权利要求1-10中任一项所述的应用加固的方法对应的操作。
PCT/CN2019/123873 2019-03-06 2019-12-09 应用加固的方法、装置、计算设备及计算机存储介质 WO2020177430A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910168499.X 2019-03-06
CN201910168499.XA CN109960509A (zh) 2019-03-06 2019-03-06 应用加固的方法、装置、计算设备及计算机存储介质

Publications (1)

Publication Number Publication Date
WO2020177430A1 true WO2020177430A1 (zh) 2020-09-10

Family

ID=67023983

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123873 WO2020177430A1 (zh) 2019-03-06 2019-12-09 应用加固的方法、装置、计算设备及计算机存储介质

Country Status (2)

Country Link
CN (1) CN109960509A (zh)
WO (1) WO2020177430A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109960509A (zh) * 2019-03-06 2019-07-02 江苏通付盾信息安全技术有限公司 应用加固的方法、装置、计算设备及计算机存储介质
CN110414187B (zh) * 2019-07-03 2021-09-17 北京百度网讯科技有限公司 模型安全交付自动化的系统及其方法
CN111695093A (zh) * 2020-05-29 2020-09-22 平安科技(深圳)有限公司 基于iOS应用的加固方法、电子装置及存储介质
CN112468446B (zh) * 2020-11-02 2023-04-07 上海绊糖信息科技有限公司 一种保护用户隐私的移动运行环境安全检测系统
CN114675840A (zh) * 2020-12-24 2022-06-28 花瓣云科技有限公司 生成应用程序的安装包的方法与电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021321A (zh) * 2014-06-17 2014-09-03 北京奇虎科技有限公司 软件安装包的加固保护方法和装置
CN105930695A (zh) * 2016-04-11 2016-09-07 江苏通付盾科技有限公司 一种软件开发工具包的保护方法及装置
US9754112B1 (en) * 2014-11-24 2017-09-05 Bluerisc, Inc. Detection and healing of vulnerabilities in computer code
CN107977553A (zh) * 2017-12-25 2018-05-01 中国电子产品可靠性与环境试验研究所 移动应用程序的安全加固的方法及装置
CN109960509A (zh) * 2019-03-06 2019-07-02 江苏通付盾信息安全技术有限公司 应用加固的方法、装置、计算设备及计算机存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295257A (zh) * 2015-06-29 2017-01-04 中兴通讯股份有限公司 一种被加固软件的认证方法及装置
CN105787306A (zh) * 2016-03-03 2016-07-20 山东超越数控电子有限公司 一种基于android系统的应用程序加固系统及方法
CN107766728A (zh) * 2017-08-28 2018-03-06 国家电网公司 移动应用安全管理装置、方法及移动作业安全防护系统
CN108733379B (zh) * 2018-05-28 2022-04-08 常熟理工学院 基于dex字节码抽离映射混淆的安卓应用加固方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021321A (zh) * 2014-06-17 2014-09-03 北京奇虎科技有限公司 软件安装包的加固保护方法和装置
US9754112B1 (en) * 2014-11-24 2017-09-05 Bluerisc, Inc. Detection and healing of vulnerabilities in computer code
CN105930695A (zh) * 2016-04-11 2016-09-07 江苏通付盾科技有限公司 一种软件开发工具包的保护方法及装置
CN107977553A (zh) * 2017-12-25 2018-05-01 中国电子产品可靠性与环境试验研究所 移动应用程序的安全加固的方法及装置
CN109960509A (zh) * 2019-03-06 2019-07-02 江苏通付盾信息安全技术有限公司 应用加固的方法、装置、计算设备及计算机存储介质

Also Published As

Publication number Publication date
CN109960509A (zh) 2019-07-02

Similar Documents

Publication Publication Date Title
WO2020177430A1 (zh) 应用加固的方法、装置、计算设备及计算机存储介质
US11398899B2 (en) Data processing device and data processing method
CN106778103B (zh) 一种安卓应用程序防逆向破解的加固方法、系统及解密方法
US10218790B2 (en) Providing access to a resource for a computer from within a restricted network
CN102760219B (zh) 一种Android平台软件保护系统、方法及设备
JP6166839B2 (ja) 実行時のアプリケーションメソッドを置き換えるためのシステム及び方法
US20180260199A1 (en) Method and apparatus for intermediate representation of applications
CN108229112B (zh) 一种保护应用程序、应用程序的运行方法以及装置
EP3528149B1 (en) Software repackaging prevention method and device
CN106203006A (zh) 基于dex与so文件动态执行的Android应用加固方法
WO2016078130A1 (zh) 一种防逆向apk文件的动态加载方法
CN109784007B (zh) 一种字节码加密的方法、字节码解密的方法及终端
CN107273723B (zh) 一种基于so文件加壳的Android平台应用软件保护方法
CN105637800A (zh) 密钥基础结构
US9367699B2 (en) Automating the creation and maintenance of policy compliant environments
US20180067777A1 (en) Application protection method, server, and terminal
CN105303072A (zh) 基于art模式的软件加固方法及装置
CN105844150A (zh) 一种应用程序的数据保护方法和装置
WO2016201853A1 (zh) 加解密功能的实现方法、装置及服务器
CN106020858A (zh) 一种应用程序的下载安装方法、终端和系统
WO2022078366A1 (zh) 应用保护方法、装置、设备及介质
US11531763B1 (en) Automated code generation using analysis of design diagrams
US9990493B2 (en) Data processing system security device and security method
CN106326733A (zh) 管理移动终端中应用的方法和装置
JP6256781B2 (ja) システムを保護するためのファイルセキュリティ用の管理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19917601

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19917601

Country of ref document: EP

Kind code of ref document: A1