WO2021218172A1 - 共享库文件模拟方法、装置、计算机设备及存储介质 - Google Patents

共享库文件模拟方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021218172A1
WO2021218172A1 PCT/CN2020/135727 CN2020135727W WO2021218172A1 WO 2021218172 A1 WO2021218172 A1 WO 2021218172A1 CN 2020135727 W CN2020135727 W CN 2020135727W WO 2021218172 A1 WO2021218172 A1 WO 2021218172A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
intercepted
file
address
preset
Prior art date
Application number
PCT/CN2020/135727
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 WO2021218172A1 publication Critical patent/WO2021218172A1/zh

Links

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/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode

Definitions

  • This application relates to the field of computer technology, and in particular to a method, device, computer equipment, and storage medium for simulating shared library files.
  • the embodiments of the present application provide a shared library file simulation method, device, computer equipment, and storage medium to solve the problem of difficulty in analyzing shared library files.
  • a method for simulating shared library files including:
  • the access to the virtual file is mapped to the system file
  • Objdump command is used to obtain the dependencies of the shared library file to be simulated, and the function to be intercepted in the shared library file to be simulated is returned through the Hook function, and the function to be intercepted is processed through the simulation execution framework The returned value is output to realize the analysis of the shared library file to be simulated.
  • a shared library file simulation device including:
  • the file mapping module is used to map the shared library file to be simulated to the virtual memory of the simulation execution framework through the simulation execution framework;
  • a memory isolation module configured to isolate the virtual memory from the system memory through the virtual memory mechanism of the simulation execution framework
  • the access mapping module is used to map the access to the virtual file to the system file by simulating the virtual file system in the execution framework;
  • the address modification module is used to modify the function address of the function to be intercepted according to the preset function address, wherein the function to be intercepted is a function in a shared library format file;
  • the function registration module is used to register the preset function variable name and the preset function name, so that the hook function in the simulation execution framework can be paired according to the preset function variable name and the preset function name
  • the function to be intercepted returns;
  • the data output module is used to obtain the dependencies of the shared library file to be simulated through the Objdump command, and return the function to be intercepted in the shared library file to be simulated through the Hook function, and execute the framework through the simulation
  • the value returned by the function to be intercepted is output to realize the analysis of the shared library file to be simulated.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the access to the virtual file is mapped to the system file
  • Objdump command is used to obtain the dependencies of the shared library file to be simulated, and the function to be intercepted in the shared library file to be simulated is returned through the Hook function, and the function to be intercepted is processed through the simulation execution framework The returned value is output to realize the analysis of the shared library file to be simulated.
  • One or more readable storage media storing computer readable instructions
  • the computer readable storage medium storing computer readable instructions
  • the one Or multiple processors perform the following steps:
  • the access to the virtual file is mapped to the system file
  • Objdump command is used to obtain the dependencies of the shared library file to be simulated, and the function to be intercepted in the shared library file to be simulated is returned through the Hook function, and the function to be intercepted is processed through the simulation execution framework The returned value is output to realize the analysis of the shared library file to be simulated.
  • the shared library file to be simulated is mapped to the virtual memory of the simulation execution framework through the simulation execution framework; the virtual memory is combined with the virtual memory mechanism of the simulation execution framework through the simulation execution framework.
  • FIG. 1 is a schematic diagram of an application environment of a shared library file simulation method in an embodiment of the present application
  • FIG. 2 is a flowchart of a method for simulating shared library files in an embodiment of the present application
  • FIG. 3 is a flowchart of a method for simulating shared library files in an embodiment of the present application
  • step S10 is a flowchart of step S10 of the method for simulating shared library files in an embodiment of the present application
  • step S30 is a flowchart of step S30 of the method for simulating a shared library file in an embodiment of the present application
  • step S40 of the method for simulating shared library files in an embodiment of the present application
  • Fig. 7 is a schematic diagram of a shared library file simulation device in an embodiment of the present application.
  • Fig. 8 is a schematic diagram of a computer device in an embodiment of the present application.
  • the shared library file simulation method provided by this application can be applied to the application environment as shown in Figure 1.
  • the application environment includes a server and a client.
  • the server and the client are connected through a network. It is a wired network or a wireless network.
  • the client includes but is not limited to various personal computers, laptops, smart phones, tablets, and portable wearable devices.
  • the server can be implemented by an independent server or a server cluster composed of multiple servers. .
  • the server uses the simulation execution framework to map the shared library files to be simulated to the virtual memory of the simulation execution framework; through the virtual memory mechanism of the simulation execution framework, the virtual memory is isolated from the system memory; by the virtual file system in the simulation execution framework, Map the access to the virtual file to the system file; modify the function address of the function to be intercepted according to the preset function address; register the preset function variable name and preset function name, so as to simulate the hook in the execution framework
  • the function can return to the intercepted function according to the preset function variable name and the preset function name; obtain the dependencies of the shared library file to be simulated through the preset command, and use the Hook function to treat the function to be intercepted in the simulated shared library file Return, and output the value returned by the function to be intercepted through the simulation execution framework, so as to realize the analysis of the shared library file to be simulated.
  • This enables dynamic simulation and analysis of shared library files, which reduces the difficulty of analyzing shared library files.
  • a method for simulating a shared library file is provided.
  • the method is applied to the server in FIG. 1 as an example for description, which specifically includes steps S10 to S60, which are described in detail as follows:
  • S10 Map the shared library file to be simulated into the virtual memory of the simulation execution framework through the simulation execution framework.
  • the shared library file refers to the elf file.
  • the simulation execution framework refers to the cross-platform simulation execution framework Unicorn that can execute native programs of Arm, Arm64, M68K, Mips, Sparc, X86 and other instruction sets across platforms.
  • the elf file to be simulated refers to the object to be simulated by the simulation execution framework.
  • the elf file refers to the format file used for binary files, executable files, object code, shared libraries, and core dumps.
  • the elf file to be simulated is mapped to the virtual memory of the simulation execution framework.
  • the mapping of the elf file to be simulated includes parsing, relocation, symbol analysis, etc. of the elf file to be simulated.
  • parsing the elf file to be simulated refers to converting the elf file to be simulated into a so file in a binary format shared library format through the Pyelftools library.
  • the link address refers to the specified address when the code in the elf file to be simulated is linked to the corresponding function
  • the running address refers to the load address when the elf file to be simulated is loaded into the memory.
  • Symbol analysis of the elf file to be simulated refers to the analysis of initialization functions and variables in the elf file to be simulated. Specifically, when mapping the elf file to be simulated, the Pyelftools library automatically analyzes and relocates the elf file to be simulated.
  • the Pyelftools library is used to parse the simulated elf file to obtain the base address and structure pointer address of the initialized array in the elf file to be simulated, according to the base address and structure pointer address , To determine the address of the initialized array. It should be noted that when the simulated elf file is to be simulated, the function in the initialization array needs to be called. When the content in the initialization array is detected as 0, the initialization array address is relocated.
  • S20 Isolate the virtual memory from the system memory by simulating the virtual memory mechanism of the execution framework.
  • the virtual memory mechanism refers to a mechanism for mapping the memory of the system through the API in the simulation execution framework.
  • the APIs in the simulation execution framework include uc_mem_map, uc_mem_read, and uc_mem_write.
  • the virtual memory is isolated from the system memory.
  • the system memory is mapped to the virtual memory of the simulation execution framework through the API in the simulation execution framework. It should be noted that before the system memory is mapped through uc_mem_map, the base address of the system memory is obtained, and the base address of the virtual memory is changed to be consistent with the base address of the system memory according to the base address of the system memory.
  • the memory block size in is changed to an integer multiple of the system memory base address.
  • S30 Map the access to the virtual file to the system file by simulating the virtual file system in the execution framework.
  • the virtual file system refers to a system that simulates system files.
  • System files refer to file systems created by users. Mapping the access to the virtual file to the system file means that the system file can be accessed by accessing the virtual file in the simulation execution framework. By simulating the virtual file system in the execution framework, the access to the virtual file is mapped to the system file. Specifically, the system files are mapped through the virtual system file interface in the virtual file system, and further, the preset interface calling function is intercepted or controlled through the Hook function in the simulation execution framework.
  • the preset interface call function of the virtual file in the system is called, the preset interface call function is intercepted by the Hook function in the simulation execution framework, so that the preset interface call function calls the file from the system file.
  • the hook function in the simulation execution framework refers to a preset function that can call back or intercept the function.
  • the hook function in the simulation execution framework may be the syscall_handler.set_handler function.
  • the preset interface calling function refers to the function that can access the system file through the interface according to the function set by the user.
  • the preset interface calling functions include but are not limited to read, open, close, writev, fstat64, openat, and fstatat64 functions.
  • system file information when accessing a virtual file, first, obtain system file information, where the system file information includes the directory level information of the file in the system memory, and data information corresponding to the directory level information of the file.
  • the data information corresponding to the directory level information is stored in a preset virtual file directory.
  • the preset virtual file directory refers to a file directory created according to user customization and used to store system file information.
  • the Hook function in the simulation execution framework is used to analyze the preset interface call function, and the call path of the preset interface function is changed to call from the preset virtual file directory, so as to obtain the preset virtual file directory.
  • System file information is mapped to system memory in order to achieve access to virtual files.
  • S40 Modify the address of the function to be intercepted according to the preset function address, where the function to be intercepted is a function in the shared library format file.
  • the preset function address refers to the function address set according to the user's customization.
  • the function to be intercepted refers to the object executed by the hook function in the simulation execution framework. It should be noted that the function to be intercepted can be a preset interface call function, which maps the initialization function when the elf file is to be simulated. According to the preset function address, the address of the function to be intercepted is modified. Specifically, the address of the function to be intercepted is obtained, and the address of the function to be intercepted is changed according to the preset function address.
  • S50 Register the preset function variable name and the preset function name, so that the hook function in the simulation execution framework can return the intercepted function according to the preset function variable name and the preset function name.
  • the preset function variable name refers to the variable name in the function statement defined by the user.
  • the preset function name refers to the function name defined by the user.
  • the preset function variable name and preset function name are set by metaclasses in Python. Specifically, the preset function variable name and the preset function name are stored in the database, when the variable name or function name detected by the Hook function in the simulation execution framework is the preset function variable name or the preset function variable name in the database Function name, the value of the function corresponding to the detected variable name or function name is returned.
  • the preset function variable names are defined by JavaClassDef as jvm_name, jvm_method, and jvm_fields; the preset function names are find_method, find_method_by_id, and find_field functions.
  • the variable name detected by the Hook function in the simulation execution framework is jvm_method and the function name is ind_method, the method in ind_method is returned by the Hook function in the simulation execution framework.
  • Objdump refers to the target analysis tool in Linux, which is used to analyze binary files in elf format.
  • the dependency of the elf file to be simulated refers to the binary shared library format file that the elf format binary file depends on when it runs in Linux.
  • the dependency of the so format of the elf file to be simulated is libc.so.
  • the elf file to be simulated is parsed through the arm-linux-gnueabi-Objdump command in Objdump, and further, the elf file to be simulated is obtained through the -X command All the headers in the elf file to be simulated are filtered through the grep command to obtain the so format dependencies of the elf file to be simulated.
  • the function to be intercepted in the elf file to be simulated is returned through the Hook function, the data obtained by the function to be intercepted is obtained, and the data obtained by the function to be intercepted is output.
  • the data output obtained by the function to be intercepted may be Logger formatted output.
  • Logger formatted output refers to outputting the data obtained by the function to be intercepted through the Hook function in the simulation execution framework in the form of a log, so as to realize the analysis of the shared library format file of the elf file to be simulated.
  • the elf file to be simulated is mapped to the virtual memory of the simulation execution framework through the simulation execution framework; the virtual memory is isolated from the system memory by the virtual memory mechanism of the simulation execution framework; and the virtual files in the simulation execution framework are simulated.
  • the system maps the access to the virtual file to the system file; according to the preset function address, the function address of the function to be intercepted is modified; the preset function variable name and preset function name are registered; the Objdump command is used to obtain the to be simulated
  • the dependencies of the elf file are returned by the Hook function to the function to be intercepted in the simulated elf file, and the logger formatted output is performed through the simulation execution framework to realize the analysis of the simulated elf file. It can improve the efficiency and accuracy of analyzing elf files, and simplify the analysis of confused elf files.
  • step S60 before obtaining the dependencies of the shared library file to be simulated through a preset command, and before returning the function to be intercepted in the shared library file to be simulated through the Hook function ,include:
  • S601 Access the register of the simulation execution framework, and detect whether there is an unconditional execution instruction, where the register includes the number of the function to be intercepted.
  • the unconditional execution instruction refers to the instruction in the ARM instruction set.
  • the function number to be intercepted refers to the constant defined by the user in the register of the simulation execution framework, which is used to record the function to be intercepted. Specifically, the register in the simulation execution framework is accessed. When the Hook function intercepts the function to be intercepted that accesses the register, the byte data in the register is detected. When the number of bytes detected is ⁇ xE8 ⁇ xBf , There is an unconditional execution instruction. Among them, the unconditional execution instruction is the IT AL instruction.
  • the data in the register is read. If the read value is empty, it is determined that the hook function has failed to intercept the interception function, and the interception function is intercepted again; if read If the value of is not empty, it is determined that the interception of the interception function to be treated by the Hook function is successful. According to the value in the register, the number of the function to be intercepted is determined, and the corresponding function to be intercepted is determined according to the number of the function to be intercepted.
  • S603 Extract the corresponding target function number to be intercepted from the number of the function to be intercepted according to the value in the register.
  • the function number to be intercepted refers to the constant corresponding to the value in the register.
  • the target function number to be intercepted refers to a constant corresponding to the function to be intercepted.
  • S604 Determine the function to be intercepted according to the number of the target function to be intercepted.
  • the corresponding target function number to be intercepted is extracted from the target function number to be intercepted, and further, the corresponding target function number to be intercepted is determined according to the target function number to be intercepted. The function to be intercepted.
  • step S10 the mapping the shared library file to be simulated into the virtual memory of the simulation execution framework through the simulation execution framework includes:
  • S11 Analyze the shared library file to be simulated through the Pyelftools library to obtain the base address and structure pointer address of the initialization array in the shared library file to be simulated.
  • the initialization array is the array when loading the elf file to be simulated in the simulation execution framework, and the initialization array includes the initialization function.
  • the initialization array is init_array.
  • the elf file to be simulated is parsed, and the base address and structure pointer address of the initialization array in the elf file to be simulated are obtained.
  • the so format of the elf file to be simulated is parsed through the Pyelftools library to obtain the so file, and the so file is further analyzed to obtain the middle section of the so file.
  • the function iter_segments traverses the section section of the so file, and from the DT_INIT_ARRAYSZ and DT_INIT_ARRAY tags Get the size and offset of the initialization array, and determine the base address of the initialization array. Further, the structure pointer address is obtained by calculating the offset of the initialization array, the head virtual address of the middle section of the so file, and the offset of the head virtual address of the middle section of the so file.
  • S12 Determine the initialization array address according to the base address and the structure pointer address.
  • the base address of the obtained initialization array and the address of the structure pointer are calculated to obtain the address of the initialization array.
  • the calculation of the base address and the structure pointer address is an addition calculation.
  • S13 Map the initialization function in the initialization array to the virtual memory of the simulation execution framework according to the address of the initialization array.
  • the initialization function refers to the necessary function loaded when the shared library file to be simulated is running. Specifically, according to the addition calculation of the base address and the structure pointer address, after determining the initialization array address, further, according to the initialization array address pointer, find the location of the initialization array, and obtain the initialization function from the initialization array.
  • the initialization function is mapped to the virtual memory of the simulation execution framework to realize the mapping of the shared library file to be simulated into the virtual memory of the simulation execution framework.
  • the elf file to be simulated is parsed to obtain the base address of the initialized array and the address of the structure pointer in the elf file to be simulated; the address of the initialized array is determined according to the base address and the address of the structure pointer; Array address, which maps the initialization function in the initialization array to the virtual memory of the simulation execution framework.
  • the initialization array init_array in the so format of the elf file to be simulated can be obtained to obtain the initialization function in the init_array. Further, when the elf file to be simulated is simulated, the simulation of the elf file to be simulated can be completed through the initialization function.
  • mapping access to the virtual file to the system file by simulating the virtual file system in the execution framework includes:
  • the interface calling function is allocated to obtain the preset interface calling function.
  • the preset allocation method refers to the allocation of interface calling functions of different functions.
  • the interface calling function is allocated as read, open, close, writev, fstat64, openat, and fstatat64 functions.
  • the system file information includes directory level information of files in the system memory, and data information corresponding to the directory level information of the files.
  • the data information corresponding to the directory level information is stored in a preset virtual file directory.
  • the preset virtual file directory refers to a file directory created according to user customization and used to store system file information.
  • the Hook function in the simulation execution framework is used to analyze the preset interface calling function, and the calling path of the preset interface function is changed to be called from the preset virtual file directory.
  • the call path of the preset interface function to call from the preset virtual file directory, when the preset interface function is detected to access the virtual file, according to the change of the call path, the The access of the virtual file is mapped to the access to the preset virtual file directory, so that the access to the virtual file is mapped to the system file.
  • the interface calling function is allocated through the preset allocation method, and the preset interface calling function is obtained; according to the preset virtual file directory, the calling path of the preset interface calling function is replaced by the Hook function.
  • the real data information can be obtained from the system to prevent jumping out of the simulation of the simulated elf file when the data is wrong, and improve the reliability of the simulated elf simulation.
  • step S40 the modification of the function address of the function to be intercepted according to the preset function address includes:
  • the preset function address table refers to an address table created by user address table creation function.
  • the Jni Function Table address table is created through the write_function_table function.
  • the address of the function to be intercepted is obtained from the preset function address table.
  • the function to be intercepted may be a preset interface call function, and the address of the function to be intercepted may be a preset interface call function address.
  • S42 Modify the address of the function to be intercepted according to the preset function address.
  • the address of the function to be intercepted is modified according to the preset function address, so that the function to be intercepted executes the corresponding module according to the preset function address.
  • the preset function address corresponding to the preset function address is executed according to the preset function address.
  • the Jni Function Table address table is created through the write_function_table function.
  • Function A is included in the Jni Function Table address table.
  • Function A corresponds to module C, and the preset function address is D.
  • function A After function A is controlled by the hook function in the simulation execution framework, function A first executes module D.
  • the address of the function to be intercepted is obtained from the preset function address table, and the address of the function to be intercepted is modified according to the preset function address.
  • a shared library file simulation device is provided, and the shared library file simulation device corresponds to the shared library file simulation method in the above-mentioned embodiment one-to-one.
  • the shared library file simulation device includes: a file mapping module 10, a memory isolation module 20, an access mapping module 30, an address modification module 40, a function registration module 50, and a data output module 60.
  • the detailed description of each functional module is as follows:
  • the file mapping module 10 is used to map the shared library file to be simulated into the virtual memory of the simulation execution framework through the simulation execution framework;
  • the memory isolation module 20 is used to isolate the virtual memory from the system memory by simulating the virtual memory mechanism of the execution framework
  • the access mapping module 30 is used to map the access to the virtual file to the system file by simulating the virtual file system in the execution framework;
  • the address modification module 40 is used to modify the function address of the function to be intercepted according to the preset function address, where the function to be intercepted is a function in the shared library format file;
  • the function registration module 50 is used to register the preset function variable name and the preset function name, so that the hook function in the simulation execution framework can return to the intercepted function according to the preset function variable name and the preset function name;
  • the data output module 60 is used to obtain the dependencies of the shared library file to be simulated through the Objdump command, and return the function to be intercepted in the simulated shared library file through the Hook function, and output the value returned by the intercepted function through the simulation execution framework , In order to realize the analysis of the shared library file to be simulated.
  • the shared library file simulation device further includes:
  • the instruction detection module 601 is used to access the registers of the simulation execution framework and detect whether there is an unconditional execution instruction, where the register includes the number of the function to be intercepted;
  • the value reading module 602 is used to read the value in the register when there is an unconditional execution instruction
  • the function number module 603 is used to extract the corresponding target function number to be intercepted from the number of the function to be intercepted according to the value in the register;
  • the function determining module 604 is used to determine the function to be intercepted according to the number of the target function to be intercepted.
  • file mapping module 10 includes:
  • the file parsing sub-module 11 is used for parsing the shared library file to be simulated through the Pyelftools library to obtain the base address and structure pointer address of the initialization array in the shared library file to be simulated;
  • the address determining sub-module 12 is used to determine the address of the initialization array according to the base address and the address of the structure pointer;
  • the function mapping sub-module 13 is used to map the initialization function in the initialization array to the virtual memory of the simulation execution framework according to the address of the initialization array.
  • the access mapping module 30 includes:
  • the function allocation sub-module 31 is used to allocate the interface call function according to the preset allocation method, and obtain the preset interface call function;
  • the path replacement sub-module 32 is used for replacing the calling path of the preset interface calling function with the preset virtual file directory path through the Hook function according to the preset virtual file directory.
  • the address modification module 40 includes:
  • the address obtaining sub-module 41 is used to obtain the address of the function to be intercepted from the preset function address table;
  • the address modification submodule 42 is used to modify the address of the function to be intercepted according to the preset function address.
  • Each module in the above-mentioned shared library file simulation device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 8.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to realize a shared library file simulation method.
  • one or more readable storage media storing computer readable instructions are provided, the computer readable storage medium storing computer readable instructions, and the computer readable instructions are processed by one or more
  • the processor executes the computer-readable instructions to implement the steps of the shared library file simulation method in the foregoing embodiment, for example, step S10 to step S60.
  • the processor executes the computer-readable instructions
  • the functions of the modules/units of the shared library file simulation apparatus in the foregoing embodiments, such as the functions of the modules 10 to 60 are realized. To avoid repetition, I won’t repeat them here.
  • the readable storage medium in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
  • a computer-readable storage medium is provided, and computer-readable instructions are stored thereon.
  • the shared library file simulation method in the foregoing method embodiment is implemented, or the computer
  • the readable instructions are executed by the processor, the functions of the modules/units in the shared library file simulation device in the foregoing device embodiment are realized. To avoid repetition, I won’t repeat them here.
  • the computer-readable instructions can be stored in a non-volatile computer.
  • a readable storage medium when the computer readable instruction is executed, the computer readable instruction may be stored in a non-volatile readable storage medium or may be stored in a volatile readable storage medium, and the computer readable When the instructions are executed, they may include the procedures of the above-mentioned method embodiments.
  • any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种共享库文件模拟方法、装置、计算机设备及存储介质。所述方法包括:将待模拟共享库文件映射到模拟执行框架的虚拟内存中;将虚拟内存与系统内存隔离;将对虚拟文件的访问映射到系统文件;对待拦截函数的函数地址进行修改;对预设的函数变量名和预设的函数名进行注册,以使得模拟执行框架中的Hook函数能够根据预设的函数变量名和预设的函数名对待拦截函数进行返回;通过Hook函数对待模拟共享库文件中的待拦截函数进行返回,并通过模拟执行框架对待拦截函数返回的值进行输出,以实现对待模拟共享库文件进行分析。本申请的技术方案能够动态的对共享库文件进行模拟和分析,降低了对共享库文件进行分析的难度。

Description

共享库文件模拟方法、装置、计算机设备及存储介质
 
本申请以2020年04月30日提交的申请号为202010367839.4,名称为“共享库文件模拟方法、装置、计算机设备及存储介质”的中国发明申请为基础,并要求其优先权。
技术领域
本申请涉及计算机技术领域,尤其涉及一种共享库文件模拟方法、装置、计算机设备及存储介质。
 
背景技术
随着移动平台的发展,目前绝大多数商业Android APP在发布到应用市场前都不同程度的使用了加固技术进行处理。
由于Java层程序很容易被完全恢复为源码,因此多数厂商选择将关键算法通过C/C++编写到共享库文件中,移动安全厂商如梆梆、爱加密、腾讯乐固、360等针对此现状不仅将共享库文件加壳,还使用了OLLVM混淆技术来进一步强化。
但是,混淆生成的应用被加入了大量的虚假块,不仅程序逻辑变得极为复杂而且反汇编代码和流程图也极难理解。但是,发明人意识到容易被恶意应用使用加固阻碍了对应用的分析。
 
发明内容
本申请实施例提供一种共享库文件模拟方法、装置、计算机设备及存储介质,以解决难以对共享库文件进行分析的问题。
一种共享库文件模拟方法,包括:
通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
一种共享库文件模拟装置,包括:
文件映射模块,用于通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
内存隔离模块,用于通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
访问映射模块,用于通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
地址修改模块,用于根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
函数注册模块,用于对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
数据输出模块,用于通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
上述共享库文件模拟方法、装置、计算机设备及存储介质中,通过模拟执行框架,将待模拟共享库文件映射到模拟执行框架的虚拟内存中;通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离;通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;根据预设的函数地址,对待拦截函数的函数地址进行修改;对预设的函数变量名和预设的函数名进行注册,以使得模拟执行框架中的Hook函数能够根据预设的函数变量名和预设的函数名对待拦截函数进行返回;通过预设的命令获取待模拟共享库文件的依赖项,并通过Hook函数对待模拟共享库文件中的待拦截函数进行返回,并通过模拟执行框架对待拦截函数返回的值进行输出,以实现对待模拟共享库文件进行分析。以使得能够动态的对共享库文件进行模拟和分析,降低了对共享库文件进行分析的难度。
 
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中共享库文件模拟方法的一应用环境示意图;
图2是本申请一实施例中共享库文件模拟方法的一流程图;
图3是本申请一实施例中共享库文件模拟方法的一流程图;
图4是本申请一实施例中共享库文件模拟方法的步骤S10的一流程图;
图5是本申请一实施例中共享库文件模拟方法的步骤S30的一流程图;
图6是本申请一实施例中共享库文件模拟方法的步骤S40的一流程图;
图7是本申请一实施例中共享库文件模拟装置的一示意图;
图8是本申请一实施例中计算机设备的一示意图。
 
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的共享库文件模拟方法,可应用在如图1所示的应用环境中,该应用环境包括服务端和客户端,其中,服务端和客户端之间通过网络进行连接,该网络可以是有线网络或者无线网络,客户端具体包括但不限于各种个人计算机、笔记本电脑、智能手机和平板电脑和便携式可穿戴设备,服务端具体可以用独立的服务器或者多个服务器组成的服务器集群实现。服务端通过模拟执行框架,将待模拟共享库文件映射到模拟执行框架的虚拟内存中;通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离;通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;根据预设的函数地址,对待拦截函数的函数地址进行修改;对预设的函数变量名和预设的函数名进行注册,以使得模拟执行框架中的Hook函数能够根据预设的函数变量名和预设的函数名对待拦截函数进行返回;通过预设的命令获取待模拟共享库文件的依赖项,并通过Hook函数对待模拟共享库文件中的待拦截函数进行返回,并通过模拟执行框架对待拦截函数返回的值进行输出,以实现对待模拟共享库文件进行分析。以使得能够动态的对共享库文件进行模拟和分析,降低了对共享库文件进行分析的难度。
在一实施例中,如图2所示,提供一种共享库文件模拟方法,以该方法应用在图1中的服务端为例进行说明,具体包括步骤S10至步骤S60,详述如下:
S10:通过模拟执行框架,将待模拟共享库文件映射到模拟执行框架的虚拟内存中。
其中,共享库文件指elf文件。模拟执行框架指能够跨平台执行Arm、Arm64、M68K、Mips、Sparc、X86 等指令集的原生程序的跨平台模拟执行框架Unicorn。待模拟elf文件指模拟执行框架模拟执行的对象。elf文件指用于二进制文件、可执行文件、目标代码、共享库和核心转储格式文件。
通过模拟执行框架,将待模拟elf文件映射到模拟执行框架的虚拟内存中。具体地,对待模拟elf文件的映射包括对待模拟elf文件进行解析、重定位、符号解析等。其中,对待模拟elf文件进行解析指通过Pyelftools库将待模拟elf文件转换成二进制格式共享库格式的so文件。Pyelftools库指用于解析和分析待模拟elf文件的python库。对待模拟elf文件进行重定位指将在模拟执行框架执行待模拟elf文件前,实现链接地址与运行地址一致。其中,链接地址指待模拟elf文件中代码链接对应函数时的指定地址,运行地址指待模拟elf文件加载到内存时的加载地址。对待模拟elf文件进行符号解析指对待模拟elf文件中的初始化函数和变量进行解析。具体地,对待模拟elf文件进行映射时,通过Pyelftools库自动对待模拟elf文件进行解析、重定位。
需要说明的是,对待模拟elf文件进行符号解析时,通过Pyelftools库,对待模拟elf文件进行解析,得到待模拟elf文件中初始化数组的基地址和结构体指针地址,根据基地址和结构体指针地址,确定初始化数组的地址。需要说明的是,对待模拟elf文件进行模拟时,需要调用初始化数组中的函数,当检测初始化数组中的内容为0时,对初始化数组地址进行重定位。
S20:通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离。
其中,虚拟内存机制指通过模拟执行框架中的API对系统的内存进行映射的机制。模拟执行框架中的API包括uc_mem_map、uc_mem_read、uc_mem_write。通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离。具体地,通过模拟执行框架中的API,将系统内存映射到模拟执行框架的虚拟内存中。需要说明的是,通过uc_mem_map对系统内存进行映射之前,获取系统内存的基地址,根据系统内存的基地址,将虚拟内存的基地址变更成与系统内存的基地址一致,进一步地,将虚拟内存中的内存块大小变更成系统内存基地址的整数倍。通过模拟执行框架中的地址对齐函数,将虚拟内存的基地址与系统内存的基地址进行对齐,并对虚拟内存中的内存块大小进行计算,得到虚拟对齐地址和虚拟内存大小,并将虚拟对齐地址和虚拟内存大小返回至模拟执行框架中。
S30:通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件。
其中,虚拟文件系统指对系统文件进行模拟的系统。系统文件指由用户创建的文件系统。将对虚拟文件的访问映射到系统文件指通过访问模拟执行框架中的虚拟文件,就能对系统文件进行访问。通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件。具体地,通过虚拟文件系统中的虚拟系统文件接口对系统文件进行映射,进一步地,通过模拟执行框架中的Hook函数对预设接口调用函数进行拦截或控制,具体地,当检测到对虚拟文件系统中的虚拟文件的预设接口调用函数时,通过模拟执行框架中的Hook函数对预设接口调用函数进行拦截,以使得预设接口调用函数从系统文件中调用文件。其中,模拟执行框架中的Hook函数指能够对函数进行回调或拦截的预设函数。优选地,模拟执行框架中的Hook函数可以是syscall_handler.set_handler函数。预设的接口调用函数指根据用户自定义设置的函数,能够通过接口访问系统文件的函数。预设的接口调用函数包括但不限于read、open、close、writev、fstat64、openat、fstatat64函数。
需要说明的是,当对虚拟文件进行访问时,首先,获取系统文件信息,其中,系统文件信息包括系统内存中文件的目录层级信息,以及文件的目录层级信息对应的数据信息。根据目录层级信息,将目录层级信息对应的数据信息存放到预设的虚拟文件目录中。其中,预设的虚拟文件目录指根据用户自定义创建的,用于存放系统文件信息的文件目录。进一步地,通过模拟执行框架中的Hook函数对预设接口调用函数进行解析,对预设接口函数的调用路径变更成从预设的虚拟文件目录进行调用,从而获取预设的虚拟文件目录中的系统文件信息,以实现对虚拟文件的访问映射到系统内存。
S40:根据预设的函数地址,对待拦截函数的地址进行修改,其中,待拦截函数为共享库格式文件中的函数。
其中,预设的函数地址指根据用户自定义设置的函数地址。待拦截函数指模拟执行框架中的Hook函数执行的对象。需要说明的是,待拦截函数可以是预设接口调用函数,映射待模拟elf文件时的初始化函数。根据预设的函数地址,对待拦截函数的地址进行修改。具体地,获取待拦截函数的地址,根据预设的函数地址对待拦截函数的地址进行变更。
S50:对预设的函数变量名和预设的函数名进行注册,以使得模拟执行框架中的Hook函数能够根据预设的函数变量名和预设的函数名对待拦截函数进行返回。
其中,预设的函数变量名指由用户自定义的函数语句中的变量名称。预设的函数名指由用户自定义的函数名称。预设的函数变量名和预设的函数名通过Python中的元类进行设置。具体地,将预设的函数变量名和预设的函数名存放至数据库中,当模拟执行框架中的Hook函数检测到的变量名或函数名为数据库中的预设的函数变量名或预设的函数名,则对检测到的变量名或函数名所对应的函数的值进行返回。
示例性地,通过JavaClassDef 定义预设的函数变量名为jvm_name、jvm_method 和 jvm_fields;预设的函数名为find_method、find_method_by_id、find_field函数。当模拟执行框架中的Hook函数检测到的变量名为jvm_method ,函数名为ind_method,则通过模拟执行框架中的Hook函数对ind_method中的方法进行返回。
S60:通过Objdump命令获取待模拟共享库文件的依赖项,并通过Hook函数对待模拟共享库文件中的待拦截函数进行返回,并通过模拟执行框架对待拦截函数返回的值进行输出,以实现对待模拟共享库文件进行分析。
其中,Objdump指Linux中的目标分析工具,用于分析elf格式的二进制文件。待模拟elf文件的依赖项指elf格式的二进制文件在Linux中的运行时所依赖的二进制共享库格式文件。例如,待模拟elf文件的so格式的依赖项为libc.so具体地,首先,通过Objdump中的arm-linux-gnueabi-Objdump命令,对待模拟elf文件进行解析,进一步地,通过-X指令,获取待模拟elf文件中所有的头部,并通过grep指令对待模拟elf文件中所有的头部进行过滤,得到待模拟elf文件的so格式的依赖项。最后,对依赖项进行加载得到待模拟elf文件的so格式文件。进一步地,通过Hook函数对待模拟elf文件中的待拦截函数进行返回,得到待拦截函数获取的数据,并将待拦截函数获取的数据输出。其中,对待拦截函数获取的数据输出可以是Logger格式化输出。其中,Logger格式化输出指通过模拟执行框架中的Hook函数对待拦截函数获取的数据以日志的形式进行输出,以实现对待模拟elf文件的共享库格式文件进行分析。
本实施例中,通过模拟执行框架,将待模拟elf文件映射到模拟执行框架的虚拟内存中;通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离;通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;根据预设的函数地址,对待拦截函数的函数地址进行修改;对预设的函数变量名和预设的函数名进行注册;通过Objdump命令获取待模拟elf文件的依赖项,并通过Hook函数对待模拟elf文件中的待拦截函数进行返回,并通过模拟执行框架进行logger格式化输出,以实现对待模拟elf文件进行分析。能够提高对elf文件分析的效率和准确率,简化对混淆elf文件的分析。
在一实施例中,如图3所示,在步骤S60之前,在通过预设的命令获取待模拟共享库文件的依赖项,并通过Hook函数对待模拟共享库文件中的待拦截函数进行返回之前,包括:
S601:对模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,寄存器中包括待拦截函数编号。
其中,无条件执行指令指ARM指令集中的指令。待拦截函数编号指用户在模拟执行框架的寄存器中自定义的常量,用于记录待拦截函数。具体地,对模拟执行框架中的寄存器进行访问,当Hook函数对访问寄存器的待拦截函数进行拦截时,对寄存器中的字节数据进行检测,当检测到的字节数为\xE8\xBf时,则存在无条件执行指令。其中,无条件执行指令为IT AL指令。
进一步地,当对寄存器中的字节数进行检测后,未检测到字节数为\xE8\xBf时,则不存在无条件执行指令,则确定Hook函数对待拦截函数的拦截失败,并重新对待拦截函数进行拦截。
S602:若存在无条件执行指令,则读取寄存器中的数值。
其中,当检测到存在无条件执行指令时,对寄存器中的数据进行读取,若读取的数值为空,则确定Hook函数对待拦截函数的拦截失败,并重新对待拦截函数进行拦截;若读取的数值不为空,则确定Hook函数对待拦截函数的拦截成功。根据寄存器中的数值,确定待拦截函数编号,根据待拦截函数编号,确定对应的待拦截函数。
S603:根据寄存器中的数值从待拦截函数编号提取对应的目标待拦截函数编号。
其中,待拦截函数编号指与寄存器中的数值对应的常量。目标待拦截函数编号指与待拦截函数对应的常量。具体地,当检测到存在无条件执行指令时,对寄存器中的数据进行读取,当读取的数值不为空时,根据从寄存器读取的数值,确定待拦截函数编号,进一步地,从待拦截函数编号提取对应的目标待拦截函数编号。
S604:根据目标待拦截函数编号确定待拦截函数。
具体地,当从寄存器读取数据不为空,根据读取的数值确定待拦截函数编号后,从待拦截函数编号提取对应的目标待拦截函数编号,进一步地,根据目标待拦截函数编号确定对应的待拦截函数。
本实施例中,通过对模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,寄存器中存在待拦截函数编号;当存在无条件执行指令时,则读取寄存器中的数值;根据寄存器中的数值从待拦截函数编号提取对应的目标待拦截函数编号;根据目标待拦截函数编号确定待拦截函数。通过判断Hook函数对待拦截函数的拦截结果,能进一步提高对待模拟elf文件进行分析时的效率。
在一实施例中,如图4所示,在步骤S10中,所述通过模拟执行框架,将待模拟共享库文件映射到模拟执行框架的虚拟内存中,包括:
S11:通过Pyelftools库,对待模拟共享库文件进行解析,得到待模拟共享库文件中初始化数组的基地址和结构体指针地址。
其中,初始化数组为模拟执行框架中,加载待模拟elf文件时的数组,初始化数组包括初始化函数。在模拟执行框架中,初始化数组为init_array。通过Pyelftools库,对待模拟elf文件进行解析,得到待模拟elf文件中初始化数组的基地址和结构体指针地址。具体地,通过Pyelftools库对待模拟elf文件的so格式进行解析,得到so文件,并对so文件进一步解析,得到so文件中段部分,通过函数iter_segments遍历so文件的段部分,并从DT_INIT_ARRAYSZ和DT_INIT_ARRAY标签中获取到初始化数组的大小和偏移,确定初始化数组的基地址。进一步地,通过对初始化数组的偏移、so文件中段的头部虚地址以及so文件中段的头部虚地址的偏移进行计算,得到结构体指针地址。
S12:根据基地址和结构体指针地址,确定初始化数组地址。
其中,将得到的初始化数组的基地址和结构体指针地址进行计算,得到初始化数组的地址。其中,基地址和结构体指针地址的计算为相加计算。
S13:根据初始化数组地址,将初始化数组中的初始化函数映射到模拟执行框架的虚拟内存中。
其中,初始化函数指待模拟共享库文件运行时加载的必要函数。具体地,根据基地址和结构体指针地址的相加计算,确定初始化数组地址后,进一步地,根据初始化数组地址指针,找到初始化数组所在位置,并从初始化数组中获取初始化函数,进一步地,将初始化函数映射到模拟执行框架的虚拟内存中,以实现将待模拟共享库文件映射到模拟执行框架的虚拟内存中。
本实施例中,通过Pyelftools库,对待模拟elf文件进行解析,得到待模拟elf文件中初始化数组的基地址和结构体指针地址;根据基地址和结构体指针地址,确定初始化数组的地址;根据初始化数组地址,将初始化数组中的初始化函数映射到模拟执行框架的虚拟内存中。能够获得待模拟elf文件的so格式中的初始化数组init_array,以获得init_array中的初始化函数,进一步在模拟待模拟elf文件时,能够通过初始化函数完成对待模拟elf文件的模拟。
在一实施例中,如图5所示,在步骤S30中,所述通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件,包括:
S31:根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数。
其中,预设的分配方式指对不同功能的接口调用函数进行分配。例如,根据接口调用函数的功能,对接口调用函数分配为read、open、close、writev、fstat64、openat、fstatat64函数。
S32:根据预设的虚拟文件目录,通过Hook函数将预设的接口调用函数的调用路径替换成预设的虚拟文件目录路径。
具体地,当对虚拟文件进行访问时,首先,获取系统文件信息,其中,系统文件信息包括系统内存中文件的目录层级信息,以及文件的目录层级信息对应的数据信息。根据目录层级信息,将目录层级信息对应的数据信息存放到预设的虚拟文件目录中。其中,预设的虚拟文件目录指根据用户自定义创建的,用于存放系统文件信息的文件目录。进一步地,通过模拟执行框架中的Hook函数对预设接口调用函数进行解析,将预设接口函数的调用路径变更成从预设的虚拟文件目录进行调用。
需要说明的是,通过将预设接口函数的调用路径变更成从预设的虚拟文件目录进行调用,当检测到预设的接口函数对虚拟文件进行访问时,根据调用路径的变更,直接将对虚拟文件的访问映射到对预设的虚拟文件目录中进行访问,以实现将对虚拟文件的访问映射到系统文件。
本实施例中,通过预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;根据预设的虚拟文件目录,通过Hook函数将预设的接口调用函数的调用路径替换成预设的虚拟文件目录路径。能够从系统中获取真实的数据信息,防止因为数据错误的时候,跳出对待模拟elf文件的模拟,提高对待模拟elf模拟的可靠性。
在一实施例中,如图6所示,在步骤S40中,所述根据预设的函数地址,对待拦截函数的函数地址进行修改,包括:
S41:从预设的函数地址表中,获取待拦截函数地址。
其中,预设的函数地址表指通过用户地址表创建函数自定义创建的地址表。示例性地,通过write_function_table 函数创建Jni Function Table地址表。进一步地,从预设的函数地址表中获取待拦截函数地址。待拦截函数可以是预设接口调用函数,待拦截函数地址可以是预设接口调用函数地址。
S42:根据预设的函数地址,对待拦截函数地址进行修改。
具体地,根据预设的函数地址,对待拦截函数地址进行修改,以使得待拦截函数根据预设的函数地址执行对应的模块。
需要说明的是,对待拦截函数的地址进行修改后,当通过模拟执行框架中的Hook函数对待拦截函数进行拦截或控制后,根据预设的函数地址,通过待拦截函数执行预设的函数地址对应的模块。
示例性地,通过write_function_table 函数创建Jni Function Table地址表。Jni Function Table地址表中包括函数A。函数A对应模块C,预设的函数地址为D,将函数A对应模块C进行变更,得到函数A对应模块D,函数A被模拟执行框架中的Hook函数控制后,函数A优先执行模块D。
本实施例中,通过从预设的函数地址表中,获取待拦截函数地址,根据预设的函数地址,对待拦截函数地址进行修改。能够在模拟elf文件时根据用户的需求对用户自定义的函数地址,找到对应的模块数据,提高共享库文件模拟方法的实用性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种共享库文件模拟装置,该共享库文件模拟装置与上述实施例中共享库文件模拟方法一一对应。如图7所示,该共享库文件模拟装置包括:文件映射模块10、内存隔离模块20、访问映射模块30、地址修改模块40、函数注册模块50、数据输出模块60。各功能模块详细说明如下:
文件映射模块10,用于通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
内存隔离模块20,用于通过模拟执行框架的虚拟内存机制,将虚拟内存与系统内存隔离;
访问映射模块30,用于通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
地址修改模块40,用于根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,待拦截函数为共享库格式文件中的函数;
函数注册模块50,用于对预设的函数变量名和预设的函数名进行注册,以使得模拟执行框架中的Hook函数能够根据预设的函数变量名和预设的函数名对待拦截函数进行返回;
数据输出模块60,用于通过Objdump命令获取待模拟共享库文件的依赖项,并通过Hook函数对待模拟共享库文件中的待拦截函数进行返回,并通过模拟执行框架对待拦截函数返回的值进行输出,以实现对待模拟共享库文件进行分析。
进一步地,共享库文件模拟装置还包括:
指令检测模块601,用于对模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,寄存器中包括待拦截函数编号;
数值读取模块602,用于当存在无条件执行指令时,则读取寄存器中的数值;
函数编号模块603,用于根据寄存器中的数值从待拦截函数编号提取对应的目标待拦截函数编号;
函数确定模块604,用于根据目标待拦截函数编号确定待拦截函数。
进一步地,文件映射模块10包括:
文件解析子模块11,用于通过Pyelftools库,对待模拟共享库文件进行解析,得到待模拟共享库文件中初始化数组的基地址和结构体指针地址;
地址确定子模块12,用于根据基地址和所述结构体指针地址,确定初始化数组地址;
函数映射子模块13,用于根据初始化数组地址,将初始化数组中的初始化函数映射到模拟执行框架的虚拟内存中。
进一步地,访问映射模块30包括:
函数分配子模块31,用于根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;
路径替换子模块32,用于根据预设的虚拟文件目录,通过Hook函数将预设的接口调用函数的调用路径替换成预设的虚拟文件目录路径。
进一步地,地址修改模块40包括:
地址获取子模块41,用于从预设的函数地址表中,获取待拦截函数地址;
地址修改子模块42,用于根据预设的函数地址,对待拦截函数地址进行修改。
关于共享库文件模拟装置的具体限定可以参见上文中对于共享库文件模拟方法的限定,在此不再赘述。上述共享库文件模拟装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种共享库文件模拟方法。
在一实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行计算机可读指令时实现上述实施例中共享库文件模拟方法的步骤,例如步骤S10至步骤S60。或者,处理器执行计算机可读指令时实现上述实施例中共享库文件模拟装置的各模块/单元的功能,例如模块10至模块60的功能。为避免重复,此处不再赘述。本实施例中的可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
在一实施例中,提供了一种计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时实现上述方法实施例中共享库文件模拟方法,或者,该计算机可读指令被处理器执行时实现上述装置实施例中共享库文件模拟装置中各模块/单元的功能。为避免重复,此处不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,该计算机可读指令可存储于一非易失性可读存储介质也可以存储在易失性可读存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种共享库文件模拟方法,其中,所述共享库文件模拟方法包括:
    通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
    通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
    通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
    根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
    对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
    通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
  2. 如权利要求1所述的共享库文件模拟方法,其中,在所述通过预设的命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回之前,包括:
    对所述模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,所述寄存器中包括待拦截函数编号;
    若存在无条件执行指令,则读取所述寄存器中的数值;
    根据所述寄存器中的数值从所述待拦截函数编号提取对应的目标待拦截函数编号;
    根据所述目标待拦截函数编号确定所述待拦截函数。
  3. 如权利要求1所述的共享库文件模拟方法,其中,所述通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中包括:
    通过Pyelftools库,对所述待模拟共享库文件进行解析,得到所述待模拟共享库文件中初始化数组的基地址和结构体指针地址;
    根据所述基地址和所述结构体指针地址,确定所述初始化数组地址;
    根据所述初始化数组地址,将所述初始化数组中的初始化函数映射到所述模拟执行框架的虚拟内存中。
  4. 如权利要求1所述的共享库文件模拟方法,其中,所述通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件包括:
    根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;
    根据预设的虚拟文件目录,通过所述Hook函数将所述预设的接口调用函数的调用路径替换成所述预设的虚拟文件目录路径。
  5. 如权利要求1所述的共享库文件模拟方法,其中,所述根据预设的函数地址,对待拦截函数的函数地址进行修改包括:
    从预设的函数地址表中,获取所述待拦截函数地址;
    根据预设的函数地址,对所述待拦截函数地址进行修改。
  6. 一种共享库文件模拟装置,其中,所述共享库文件模拟装置包括:
    文件映射模块,用于通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
    内存隔离模块,用于通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
    访问映射模块,用于通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
    地址修改模块,用于根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
    函数注册模块,用于对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
    数据输出模块,用于通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
  7. 如权利要求6所述的共享库文件模拟装置,其中,所述共享库文件模拟装置还包括:
    指令检测模块,用于对所述模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,所述寄存器中包括待拦截函数编号;
    数值读取模块,用于当存在无条件执行指令时,则读取所述寄存器中的数值;
    函数编号模块,用于根据所述寄存器中的数值从所述待拦截函数编号提取对应的目标待拦截函数编号;
    函数确定模块,用于根据所述目标待拦截函数编号确定所述待拦截函数。
  8. 如权利要求6所述的共享库文件模拟装置,其中,所述文件映射模块包括:
    文件解析子模块,用于通过Pyelftools库,对所述待模拟共享库文件进行解析,得到所述待模拟共享库文件中初始化数组的基地址和结构体指针地址;
    地址确定子模块,用于根据所述基地址和所述结构体指针地址,确定所述初始化数组地址;
    函数映射子模块,用于根据所述初始化数组地址,将所述初始化数组中的初始化函数映射到所述模拟执行框架的虚拟内存中。
  9. 如权利要求6所述的共享库文件模拟装置,其中,所述访问映射模块包括:
    函数分配子模块,用于根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;
    路径替换子模块,用于根据预设的虚拟文件目录,通过所述Hook函数将所述预设的接口调用函数的调用路径替换成所述预设的虚拟文件目录路径。
  10. 如权利要求6所述的共享库文件模拟装置,其中,所述地址修改模块包括:
    地址获取子模块,用于从预设的函数地址表中,获取所述待拦截函数地址;
    地址修改子模块,用于根据预设的函数地址,对所述待拦截函数地址进行修改。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
    通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
    通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
    根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
    对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
    通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
  12. 如权利要求11所述的计算机设备,其中,在所述通过预设的命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    对所述模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,所述寄存器中包括待拦截函数编号;
    若存在无条件执行指令,则读取所述寄存器中的数值;
    根据所述寄存器中的数值从所述待拦截函数编号提取对应的目标待拦截函数编号;
    根据所述目标待拦截函数编号确定所述待拦截函数。
  13. 如权利要求11所述的计算机设备,其中,所述通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中,包括:
    通过Pyelftools库,对所述待模拟共享库文件进行解析,得到所述待模拟共享库文件中初始化数组的基地址和结构体指针地址;
    根据所述基地址和所述结构体指针地址,确定所述初始化数组地址;
    根据所述初始化数组地址,将所述初始化数组中的初始化函数映射到所述模拟执行框架的虚拟内存中。
  14. 如权利要求11所述的计算机设备,其中,所述通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件,包括:
    根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;
    根据预设的虚拟文件目录,通过所述Hook函数将所述预设的接口调用函数的调用路径替换成所述预设的虚拟文件目录路径。
  15. 如权利要求11所述的计算机设备,其中,所述根据预设的函数地址,对待拦截函数的函数地址进行修改,包括:
    从预设的函数地址表中,获取所述待拦截函数地址;
    根据预设的函数地址,对所述待拦截函数地址进行修改。
  16. 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中;
    通过所述模拟执行框架的虚拟内存机制,将所述虚拟内存与系统内存隔离;
    通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件;
    根据预设的函数地址,对待拦截函数的函数地址进行修改,其中,所述待拦截函数为共享库格式文件中的函数;
    对预设的函数变量名和预设的函数名进行注册,以使得所述模拟执行框架中的Hook函数能够根据所述预设的函数变量名和所述预设的函数名对所述待拦截函数进行返回;
    通过Objdump命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回,并通过模拟执行框架对所述待拦截函数返回的值进行输出,以实现对所述待模拟共享库文件进行分析。
  17. 如权利要求16所述的可读存储介质,其中,在所述通过预设的命令获取所述待模拟共享库文件的依赖项,并通过所述Hook函数对所述待模拟共享库文件中的所述待拦截函数进行返回之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    对所述模拟执行框架的寄存器进行访问,并检测是否存在无条件执行指令,其中,所述寄存器中包括待拦截函数编号;
    若存在无条件执行指令,则读取所述寄存器中的数值;
    根据所述寄存器中的数值从所述待拦截函数编号提取对应的目标待拦截函数编号;
    根据所述目标待拦截函数编号确定所述待拦截函数。
  18. 如权利要求16所述的可读存储介质,其中,所述通过模拟执行框架,将待模拟共享库文件映射到所述模拟执行框架的虚拟内存中,包括:
    通过Pyelftools库,对所述待模拟共享库文件进行解析,得到所述待模拟共享库文件中初始化数组的基地址和结构体指针地址;
    根据所述基地址和所述结构体指针地址,确定所述初始化数组地址;
    根据所述初始化数组地址,将所述初始化数组中的初始化函数映射到所述模拟执行框架的虚拟内存中。
  19. 如权利要求16所述的可读存储介质,其中,所述通过模拟执行框架中的虚拟文件系统,将对虚拟文件的访问映射到系统文件,包括:
    根据预设的分配方式,对接口调用函数进行分配,得到预设的接口调用函数;
    根据预设的虚拟文件目录,通过所述Hook函数将所述预设的接口调用函数的调用路径替换成所述预设的虚拟文件目录路径。
  20. 如权利要求16所述的可读存储介质,其中,所述根据预设的函数地址,对待拦截函数的函数地址进行修改,包括:
    从预设的函数地址表中,获取所述待拦截函数地址;
    根据预设的函数地址,对所述待拦截函数地址进行修改。
     
PCT/CN2020/135727 2020-04-30 2020-12-11 共享库文件模拟方法、装置、计算机设备及存储介质 WO2021218172A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010367839.4 2020-04-30
CN202010367839.4A CN111666586A (zh) 2020-04-30 2020-04-30 共享库文件模拟方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021218172A1 true WO2021218172A1 (zh) 2021-11-04

Family

ID=72383141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135727 WO2021218172A1 (zh) 2020-04-30 2020-12-11 共享库文件模拟方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111666586A (zh)
WO (1) WO2021218172A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499402A (zh) * 2022-08-23 2022-12-20 北京天空卫士网络安全技术有限公司 一种即时通信信息的处理方法、终端和系统
CN115858012A (zh) * 2022-12-30 2023-03-28 广州市易鸿智能装备有限公司 程序变量配置方法、装置、电子设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666586A (zh) * 2020-04-30 2020-09-15 平安科技(深圳)有限公司 共享库文件模拟方法、装置、计算机设备及存储介质
CN115471971B (zh) * 2021-06-10 2024-05-07 中国石油化工股份有限公司 盆地模拟阶段数据处理方法、装置及计算机可读存储介质
CN116089019B (zh) * 2023-03-07 2023-06-06 苏州宏存芯捷科技有限公司 面向Hexagon架构的细粒度CPU模拟器

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020019887A1 (en) * 2000-05-09 2002-02-14 International Business Machines Corporation Intercepting system API calls
CN106325927A (zh) * 2016-08-19 2017-01-11 北京金山安全管理系统技术有限公司 一种应用于Linux系统中动态库API的拦截方法及装置
CN109426496A (zh) * 2017-08-31 2019-03-05 武汉斗鱼网络科技有限公司 程序日志写入文件的方法、存储介质、电子设备及系统
CN109753322A (zh) * 2017-08-29 2019-05-14 武汉斗鱼网络科技有限公司 一种ios平台上对应用程序的加速方法和装置
CN111666586A (zh) * 2020-04-30 2020-09-15 平安科技(深圳)有限公司 共享库文件模拟方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020019887A1 (en) * 2000-05-09 2002-02-14 International Business Machines Corporation Intercepting system API calls
CN106325927A (zh) * 2016-08-19 2017-01-11 北京金山安全管理系统技术有限公司 一种应用于Linux系统中动态库API的拦截方法及装置
CN109753322A (zh) * 2017-08-29 2019-05-14 武汉斗鱼网络科技有限公司 一种ios平台上对应用程序的加速方法和装置
CN109426496A (zh) * 2017-08-31 2019-03-05 武汉斗鱼网络科技有限公司 程序日志写入文件的方法、存储介质、电子设备及系统
CN111666586A (zh) * 2020-04-30 2020-09-15 平安科技(深圳)有限公司 共享库文件模拟方法、装置、计算机设备及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499402A (zh) * 2022-08-23 2022-12-20 北京天空卫士网络安全技术有限公司 一种即时通信信息的处理方法、终端和系统
CN115858012A (zh) * 2022-12-30 2023-03-28 广州市易鸿智能装备有限公司 程序变量配置方法、装置、电子设备及存储介质
CN115858012B (zh) * 2022-12-30 2023-10-20 广州市易鸿智能装备有限公司 程序变量配置方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN111666586A (zh) 2020-09-15

Similar Documents

Publication Publication Date Title
WO2021218172A1 (zh) 共享库文件模拟方法、装置、计算机设备及存储介质
CN109344642B (zh) 接口规则校验方法、装置、计算机设备及存储介质
US8621279B1 (en) System and method for generating emulation-based scenarios for Error Handling
US10990674B2 (en) Malware clustering based on function call graph similarity
US7716641B2 (en) Method and system for automatically identifying and marking subsets of localizable resources
KR102324336B1 (ko) 사용자 장치 및 그것에 대한 무결성 검증 방법
US9152796B2 (en) Dynamic analysis interpreter modification for application dataflow
CN113569246B (zh) 漏洞检测方法、装置、计算机设备和存储介质
US20090007081A1 (en) System and Method of Generating Applications for Mobile Devices
US11726799B2 (en) Preventing framework conflicts for multi-OS applications
Song et al. Model-checking for android malware detection
TW201610735A (zh) 利用運行期代理器及動態安全分析之應用程式逐點保護技術
US20210240829A1 (en) Malware Clustering Based on Analysis of Execution-Behavior Reports
CN109271789B (zh) 恶意进程检测方法、装置、电子设备及存储介质
US9658867B2 (en) Preserving object code translations of a library for future reuse by an emulator
CN114780950A (zh) 应用软件跨版本兼容运行的方法、系统、装置及存储介质
CN110765152B (zh) Sql提取方法、装置、计算机设备和存储介质
Yuhala et al. Montsalvat: Intel SGX shielding for GraalVM native images
US20160092313A1 (en) Application Copy Counting Using Snapshot Backups For Licensing
CN110597496B (zh) 应用程序的字节码文件获取方法及装置
US10929126B2 (en) Intercepting and replaying interactions with transactional and database environments
CN113792299B (zh) 一种基于ftrace技术的Linux系统保护方法
CN108287992A (zh) 一种基于安卓的计算器学习的恶意程序检测系统
Wang et al. DisTA: Generic dynamic taint tracking for java-based distributed systems
US20220391355A9 (en) Management of contextual information for data

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: 20932928

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 21/12/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20932928

Country of ref document: EP

Kind code of ref document: A1