Terminal testing method and device and electronic equipment

By obtaining the interface information and code data of the application framework, and using a large language model to generate monitoring point scripts for fuzz testing, it solves the problem that existing technology cannot cover services modified by manufacturers, and improves the effectiveness of vulnerability mining.

CN118672837APending Publication Date: 2024-09-20VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410875446.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing vulnerability mining technology cannot effectively cover the customized changes made by manufacturers to the Android system, resulting in poor vulnerability mining results.

Method used

By obtaining the interface information and code data of the application framework, the large language model is used to generate scripts including monitoring points in the application framework, and fuzz testing is performed on the command server to cover services modified by the manufacturer.

Benefits of technology

The accuracy and coverage of vulnerability mining are improved, and potential vulnerabilities can be discovered more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672837A
    Figure CN118672837A
Patent Text Reader

Abstract

The invention discloses a terminal testing method and device and electronic equipment, and belongs to the technical field of testing. The terminal testing method comprises the steps that a testing manager obtains interface information of an application framework, and the application framework is a framework deployed by a terminal; the test manager obtains code data of the application framework; the test manager inputs the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, and the first script comprises one or more monitoring points in the application framework; the test manager sends the first script to an instruction server; wherein the instruction server performs a fuzzy test based on one or more monitoring points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of testing technology, and specifically relates to a terminal testing method, device and electronic equipment. Background Art

[0002] Android is the mainstream operating system for existing electronic devices. As a mainstream operating system, it has attracted the attention of many attackers. A large number of public service interfaces in the Android system are the main targets of malicious programs. By exploiting potential vulnerabilities in the services, attackers can maliciously escalate privileges.

[0003] Manufacturers will customize services in the Android system based on actual usage needs. Existing vulnerability mining cannot cover the services modified by manufacturers, and the effect of vulnerability mining is not good. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a terminal testing method, device and electronic device, which can solve the problem that the existing vulnerability mining cannot cover the services modified by the manufacturer and the vulnerability mining effect is poor.

[0005] In a first aspect, an embodiment of the present application provides a terminal testing method, including: a test manager obtains interface information of an application framework, which is a framework deployed by the terminal; the test manager obtains code data of the application framework; the test manager inputs the interface information of the application framework and the code data of the application framework into a first model to obtain a first script output by the first model, the first script including one or more monitoring points in the application framework; the test manager sends the first script to an instruction server; wherein the instruction server performs fuzz testing based on one or more monitoring points.

[0006] In the second aspect, an embodiment of the present application provides a terminal testing device, including: an acquisition module, used to control the test manager to obtain interface information of an application framework, which is a framework deployed by the terminal; the acquisition module, also used to control the test manager to obtain code data of the application framework; a processing module, used to control the test manager to input the interface information of the application framework and the code data of the application framework into a first model to obtain a first script output by the first model, the first script including one or more monitoring points in the application framework; a sending module, used to control the test manager to send the first script to an instruction server; wherein the instruction server performs fuzzy testing based on one or more monitoring points.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.

[0011] In an embodiment of the present application, the interface information of the application framework and the code data of the application framework can be obtained, and the interface information of the application framework and the code data of the application framework can be transmitted to the first model, and the first model is used to generate a first script including one or more monitoring points in the application framework for the instruction server deployed by the terminal to perform fuzz testing. In this process, in the process of generating the first script of one or more monitoring points, the first model's understanding of the code data of the application framework is increased, making the one or more monitoring points in the first script more accurate, thereby covering the services modified by the manufacturer and improving the effect of vulnerability mining. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a flowchart of a terminal testing method provided in some embodiments of the present application;

[0013] Figure 2 is a schematic diagram of the interaction process between the control device and the Android device in some embodiments of the present application;

[0014] Figure 3 is a schematic block diagram of a terminal testing device provided in some embodiments of the present application;

[0015] Figure 4 is a schematic block diagram of an electronic device in an embodiment of the present application;

[0016] Figure 5 It is a schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly describe the embodiments in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.

[0018] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0019] Fuzz testing technology (Fuzz) is an efficient vulnerability mining technology. Its core idea is to input automatically or semi-automatically generated random data into a program and monitor program exceptions such as crashes and assertion failures to discover possible program errors, such as memory leaks.

[0020] Exemplarily, the fuzz testing tool that applies the fuzz testing technology is American Fuzzy Lop (AFL). Specifically, AFL is a coverage-guided fuzz testing tool that records the code coverage of input samples and adjusts the input samples to improve the coverage and increase the probability of discovering vulnerabilities.

[0021] The following describes in detail the terminal testing method, device and electronic device provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0022] In one embodiment, if Figure 1 As shown, a terminal testing method is proposed, including:

[0023] Step 102: The test manager obtains interface information of the application framework, where the application framework is a framework deployed by the terminal.

[0024] Step 104: The test manager obtains code data of the application framework.

[0025] Step 106 : The test manager inputs the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, wherein the first script includes one or more monitoring points in the application framework.

[0026] In some embodiments of the present application, the first model is a Large Language Model (LLM).

[0027] Step 108: The test manager sends the first script to the instruction server.

[0028] The instruction server performs fuzz testing based on one or more monitoring points.

[0029] In an embodiment of the present application, the interface information of the application framework and the code data of the application framework can be obtained, and the interface information of the application framework and the code data of the application framework can be transmitted to the first model, and the first model is used to generate a first script including one or more monitoring points in the application framework for the instruction server deployed by the terminal to perform fuzz testing. In this process, in the process of generating the first script of one or more monitoring points, the first model's understanding of the code data of the application framework is increased, making the one or more monitoring points in the first script more accurate, thereby covering the services modified by the manufacturer and improving the effect of vulnerability mining.

[0030] In some embodiments of the present application, the test manager obtains interface information of the application framework, specifically including: the test manager obtains first interface information from the test client, the first interface information is interface information determined according to the services opened in the application framework; the test manager obtains second interface information, the second interface information is interface information determined according to the code data of the application framework; the test manager determines the interface information of the application framework based on the first interface information and the second interface information.

[0031] In this embodiment, the first interface information is interface information determined based on the services opened in the application framework, which is dynamic interface information. The second interface information is interface information determined based on the code data of the application framework, which is static interface information. In the related technical solutions, fuzzy testing is mostly performed using static interface information, but the accuracy of fuzzy testing using static interface information is low, while fuzzy testing is less performed using dynamic interface information, but the accuracy of fuzzy testing is higher. In the embodiments of the present application, dynamic interface information and static interface information are combined together as the interface information of the application framework to ensure the accuracy of the fuzzy test.

[0032] In some embodiments of the present application, based on the first interface information and the second interface information, determining the interface information of the application framework specifically includes: supplementing the first interface information based on the second interface information to obtain the interface information of the application framework. Exemplarily, the first interface information is compared with the second interface information to determine the first information in the first interface information, wherein the first information is the interface information in the first interface information that is different from the second interface information, and the first information is corrected based on the second interface information.

[0033] Exemplarily, the first interface information includes information 1, wherein information 1 has no value, and the second interface information includes information 1, wherein information 1 has a value, then the value of information 1 in the second interface information is assigned to information 1 in the first interface information, thereby achieving correction of the interface information.

[0034] In some embodiments of the present application, the test manager obtains the first interface information from the test client, including: the test manager obtains the service name of the first service and the interface descriptor of the first service from the test client; or the test manager obtains the function name of the first interface function, the function parameters of the first interface function and the unique identity code of the first interface from the test client, where the first interface function is an interface function included in the first service; wherein the first service is a service open in the application framework.

[0035] In some embodiments of the present application, the first interface information can be obtained using HiddenApiBypass, freeReflection, or an interface customized by an original equipment manufacturer (OEM), where HiddenApiBypass or freeReflection are open source projects used to obtain interface information corresponding to services open in an application framework.

[0036] In some embodiments of the present application, the application framework includes a service manager, namely, ServiceManager, and the first interface information can be obtained from the service manager by reflection.

[0037] In some embodiments of the present application, the test manager obtains the code data of the application framework, specifically including: the test manager obtains the code package of the application framework; the test manager decompiles the code package to obtain the code data of the application framework.

[0038] In this embodiment, the code package of the application framework is a code package in one or more of the following locations:

[0039] 1) Framework-related code packages in the / system / framework / directory;

[0040] 2) The apex module related code package in the / system / apex / directory;

[0041] 3)so related codes in the / system / lib64 / directory.

[0042] The apex modules in the / system / framework / and / system / apex / directories and the so in the / system / lib64 / directory are the storage paths for the application framework code packages.

[0043] Specifically, the framework-related code packages in the / system / framework / directory and the apex module-related code packages in the / system / apex / directory are decompiled using Jadx; the so-related codes in the / system / lib64 / directory are obtained using an interactive disassembler (IDA) or Ghidra.

[0044] Among them, Jadx is a decompilation tool, IDA and Ghidra binary decompilation tools.

[0045] In some embodiments of the present application, for the so-related code in the / system / lib64 / directory, the Native code format of AIDL is adopted and confirmed using a large model, wherein AIDL is the Android interface definition language. Specifically, after decompiling the so-related code in the / system / lib64 / directory, the interface registration location is found through the service manager, and the header file corresponding to the interface is found according to the interface registration location, thereby extracting the header file to obtain the second interface information.

[0046] In some embodiments of the present application, the first interface information and the second interface information may be acquired using a black box or a white box, and the specific acquisition process will not be described in detail herein.

[0047] In some embodiments of the present application, the test manager inputs the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, specifically including: the test manager uses the first model to extract functions from the code data to determine a first function in the code data, where the first function is a function related to permission verification and / or identity verification; based on the first function, the test manager uses the first model to extract functions from the code data again to obtain a second function, where the second function is a function related to permission verification and / or identity verification; the test manager constructs a first script based on the interface information of the application framework, the first function, and the second function.

[0048] In this embodiment, function extraction is performed on the code data, and the first function extracted is a function related to permission verification and / or identity verification in the original application framework. After obtaining the first function, function extraction is performed on the code data again based on the first function, so that functions related to permission verification and / or identity verification can be extracted after the original equipment manufacturer modifies the service in the application framework, that is, the second function is obtained.

[0049] The first script is a script constructed based on the interface information of the first function, the second function and the application framework, which involves the second function. Therefore, one or more monitoring points in the first script can cover the services modified by the manufacturer and improve the effect of vulnerability mining.

[0050] In some embodiments of the present application, the first model uses pre-built construction rules to build the first script based on the interface information of the application framework, the first function and the second function.

[0051] In some embodiments of the present application, the terminal testing method also includes: the test manager obtains from the instruction server monitoring information output by one or more monitoring points when the terminal performs testing with a first fuzzy testing task, the monitoring information including a first verification parameter and a verification result corresponding to the first verification parameter, and the first fuzzy testing task is a fuzzy testing task constructed based on random parameters; the test manager inputs the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain the first parameter output by the first model; the test manager sends the first parameter to the test client; wherein the test client uses the first parameter as an updated random parameter to update the first fuzzy testing task.

[0052] In this embodiment, fuzz testing is performed by inputting random parameters into a program and monitoring program exceptions. Therefore, during the execution of the first fuzz testing task constructed based on the random parameters, the first verification parameters and the verification results corresponding to the first verification parameters can be obtained, and then the first verification parameters and the verification results corresponding to the first verification parameters can be input into the first model, and the updated random parameters can be generated using the first model.

[0053] During this process, the first model can generate a first parameter to replace the previous random parameter to update the first fuzz test task. During this process, random parameters can be selected with bias, reducing the uncertainty of using random parameters during fuzz testing, reducing the number of fuzz test rounds, and improving fuzz test efficiency.

[0054] In some embodiments of the present application, the test manager inputs the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain the first parameter output by the first model, specifically including: based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has an identity verification for a common account, the test manager uses the first model to generate the first parameter; or based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has a scenario of bypassing the identity verification, the test manager uses the first model to generate the first parameter; or based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has a permission verification scenario, the test manager uses the first model to generate the first parameter.

[0055] In this embodiment, the first model determines whether the terminal has an identity verification for a common account, whether the terminal bypasses the identity verification scenario, and whether the terminal has an authority verification scenario based on the first verification parameter and the verification result corresponding to the first verification parameter. If the above situation exists, it is considered that the random parameter used in the first fuzzy testing task is unreasonable. At this time, the first model generates the first parameter to update the random parameter. If the above situation does not exist, the random parameter remains unchanged.

[0056] In some embodiments of the present application, when the device running the terminal testing method proposed in the present application is a control device and the terminal is an Android device, Figure 2 is a schematic diagram of the interaction process between the control device and the Android device in some embodiments of the present application, such as Figure 2 As shown, the Android device includes a test client 202, an application framework 204 and an instruction server 206, the test client 202 includes a service acquisition 2022, a call construction module 2024, an instruction processing module 2026 and a single-step execution module 2028, the application framework 204 includes a service manager 2042 and a target service, the instruction server 206 includes a stub monitoring module 2062 and a feedback device 2064, the control device includes a test manager 208 and a first model 210, the test manager 208 includes an information collection module 2082, a stub construction module 2084, a parameter variation module 2086 and a process control module 2088.

[0057] Specifically, the target service may be service 1, service 2, service 3, . . .

[0058] Exemplarily, the target service includes a Binder driver, such as getCallingUid() and getCallingPid().

[0059] Exemplarily, the target service includes PackageManagerService, wherein PackageManagerService is an Android system core service, such as checkUidPermission().

[0060] Exemplarily, the target service includes a Context, such as enforcePermission().

[0061] Among them, Binder driver, such as getCallingUid(), getCallingPid(), PackageManagerService, such as checkUidPermission(), Context, such as enforcePermission() are services in the Android system.

[0062] Among them, the call construction module 2024 in the test client 202 is responsible for obtaining key service information from the application framework 204, the instruction processing module 2026 is used to receive and parse the instructions issued by the test manager 208 in the control device, and the single-step execution module 2028 is used to construct and execute single-step fuzzy test commands.

[0063] The command server 206, the stub monitoring module 2062 in the command server 206 is responsible for performing stub monitoring in the application framework 204, the stub location is determined by the test manager 208 in the control device, and the stub result is fed back to the test manager 208 of the control device by the feedback device 2064 to determine the subsequent parameter variation.

[0064] The test manager 208 and the process control module 2088 in the test manager 208 monitor and control the entire fuzzy process; the information collection module 2082 processes the received service information, and the pile point construction module 2084 combines the first model 210 to generate pile points that can be used by the instruction server, that is, monitoring points; the parameter variation module 2086 is used to perform parameter variation and generation in combination with the first model 210 after receiving the information transmitted by the feedback device 2064.

[0065] The interaction process between the control device and the Android device includes:

[0066] Step 1: The test client obtains the services open to the public in the application framework.

[0067] Step 2: The test client sends the information obtained in step 1 to the information collection module in the test manager. At the same time, the information collection module in the test manager obtains code data from the application framework.

[0068] Step 3: The pile point construction module inputs the data obtained in step 2 into the first model, and requires the following operations to be performed step by step from the code data:

[0069] 1. Extract native related permission verification and identity verification related functions from the code data.

[0070] 2. Based on the extracted native related permission verification and identity verification related functions, re-traverse the code data to extract the manufacturer customized permission verification and identity verification related functions.

[0071] 3. Generate a script that can be used by the pile point monitoring module according to the rules, that is, the first script.

[0072] Step 4: After initialization, the test client starts fuzz testing on the current interface.

[0073] Step 5: If the target service has identity verification, permission verification or manufacturer-defined verification, the corresponding verification parameters and feedback results can be monitored through the command server.

[0074] Step 6: The feedback device returns the data obtained in step 5 to the test manager, and the test manager inputs the feedback verification parameters and feedback results into the first model and adjusts them in the parameter variation module.

[0075] Specifically, the parameter variation module includes the following cases:

[0076] 1. The first model determines whether there is identity verification for ordinary accounts and whether different parameters can be passed in from outside to bypass the verification. If so, the first model generates more reasonable parameters, such as the common parameters in the framework of 0, 1000, and 10000. If not, the original random parameters remain unchanged.

[0077] 2. Determine whether there is a permission check, and the test manager obtains and records the detailed information of the permission.

[0078] 3. The first model determines whether the parameters are reasonable, and generates more reasonable first parameters by combining the first model with the static code. For example, when a specific class is collected, the large model generates a construction object and fills in the corresponding parameters.

[0079] Step 7: The test manager sends the parameters generated in step 6 to the test client, which parses them to continue the next round of fuzz testing.

[0080] Before the test client performs the first fuzz test, the test manager determines the order of the interface fuzz test based on the results of the information collection module, such as sequential execution. The parameters of the first fuzz test are generated by the test manager and sent to the test client, which receives the instructions and executes them.

[0081] In the fuzz test of the current interface, if the (authority|identity) obtained by the feedback device in the instruction server no longer changes, such as the content and quantity of the two no longer increase, the current fuzz test is determined to be over, and a new round of fuzz testing is performed by the test manager.

[0082] In this embodiment, by finally obtaining the "interface-authority-identity" matrix, interfaces that may have potential risks can be easily determined, and secondary confirmation can be performed manually to improve the efficiency of vulnerability discovery, and related vulnerabilities can be checked and repaired in a timely manner to prevent problems before they occur.

[0083] The terminal testing method provided in the embodiment of the present application can be executed by a terminal testing device. In the embodiment of the present application, the terminal testing method is executed by a terminal testing device as an example to illustrate the terminal testing device provided in the embodiment of the present application.

[0084] In some embodiments of the present application, Figure 3 As shown, a terminal testing device 300 is provided, including: an acquisition module 302, used to control the test manager to obtain interface information of an application framework, where the application framework is a framework deployed by the terminal; the acquisition module 302 is also used to control the test manager to obtain code data of the application framework; a processing module 304 is used to control the test manager to input the interface information of the application framework and the code data of the application framework into a first model to obtain a first script output by the first model, where the first script includes one or more monitoring points in the application framework; a sending module 306 is used to control the test manager to send the first script to an instruction server; wherein the instruction server performs fuzz testing based on one or more monitoring points.

[0085] In an embodiment of the present application, the interface information of the application framework and the code data of the application framework can be obtained, and the interface information of the application framework and the code data of the application framework can be transmitted to the first model, and the first model is used to generate a first script including one or more monitoring points in the application framework for the instruction server deployed by the terminal to perform fuzz testing. In this process, in the process of generating the first script of one or more monitoring points, the first model's understanding of the code data of the application framework is increased, making the one or more monitoring points in the first script more accurate, thereby covering the services modified by the manufacturer and improving the effect of vulnerability mining.

[0086] In some embodiments of the present application, the acquisition module 302 is specifically used to: control the test manager to obtain first interface information from the test client, the first interface information is interface information determined according to the services opened in the application framework; control the test manager to obtain second interface information, the second interface information is interface information determined according to the code data of the application framework; control the test manager to determine the interface information of the application framework based on the first interface information and the second interface information.

[0087] In some embodiments of the present application, the acquisition module 302 is specifically used to: control the test manager to obtain the service name of the first service and the interface descriptor of the first service from the test client; or control the test manager to obtain the function name of the first interface function, the function parameters of the first interface function and the unique identity code of the first interface from the test client, where the first interface function is an interface function included in the first service; wherein the first service is a service open in the application framework.

[0088] In some embodiments of the present application, the acquisition module 302 is specifically used to: control the test manager to acquire the code package of the application framework; control the test manager to decompile the code package to obtain the code data of the application framework.

[0089] In some embodiments of the present application, the processing module 304 is specifically used to: control the test manager to use the first model to extract functions from the code data to determine a first function in the code data, where the first function is a function related to permission verification and / or identity verification; control the test manager to use the first model to extract functions from the code data again based on the first function to obtain a second function, where the second function is a function related to permission verification and / or identity verification; control the test manager to construct a first script based on the interface information of the application framework, the first function, and the second function.

[0090] In some embodiments of the present application, the acquisition module 302 is also used to: control the test manager to obtain from the instruction server the monitoring information output by one or more monitoring points when the terminal performs the test with the first fuzzy test task, the monitoring information includes a first verification parameter and a verification result corresponding to the first verification parameter, and the first fuzzy test task is a fuzzy test task constructed based on random parameters; the processing module 304 is also used to control the test manager to input the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain the first parameter output by the first model; the sending module 306 is also used to control the test manager to send the first parameter to the test client; wherein the test client uses the first parameter as the updated random parameter to update the first fuzzy test task.

[0091] In some embodiments of the present application, the processing module 304 is specifically used to: based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has an identity verification for a common account, control the test manager to generate the first parameter using the first model; or based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has a scenario of bypassing the identity verification, control the test manager to generate the first parameter using the first model; or based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has a permission verification scenario, control the test manager to generate the first parameter using the first model.

[0092] The test device of the terminal in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.

[0093] The terminal test device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0094] The terminal testing device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the terminal testing method embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.

[0095] like Figure 4 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 402 and a memory 404, wherein the memory 404 stores programs or instructions that can be executed on the processor 402, and when the program or instructions are executed by the processor 402, the various steps of the test method embodiment of the above-mentioned terminal are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0096] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0097] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0098] like Figure 5As shown, the electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510 and other components.

[0099] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0100] In some embodiments of the present application, the processor 510 is used to control the test manager to obtain interface information of the application framework, which is a framework deployed by the terminal; control the test manager to obtain code data of the application framework; control the test manager to input the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, the first script including one or more monitoring points in the application framework; control the test manager to send the first script to the instruction server; wherein the instruction server performs fuzz testing based on one or more monitoring points.

[0101] In some embodiments of the present application, the processor 510 is specifically used to control the test manager to obtain first interface information from the test client, where the first interface information is interface information determined based on the services opened in the application framework; control the test manager to obtain second interface information, where the second interface information is interface information determined based on the code data of the application framework; and control the test manager to determine the interface information of the application framework based on the first interface information and the second interface information.

[0102] In some embodiments of the present application, the processor 510 is specifically used to control the test manager to obtain the service name of the first service and the interface descriptor of the first service from the test client; or control the test manager to obtain the function name of the first interface function, the function parameters of the first interface function and the unique identity code of the first interface from the test client, where the first interface function is an interface function included in the first service; wherein the first service is a service open in the application framework.

[0103] In some embodiments of the present application, the processor 510 is specifically used to control the test manager to obtain the code package of the application framework; and control the test manager to decompile the code package to obtain the code data of the application framework.

[0104] In some embodiments of the present application, the processor 510 is specifically used to control the test manager to use the first model to extract functions from the code data to determine a first function in the code data, where the first function is a function related to permission verification and / or identity verification; control the test manager to extract functions from the code data again based on the first function using the first model to obtain a second function, where the second function is a function related to permission verification and / or identity verification; control the test manager to construct a first script based on the interface information of the application framework, the first function, and the second function.

[0105] In some embodiments of the present application, the processor 510 is also used to control the test manager to obtain monitoring information output by one or more monitoring points from the instruction server when the terminal performs a test with a first fuzzy test task, the monitoring information including a first verification parameter and a verification result corresponding to the first verification parameter, and the first fuzzy test task is a fuzzy test task constructed based on random parameters; control the test manager to input the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain the first parameter output by the first model; control the test manager to send the first parameter to the test client; wherein the test client uses the first parameter as an updated random parameter to update the first fuzzy test task.

[0106] In some embodiments of the present application, the processor 510 is specifically used to control the test manager to generate the first parameter using the first model when it is determined that the terminal has an identity verification for a common account based on the first verification parameter and the verification result corresponding to the first verification parameter; or to control the test manager to generate the first parameter using the first model when it is determined that the terminal has a scenario of bypassing the identity verification based on the first verification parameter and the verification result corresponding to the first verification parameter; or to control the test manager to generate the first parameter using the first model when it is determined that the terminal has an authority verification scenario based on the first verification parameter and the verification result corresponding to the first verification parameter.

[0107] In an embodiment of the present application, the interface information of the application framework and the code data of the application framework can be obtained, and the interface information of the application framework and the code data of the application framework can be transmitted to the first model, and the first model is used to generate a first script including one or more monitoring points in the application framework for the instruction server deployed by the terminal to perform fuzz testing. In this process, in the process of generating the first script of one or more monitoring points, the first model's understanding of the code data of the application framework is increased, making the one or more monitoring points in the first script more accurate, thereby covering the services modified by the manufacturer and improving the effect of vulnerability mining.

[0108] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0109] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory 509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0110] The processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.

[0111] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the test method embodiment of the above-mentioned terminal is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0112] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0113] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned terminal test method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0114] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0115] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the terminal testing method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0116] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "including one" do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the embodiments of the present application are essentially or partly contributed to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0118] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A terminal testing method, It is characterized in that include: The test manager obtains interface information of an application framework, where the application framework is a framework deployed by the terminal; The test manager obtains code data of the application framework; The test manager inputs the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, wherein the first script includes one or more monitoring points in the application framework; The test manager sends the first script to the instruction server; Wherein, the instruction server performs fuzzy testing based on one or more of the monitoring points.

2. The terminal testing method according to claim 1, It is characterized in that The test manager obtains interface information of the application framework, specifically including: The test manager obtains first interface information from the test client, where the first interface information is interface information determined according to a service opened in the application framework; The test manager acquires second interface information, where the second interface information is interface information determined according to code data of the application framework; The test manager determines interface information of the application framework based on the first interface information and the second interface information.

3. The terminal testing method according to claim 2, It is characterized in that The test manager acquiring the first interface information from the test client includes: The test manager obtains the service name of the first service and the interface descriptor of the first service from the test client; or The test manager obtains a function name of a first interface function, function parameters of the first interface function, and a unique identification code of the first interface from the test client, wherein the first interface function is an interface function included in the first service; The first service is a service opened in the application framework.

4. The terminal testing method according to claim 2, It is characterized in that The test manager obtains the code data of the application framework, specifically including: The test manager obtains a code package of the application framework; The test manager decompiles the code package to obtain code data of the application framework.

5. The terminal testing method according to any one of claims 1 to 4, It is characterized in that The test manager inputs the interface information of the application framework and the code data of the application framework into the first model to obtain a first script output by the first model, specifically including: The test manager uses the first model to perform function extraction on the code data to determine a first function in the code data, where the first function is a function related to permission verification and / or identity verification; The test manager uses the first model to extract functions from the code data again based on the first function to obtain a second function, where the second function is a function related to permission verification and / or identity verification; The test manager constructs a first script based on the interface information of the application framework, the first function, and the second function.

6. The terminal testing method according to any one of claims 1 to 4, It is characterized in that The terminal testing method further includes: The test manager obtains, from the instruction server, monitoring information output by one or more monitoring points when the terminal performs a test with a first fuzzy test task, the monitoring information including a first verification parameter and a verification result corresponding to the first verification parameter, and the first fuzzy test task is a fuzzy test task constructed based on random parameters; The test manager inputs the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain a first parameter output by the first model; The test manager sends the first parameter to the test client; The test client updates the first fuzzy test task based on the first parameter as the updated random parameter.

7. The terminal testing method according to claim 6, It is characterized in that The test manager inputs the first verification parameter and the verification result corresponding to the first verification parameter into the first model to obtain the first parameter output by the first model, specifically including: Based on the first verification parameter and the verification result corresponding to the first verification parameter, when it is determined that the terminal has identity verification for a common account, the test manager generates a first parameter using the first model; or In a case where it is determined that the terminal has a scenario of bypassing identity verification based on the first verification parameter and a verification result corresponding to the first verification parameter, the test manager generates a first parameter using the first model; or When it is determined that the terminal has a permission verification scenario based on the first verification parameter and a verification result corresponding to the first verification parameter, the test manager generates a first parameter using the first model.

8. A terminal testing device, It is characterized in that include: An acquisition module, used to control the test manager to acquire interface information of an application framework, where the application framework is a framework deployed by a terminal; The acquisition module is further used to control the test manager to acquire the code data of the application framework; a processing module, configured to control the test manager to input the interface information of the application framework and the code data of the application framework into the first model, and obtain a first script output by the first model, wherein the first script includes one or more monitoring points in the application framework; A sending module, used for controlling the test manager to send the first script to the instruction server; Wherein, the instruction server performs fuzzy testing based on one or more of the monitoring points.

9. The terminal testing device according to claim 8, It is characterized in that The acquisition module is specifically used for: Controlling the test manager to obtain first interface information from the test client, where the first interface information is interface information determined according to a service opened in the application framework; Controlling the test manager to obtain second interface information, where the second interface information is interface information determined according to code data of the application framework; The test manager is controlled to determine the interface information of the application framework based on the first interface information and the second interface information.

10. An electronic device, It is characterized in that The device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the terminal testing method according to any one of claims 1 to 7 are implemented.