A root detection method and device

By exchanging information between terminal devices in a distributed network and performing legitimacy checks, the root detection problem in the existing technology is solved and network security is ensured.

CN115208902BActive Publication Date: 2025-09-09HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110381736.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-09
Publication Date
2025-09-09
Estimated Expiration
2041-04-09

AI Technical Summary

Technical Problem

In a distributed network, existing technologies cannot effectively detect and identify whether a terminal device has been rooted, causing the risk to spread to the entire network and affecting security.

Method used

By exchanging synchronization information between terminal devices in a distributed network, including registration information, hardware and software service call requests, key registration information, hardware parameters and system configuration information are used to perform legitimacy checks to determine whether there is a root attack.

Benefits of technology

It realizes root detection and identification of terminal devices in distributed networks, ensures the security of user devices in the network, and prevents the spread of root attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208902B_ABST
    Figure CN115208902B_ABST
Patent Text Reader

Abstract

The present application provides a root detection method and device, which is applied to a distributed network, wherein the distributed network includes at least a first terminal and a second terminal that are communicatively connected to each other, and the method includes: the first terminal sends synchronization information to the second terminal, wherein the first synchronization information includes at least the registration information of the first terminal; the first terminal receives a request message sent by the second terminal, wherein the request message is used to request an update of the registration information of the first terminal or a request to call a service of the first terminal; the first terminal determines whether the request message is legal; and the first terminal determines whether the second terminal is rooted based on whether the request message is legal. The root detection method provided in the embodiment of the present application realizes root detection and identification of devices in a distributed network, thereby ensuring the security of user devices in the distributed network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal security technology, and in particular to a root detection method and device. Background Art

[0002] As terminal devices become increasingly powerful, users are increasingly concerned about their security. For terminal devices, if they are rooted, the security risks of the current device are out of control. Existing root detection technologies are based on abnormal behavior characteristics of local devices, such as abnormal kernel calls such as setuid and setgid. Root detection is performed by extracting and analyzing these key characteristics.

[0003] With the development of communications and rising user demands, more and more devices are working together and making calls to each other, forming a distributed multi-terminal scenario. In this scenario, the risk of rooted devices further increases as they join the distributed network, spreading the risk of a single device to the entire distributed network.

[0004] Therefore, how to perform root detection on terminal devices in a distributed network is an urgent problem to be solved.

[0005] Application Contents

[0006] The embodiments of the present application provide a root detection method and apparatus to implement root detection and identification of devices in a distributed network, thereby ensuring the security of user devices in the distributed network.

[0007] In a first aspect, the present application provides a root detection method, which is applied to a distributed network, wherein the distributed network includes at least a first terminal and a second terminal that are communicatively connected to each other, and the method includes: the first terminal sends synchronization information to the second terminal, and the first synchronization information includes at least registration information of the first terminal; the first terminal receives request information sent by the second terminal, and the request information is used to request to update the registration information of the first terminal, or to request to call the service of the first terminal; the first terminal determines whether the request information is legal; and the first terminal determines whether the second terminal is rooted based on whether the request information is legal.

[0008] The root detection method provided in the embodiment of the present application realizes root detection and identification of devices in a distributed network, thereby ensuring the security of user devices in the distributed network.

[0009] In one possible implementation, the request information includes the updated registration information of the first terminal; the first terminal determines whether the request information is legal, including: the first terminal compares the key registration information in the registration information of the first terminal and the key registration information in the updated registration information of the first terminal to see whether they are consistent; if not, it is determined that the requested information is illegal, and the key registration information includes the type of the first terminal and / or the system service of the first terminal.

[0010] The root detection method of the embodiment of the present application determines whether the second terminal is rooted by detecting whether the second terminal tampers with key system information of the first terminal.

[0011] In another possible implementation, the request information is used to call the hardware service of the first terminal; the first terminal determines whether the request information is legal, including: the first terminal determines whether the request information is legal based on the hardware parameters of the second terminal.

[0012] The root detection method of the embodiment of the present application determines whether the second terminal is rooted by detecting whether the second terminal illegally calls the hardware service of the first terminal.

[0013] In another possible implementation, the first terminal determines whether the request information is legal based on the hardware parameters of the second terminal, including: the first terminal detects whether the hardware parameters of the second terminal support calling the hardware service of the first terminal; if not, determining that the request information is illegal.

[0014] The root detection method of the embodiment of the present application determines whether the hardware service of the first terminal called by the second terminal is reasonable through the hardware parameters of the second terminal. If it is unreasonable, it is determined that the call is illegal. For example, the second terminal is a smart bracelet and the first terminal is a smart phone. The hardware configuration of the smart bracelet only supports it with a pedometer function, and does not have the function of displaying photos or playing videos. It calls the camera of the smart phone. Here, the call of the camera of the smart bracelet to the mobile phone is obviously unreasonable. Therefore, it is judged that the call of the smart bracelet is illegal and it has been rooted.

[0015] In another possible implementation, the request information is used to call a software service of the first terminal; the first terminal determines whether the request information is legal, including: the first terminal determines whether the request information is legal based on system configuration information of the second terminal.

[0016] The root detection method of the embodiment of the present application determines whether the second terminal is rooted by detecting whether the second terminal illegally calls the software service of the first terminal.

[0017] In another possible implementation, the first terminal determines whether the request information is legal based on the system service of the second terminal, including: the first terminal detects whether the system configuration information of the second terminal supports calling the software service of the first terminal; if not, determining that the request information is illegal.

[0018] The root detection method of the embodiment of the present application determines whether the software service of the first terminal called by the second terminal is reasonable through the system configuration information of the second terminal. If it is unreasonable, it is determined that the call is illegal. For example, the second terminal is a smart bracelet and the first terminal is a smart phone. The system configuration of the smart bracelet only supports it with Bluetooth connection, pedometer and other functions, and does not have near field communication (NFC), camera and other configurations that support payment. It calls the payment service of the payment software of the smart phone. Here, the smart bracelet's call to the payment service of the mobile phone's payment software is obviously unreasonable, so it is determined that the call of the smart bracelet is illegal and it has been rooted.

[0019] In one example, the first terminal determines whether the second terminal is rooted based on whether the request information is legal, including: if the first terminal determines that the request information is illegal, determining that the second terminal is rooted; if the first terminal determines that the request information is legal, determining that the second terminal is not rooted.

[0020] In another possible implementation, the method further includes: if the first terminal determines that the second terminal is rooted, marking the second terminal as a rooted device and saving the information locally.

[0021] In an embodiment of the present application, when it is determined that the second terminal is rooted, the second terminal is marked as a root device, so that the first terminal takes preventive measures, such as restricting access to the second terminal, to ensure the security of the first terminal.

[0022] In another possible implementation, the method further includes: if the first terminal determines that the second terminal is rooted, sending the information that the second terminal is rooted to other terminals in the distributed network, and / or the first terminal sending the information that the second terminal is rooted to the cloud server.

[0023] By sending the information of the rooted terminal to other terminals in the distributed network or uploading the terminal server, other terminals are informed that the second terminal is rooted, so that other terminals can take preventive measures, such as restricting the access of the second terminal, to ensure the safety of other terminals.

[0024] In the second aspect, the present application provides a root detection device, which is deployed on a first terminal, the first terminal is located in a distributed network, the distributed network also includes at least a second terminal, the first terminal is communicatively connected to the second terminal, and the device includes: a sending module for sending synchronization information to the second terminal, the first synchronization information includes at least the registration information of the first terminal; a receiving module for receiving request information sent by the second terminal, the request information is used to request to update the registration information of the first terminal, or to request to call the service of the first terminal; a first determination module for determining whether the request information is legal; a second determination module for determining whether the second terminal is rooted based on whether the request information is legal.

[0025] In one possible implementation, the request information includes the updated registration information of the first terminal; the first determination module is specifically used to compare whether the key registration information in the registration information of the first terminal and the key registration information in the updated registration information of the first terminal are consistent; if not, it is determined that the requested information is illegal, and the key registration information includes the type of the first terminal and / or the system service of the first terminal.

[0026] In another possible implementation, the request information is used to call a hardware service of the first terminal; and the first determination module is specifically configured to determine whether the request information is legal based on hardware parameters of the second terminal.

[0027] In another possible implementation, determining whether the request information is legal based on the hardware parameters of the second terminal includes: detecting whether the hardware parameters of the second terminal support calling the hardware service of the first terminal; if not, determining that the request information is illegal.

[0028] In another possible implementation, the request information is used to call a software service of the first terminal; and the first determination module is specifically configured to determine whether the request information is legal based on system configuration information of the second terminal.

[0029] In another possible implementation, determining whether the request information is legal based on the system service of the second terminal includes: detecting whether the system configuration information of the second terminal supports calling the software service of the first terminal; if not, determining that the request information is illegal.

[0030] In another possible implementation, the second determining module is specifically configured to: determine that the second terminal is rooted if it is determined that the request information is illegal; and determine that the second terminal is not rooted if it is determined that the request information is legal.

[0031] In another possible implementation, the apparatus further includes: a marking module, configured to mark the second terminal as a rooted device and store the mark locally if it is determined that the second terminal is rooted.

[0032] In another possible implementation, the sending module is further configured to: if it is determined that the second terminal is rooted, send information that the second terminal is rooted to other terminals in the distributed network, and / or send information that the second terminal is rooted to a cloud server.

[0033] In a third aspect, the present application provides a terminal comprising at least one processor, at least one memory, and a communication interface, wherein the communication interface, the at least one memory, and the at least one processor are coupled; the communication interface is used for the terminal to communicate with other devices, the at least one memory is used to store computer program instructions, and the processor executes the computer program instructions to implement the method described in the first aspect.

[0034] In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed by a processor, implement the method described in the first aspect.

[0035] In a fifth aspect, the present application provides a computer program product, which, when executed on a processor, implements the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of a distributed network architecture;

[0037] Figure 2 A flowchart of a root detection method provided in an embodiment of the present application;

[0038] Figure 3 A flowchart of a root detection method provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of the structure of a root detection device provided in an embodiment of the present application;

[0040] Figure 5 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The technical solution of the present application is further described in detail below through the accompanying drawings and examples.

[0042] Figure 1 This is a schematic diagram of a distributed network architecture. Figure 1As shown, the distributed network includes multiple terminals, for example, multiple terminals include but are not limited to Figure 1 In the figure, terminal 1, terminal 2, terminal 3, terminal 4 and terminal 5; multiple terminals are connected in communication, for example, multiple terminals are connected through wired communication or wireless communication.

[0043] Optionally, any of the above-mentioned multiple terminals can be a device with computing capabilities such as a smart phone, a personal computer (PC), a tablet computer, a smart TV, a smart camera, a smart speaker, and a smart wearable device.

[0044] The present invention provides a root detection method for the distributed network described above, enabling any terminal in the distributed network to detect whether other terminals in the distributed network are rooted, thereby preventing the entire distributed network from being compromised due to a rooted terminal. For example, terminal 1 detects whether terminal 2, terminal 3, terminal 4, or terminal 5 are rooted. For ease of description, the terminal performing the detection is referred to as the first terminal, and the terminal being detected is referred to as the second terminal.

[0045] Figure 2 This is a flowchart of a root detection method provided in an embodiment of the present application. This method can be applied to Figure 1 The distributed network shown in Figure 1 is as follows. Figure 2 As shown, the method at least includes steps S201-S204.

[0046] In step S201, the first terminal sends synchronization information to the second terminal.

[0047] Before the first terminal and the second terminal execute the call of each other's service, they need to synchronize with each other. For example, the first device and the second device respectively send synchronization information of the terminal to each other to synchronize the terminals.

[0048] Optionally, the synchronization information may include registration information of the terminal, such as terminal type, terminal system services, terminal hardware services, terminal hardware configuration information, terminal identification, terminal IP address and other registration information.

[0049] In step S202, the first terminal receives the request information sent by the second terminal.

[0050] Optionally, the request information may be multiple types of requests, for example, an update request for requesting to update the registration information of the first terminal and a call request for requesting to call a service of the first terminal.

[0051] In step S203, the first terminal determines whether the request information is legal.

[0052] When the request information is an update request for requesting to update the registration information of the first terminal, the update request sent by the second terminal to the first terminal carries the updated registration information of the first terminal.

[0053] The first terminal compares the key registration information in the registration information of the first terminal with the key registration information in the updated registration information of the first terminal to determine whether they are consistent. If they are inconsistent, the first terminal determines that the request information is illegal.

[0054] Key registration information in the registration information is not allowed to be modified, such as registration information such as the terminal type and the terminal's system service. Therefore, the first terminal can determine whether the request information is legal by detecting whether the key registration information in the registration information of the first terminal and the key registration information in the updated registration information of the first terminal are consistent. If they are consistent, the update request is determined to be legal, that is, the request information is legal. If they are inconsistent, the update request is determined to be illegal, that is, the request information is illegal. That is, whether the key registration information in the registration information of the first terminal has been tampered with is detected to determine whether the request information is legal. If it has not been tampered with, the update request is determined to be legal, that is, the request information is legal. If it has been tampered with, the update request is determined to be illegal, that is, the request information is illegal.

[0055] When the request information is a first calling request for calling a hardware service of the first terminal, the first terminal may determine whether the first calling request is legal through various methods.

[0056] For example, the first terminal determines whether the first calling request is legal according to the type of the second terminal.

[0057] There are various methods for a first terminal to obtain the type of a second terminal. For example, during synchronization between the first and second terminals, the first terminal may receive registration information from the second terminal, which includes the type of the second terminal. Therefore, the first terminal may learn the type of the second terminal from the registration information. Alternatively, the first terminal may use the Simple Service Discovery Protocol (SSDP) to query the type of the second terminal in the same network.

[0058] The first terminal presets the hardware service call rules of the terminal, which are used to limit what type of terminal can call what hardware service of the first terminal. For example, the call limits smartphones, personal computers, tablet computers, and smart TVs to call the camera service of the first terminal. Then, when the first call request is to call the camera service of the first terminal, it is detected whether the second terminal is one of the smartphones, personal computers, tablet computers, and smart TVs. If so, it is determined that the first call request is legal. Otherwise, it is determined that the first call request is illegal. For example, if the first call request is to call the camera service of the first terminal and the second terminal is a smart bracelet, it is determined that the first call request is illegal, that is, the request information is illegal.

[0059] For another example, the first terminal determines whether the first calling request is legal based on the hardware parameters of the second terminal.

[0060] The first terminal obtains the hardware parameters of the second terminal through the registration information synchronized by the second terminal, or the first terminal queries the hardware parameters of the second terminal in the same network through the Simple Service Discovery Protocol (SSDP).

[0061] The first terminal detects whether the hardware parameters of the second terminal support calling the hardware service of the first terminal, and determines whether the first calling request is legal.

[0062] Specifically, the first terminal determines whether the hardware parameters of the second terminal support calling the hardware service of the first terminal based on whether the second terminal has the necessary hardware parameters for calling the hardware service, thereby determining whether the first call is legal. For example, the first call request is to call the camera service of the first terminal, and the necessary hardware parameters for calling the camera service include display parameters. In other words, the terminal calling the camera service of the first terminal must have display services. Therefore, the first terminal can determine whether the first call request is legal by detecting whether the hardware parameters of the second terminal include display parameters. If the display parameters are not present, the first call request is determined to be illegal. If the display parameters are present, the first call request is determined to be legal.

[0063] For another example, the first terminal determines whether the first calling request is legal based on the calling authority of the second terminal.

[0064] For example, a first terminal sets corresponding hardware service call permissions for each terminal in a distributed network. If a first call request calls an unauthorized hardware service, the first call request is determined to be illegal. For example, if the hardware service call permission set for the second terminal in the first terminal is only for calling the speaker, and the first call request is for calling the camera service of the first terminal, the first call request is determined to be illegal.

[0065] In one example, the second terminal invokes the hardware service of the first terminal by virtualizing the hardware information of the first terminal. For example, the first call request also includes the virtualized hardware information of the second terminal; illustratively, the second terminal virtualizes the camera information of the first terminal, and the first call request includes the virtualized camera information.

[0066] When the request information is a second calling request for calling a software service of the first terminal, the first terminal may determine whether the second calling request is legal through various methods.

[0067] For example, the first terminal determines whether the second calling request information is legal based on the system configuration information of the second terminal.

[0068] There are various methods for a first terminal to obtain the system configuration of a second terminal. For example, during synchronization between the first and second terminals, the first terminal may receive registration information from the second terminal, which includes the system configuration information of the second terminal. Therefore, the first terminal may obtain the system configuration information of the second terminal from the registration information of the second terminal. Alternatively, the first terminal may use the Simple Service Discovery Protocol (SSDP) to query the system configuration information of the second terminal in the same network.

[0069] The first terminal detects whether the system configuration information of the second terminal supports calling the software service of the first terminal, and determines whether the second calling request is legal.

[0070] Specifically, the first terminal determines whether the second terminal's system configuration supports calling the first terminal's software service based on whether the second terminal has the necessary system configuration for calling the software service, and further determines whether the second call is legal. For example, the second call request is to call the first terminal's payment service, and the necessary system configuration for calling the payment service includes NFC or camera configuration. In other words, the terminal calling the first terminal's payment service must have the function of "touch and pay" for near-field reading and writing via NFC or "scan and scan" for QR code recognition via a camera. Therefore, the first terminal can determine whether the second call request is legal by detecting whether the second terminal's system configuration has NFC and camera configuration. If NFC and camera configuration are not present, the second call request is determined to be illegal. If NFC and camera configuration are present, the first call request is determined to be legal.

[0071] For another example, the first terminal determines whether the second calling request is legal according to the calling authority of the second terminal.

[0072] For example, a first terminal may have hardware service call permissions set for each terminal in a distributed network. If a first call request invokes an unauthorized software service, the first call request is determined to be illegal. For example, a first terminal may have software service call permissions set for a second terminal, allowing the first, second, and third software services to be called. If the first call request invokes the first terminal's fourth software service, the second call request is determined to be illegal.

[0073] In step S204, the first terminal determines whether the second terminal is rooted based on whether the request information is legitimate.

[0074] If the first terminal determines that the request information is illegal, it determines that the second terminal is rooted; if the first terminal determines that the request information is legal, it determines that the second terminal is not rooted.

[0075] The root detection method provided in the embodiment of the present application realizes root detection and identification of terminal devices in a distributed network, thereby ensuring the security of terminal devices in the distributed network.

[0076] In another example, a root detection method provided by an embodiment of the present application further includes steps S205 and S206 (see Figure 3 ).

[0077] In step S205 , if the first terminal determines that the second terminal is rooted, the first terminal marks the second terminal as a root device.

[0078] Optionally, the first terminal marks the second terminal as a root device and saves it locally, and then the first terminal takes security precautions, for example, the first terminal restricts the access of the second terminal, or prohibits the second terminal from calling the hardware services and / or software services of the first terminal.

[0079] In step S206, the first terminal sends the information that the second terminal is rooted to other terminals in the distributed network or a cloud server.

[0080] If the first terminal determines that the second terminal is rooted, the first terminal sends the information that the second terminal is rooted to other terminals in the distributed network, and / or the first terminal sends the information that the second terminal is rooted to the cloud server.

[0081] By sending the information of the rooted terminal to other terminals in the distributed network or uploading the terminal server, other terminals are informed that the second terminal is rooted, so that other terminals can take preventive measures, such as restricting the access of the second terminal, and other security measures, thereby further ensuring the security of other terminals.

[0082] The embodiment of the present application also provides a root detection device.

[0083] Figure 4 This is a schematic diagram of the structure of a root detection device provided in an embodiment of the present application. The device 400 is deployed in a first terminal, which can be Figure 1 Any terminal, such as Figure 4 As shown, the device 400 at least includes:

[0084] A sending module 401 is configured to send synchronization information to the second terminal, where the first synchronization information includes at least registration information of the first terminal;

[0085] The receiving module 402 is configured to receive a request message sent by the second terminal, wherein the request message is used to request to update the registration information of the first terminal or to request to call a service of the first terminal;

[0086] A first determining module 403 is configured to determine whether the request information is legal;

[0087] The second determining module 404 is configured to determine whether the second terminal is rooted based on whether the request information is valid.

[0088] In a possible implementation, the request information includes updated registration information of the first terminal;

[0089] The first determination module 403 is specifically used to compare whether the key registration information in the registration information of the first terminal is consistent with the key registration information in the updated registration information of the first terminal. If not, it is determined that the requested information is illegal. The key registration information includes the type of the first terminal and / or the system service of the first terminal.

[0090] In another possible implementation, the request information is used to call a hardware service of the first terminal;

[0091] The first determining module 403 is specifically configured to determine whether the request information is legal according to the hardware parameters of the second terminal.

[0092] In another possible implementation, determining whether the request information is legal based on the hardware parameters of the second terminal includes: detecting whether the hardware parameters of the second terminal support calling the hardware service of the first terminal; if not, determining that the request information is illegal.

[0093] In another possible implementation, the request information is used to call a software service of the first terminal;

[0094] The first determining module 403 is specifically configured to determine whether the request information is legal according to the system configuration information of the second terminal.

[0095] In another possible implementation, determining whether the request information is legal based on the system service of the second terminal includes: detecting whether the system configuration information of the second terminal supports calling the software service of the first terminal; if not, determining that the request information is illegal.

[0096] In another possible implementation, the second determining module 404 is specifically configured to: determine that the second terminal is rooted if it is determined that the request information is illegal; and determine that the second terminal is not rooted if it is determined that the request information is legal.

[0097] In another possible implementation, the apparatus 400 further includes:

[0098] The marking module 405 is configured to mark the second terminal as a rooted device and store the mark locally if it is determined that the second terminal is rooted.

[0099] In another possible implementation, the sending module 401 is further configured to: if it is determined that the second terminal is rooted, send the information that the second terminal is rooted to other terminals in the distributed network, and / or send the information that the second terminal is rooted to a cloud server.

[0100] The root detection device 400 according to the embodiment of the present application may correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each module in the root detection device 400 are respectively to achieve Figure 2 and Figure 3 For the sake of brevity, the corresponding processes of each method in are not repeated here.

[0101] The present application also provides a terminal.

[0102] Figure 5 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may be Figure 1 Any terminal in .

[0103] like Figure 5 As shown, the terminal 500 includes at least a processor 501, a memory 502, and a communication interface 503. The processor 501, the memory 502, and the communication interface 503 are communicatively connected. The communication interface 503 is used to communicate with other terminals, for example, to receive synchronization information and request information from a second terminal, and for example, to send information that the second terminal is rooted to other terminals or to send information that the second terminal is rooted to a cloud server; the memory 502 stores executable program code, and the processor 501 can call the program code stored in the memory 502 to execute the root detection method in the aforementioned method embodiment.

[0104] It should be understood that in the embodiment of the present application, the processor 501 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0105] The memory 502 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. The memory 502 may also include a nonvolatile random access memory.

[0106] The memory 502 may be a volatile memory or a non-volatile memory, or 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), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0107] It should be understood that the terminal 500 according to the embodiment of the present application can execute the Figure 2 and Figure 3The method shown, and the above and other operations and / or functions of each device in the terminal 500 are respectively to achieve Figure 2 and Figure 3 For the sake of brevity, the corresponding processes of each method are not repeated here.

[0108] The present application also provides a computer-readable storage medium, comprising computer instructions, which, when executed by a processor, implement any of the above-described root detection methods.

[0109] The present application also provides a computer program product, which implements any one of the root detection methods when the computer program product is run on a processor.

[0110] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0111] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0112] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of this application. It should be understood that the above description is only the specific implementation methods of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application should be included in the scope of protection of this application.

Claims

1. A root detection method, characterized in that: The method is applied to a distributed network, the distributed network including at least a first terminal and a second terminal that are communicatively connected to each other, and the method includes: The first terminal sends synchronization information to the second terminal, where the synchronization information includes at least registration information of the first terminal; The first terminal receives a request message sent by the second terminal, where the request message carries the updated registration information of the first terminal, and the request message is used to request updating the registration information of the first terminal or requesting to call a service of the first terminal; The first terminal determines whether the request information is legal; the first terminal determines whether the second terminal is rooted based on whether the request information is legal; When the request information is used to update the registration information of the first terminal, the first terminal determines whether the request information is legal, including: The first terminal compares key registration information in the registration information of the first terminal with key registration information in the updated registration information of the first terminal to see whether they are consistent. If not, it is determined that the requested information is illegal. The key registration information includes the type of the first terminal and / or the system service of the first terminal.

2. The method according to claim 1, characterized in that The request information is used to call the hardware service of the first terminal; The first terminal determines whether the request information is legal, including: The first terminal determines whether the request information is legal according to the hardware parameters of the second terminal.

3. The method according to claim 2, characterized in that The first terminal determines whether the request information is legal based on the hardware parameters of the second terminal, including: The first terminal detects whether the hardware parameters of the second terminal support calling the hardware service of the first terminal, and if not, determines that the request information is illegal.

4. The method according to claim 1, wherein The request information is used to call the software service of the first terminal; The first terminal determines whether the request information is legal, including: The first terminal determines whether the request information is legal according to system configuration information of the second terminal.

5. The method according to claim 4, characterized in that The first terminal determines whether the request information is legal based on the system configuration information of the second terminal, including: The first terminal detects whether the system configuration information of the second terminal supports calling the software service of the first terminal, and if not, determines that the request information is illegal.

6. The method according to claim 1, characterized in that The first terminal determines whether the second terminal is rooted based on whether the request information is valid, including: If the first terminal determines that the request information is illegal, then determining that the second terminal is rooted; If the first terminal determines that the request information is legal, it determines that the second terminal is not rooted.

7. The method according to claim 1, characterized in that The method further comprises: If the first terminal determines that the second terminal is rooted, the first terminal marks the second terminal as a rooted device and saves the information locally.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: If the first terminal determines that the second terminal is rooted, the first terminal sends the information that the second terminal is rooted to other terminals in the distributed network, and / or the first terminal sends the information that the second terminal is rooted to the cloud server.

9. A root detection device, characterized in that: The device is deployed on a first terminal, the first terminal is located in a distributed network, the distributed network also includes at least a second terminal, the first terminal is communicatively connected to the second terminal, and the device includes: a sending module, configured to send synchronization information to the second terminal, wherein the synchronization information includes at least registration information of the first terminal; a receiving module, configured to receive a request message sent by the second terminal, the request message carrying the updated registration information of the first terminal, the request message being used to request updating the registration information of the first terminal or requesting to call a service of the first terminal; A first determining module, configured to determine whether the request information is legal; A second determining module, configured to determine whether the second terminal is rooted based on whether the request information is legal; The first determination module is specifically used to: when the request information is used to update the registration information of the first terminal, compare the key registration information in the registration information of the first terminal and the key registration information in the updated registration information of the first terminal to see whether they are consistent; if not, determine that the requested information is illegal, and the key registration information includes the type of the first terminal and / or the system service of the first terminal.

10. The device according to claim 9, characterized in that The request information is used to call the hardware service of the first terminal; The first determining module is specifically configured to determine whether the request information is legal according to hardware parameters of the second terminal.

11. The device according to claim 10, characterized in that The determining, based on the hardware parameters of the second terminal, whether the request information is legal includes: It is detected whether the hardware parameters of the second terminal support calling the hardware service of the first terminal. If not, it is determined that the request information is illegal.

12. The device according to claim 9, characterized in that The request information is used to call the software service of the first terminal; The first determining module is specifically configured to determine whether the request information is legal according to system configuration information of the second terminal.

13. The device according to claim 12, characterized in that The determining, based on the system configuration information of the second terminal, whether the request information is legal includes: It is detected whether the system configuration information of the second terminal supports calling the software service of the first terminal. If not, it is determined that the request information is illegal.

14. The device according to claim 9, characterized in that The second determining module is specifically configured to: If it is determined that the request information is illegal, determining that the second terminal is rooted; If it is determined that the request information is legal, it is determined that the second terminal is not rooted.

15. The device according to claim 9, characterized in that The device further comprises: The marking module is configured to mark the second terminal as a rooted device and store the mark locally if it is determined that the second terminal is rooted.

16. The device according to any one of claims 9 to 15, characterized in that The sending module is further used for: If it is determined that the second terminal is rooted, the information that the second terminal is rooted is sent to other terminals in the distributed network, and / or the information that the second terminal is rooted is sent to a cloud server.

17. A terminal, characterized in that: The terminal comprises at least one processor, at least one memory and a communication interface, wherein the communication interface and the at least one memory are coupled to the at least one processor; the communication interface is used for the terminal to communicate with other devices, the at least one memory is used to store computer program instructions, and the processor executes the computer program instructions to implement the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed by a processor, enable the method according to any one of claims 1 to 8 to be implemented.

19. A computer program product, characterized in that When the computer program product is run on a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method for preventing cracking of binding service, terminal, server, device and storage medium

    CN107231355A

  • Internet of Things risk prevention and control method, device and system and electronic equipment

    CN110505216A