WO2023024928A1 - Detection method and apparatus for application program, and device - Google Patents

Detection method and apparatus for application program, and device Download PDF

Info

Publication number
WO2023024928A1
WO2023024928A1 PCT/CN2022/111956 CN2022111956W WO2023024928A1 WO 2023024928 A1 WO2023024928 A1 WO 2023024928A1 CN 2022111956 W CN2022111956 W CN 2022111956W WO 2023024928 A1 WO2023024928 A1 WO 2023024928A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
application program
program
identification result
service interface
Prior art date
Application number
PCT/CN2022/111956
Other languages
French (fr)
Chinese (zh)
Inventor
张述
孙靓
朱小龙
Original Assignee
花瓣云科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 花瓣云科技有限公司 filed Critical 花瓣云科技有限公司
Publication of WO2023024928A1 publication Critical patent/WO2023024928A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the technical field of information security, and in particular to a detection method, device and equipment of an application program.
  • a method for detecting the application program is needed to detect whether the application program transmits user information across borders.
  • the detection may be implemented by parsing the installation package of the application program. Specifically, the installation package of the application program is reversely analyzed (for example, decompiled) to obtain the source code. Through static analysis of the source code, determine whether the application will transfer user data across borders.
  • Embodiments of the present application provide an application program detection method, device, and equipment, so as to improve the accuracy of application program detection results.
  • the embodiment of the present application provides a method for detecting an application program.
  • the method for detecting an application program may be executed by a terminal device, a processor in a terminal device, a chip, etc., or may be performed by a server, a processor in a server, or a Chips, etc. can also be executed interactively by terminal devices and servers.
  • the following takes the execution subject as a server as an example for illustration.
  • the first application program to be detected runs in the terminal device.
  • the server acquires M messages sent by the terminal device through the first application program, where M is an integer greater than or equal to 1; wherein, each message may correspond to the first A network request sent by an application program to its corresponding application server.
  • Each message indicates the target data to be transmitted by the first application program, and the target network address to which the target data is to be transmitted.
  • the server determines the identification result of each message, and the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message; Generate a program detection result corresponding to the first application program according to the identification results of the M messages.
  • the geographical area is an area corresponding to a country.
  • the identification results of M messages may have the following situations:
  • Case 1 The identification result of each message in the M messages indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message. That is to say, none of the M messages transmits user information across geographic regions. In this case, it may be determined that the program detection result corresponding to the first application program is normal.
  • Case 2 The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area. That is to say, among the M messages, there are messages transmitted across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
  • Case 3 The identification result that the first message exists in the M messages indicates that the user information exists in the message. That is to say, there is a message transmitting user information among the M messages. In this case, it may be determined that the program detection result of the first application program is abnormal.
  • the program detection result may include an abnormal level.
  • the abnormal levels corresponding to the above-mentioned cases 2 and 3 are slight.
  • the exception level corresponding to the above case 4 is the severity level.
  • the program detection result may include the cause of the abnormality.
  • the abnormal cause corresponding to the above case 2 is "cross-geographical region transmission”
  • the above-mentioned case 3 corresponds to "transmission of user information”
  • the above-mentioned case 4 corresponds to "transmission of user information across geographical regions”.
  • the reason for the above abnormality may be represented by text or an identification code.
  • the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
  • the application detection method when the application detection method is applied to a server; the first application includes service interfaces corresponding to K geographical areas, and the server is provided with an agent corresponding to each service interface interface, the K is an integer greater than or equal to 1; the server can obtain M messages in the following manner: for each service interface, through the proxy interface corresponding to the service interface, obtain the The at least one message sent.
  • terminal devices when terminal devices are located in different countries, they send messages through different service interfaces. Therefore, when detecting the first application program, if it is necessary to detect service interfaces corresponding to multiple countries, it is necessary to obtain messages sent through multiple service interfaces.
  • terminal devices located in different countries can be used for detection.
  • the second way you can use a terminal device to change the location of the terminal device by piling and burying the terminal device, and simulate the scene where the terminal device is located in different countries, so as to complete the multiple service interfaces. detection process.
  • one terminal device is used, and the detection of all service interfaces of the first application program can be completed without the country where the mobile terminal device is located, which ensures that the detection process covers the service country comprehensively, and The detection efficiency is improved.
  • the way the terminal device sends the message through the first application program may be that the user operates the first application program to trigger the first application program to send a message, or the first application program may be controlled by an automatic test script The program sends the message, which is not limited in this embodiment.
  • the service interface of each geographical area can be detected separately.
  • the comprehensiveness of the detection results is guaranteed; The detection efficiency is improved.
  • the server may generate the program detection result of the first application program in the following manner: for each service interface, according to the identification result of the at least one message sent through the service interface, determine the The interface detection result corresponding to the service interface; according to the interface detection results corresponding to the K service interfaces, the program detection result corresponding to the first application program is generated, and the program detection result corresponding to the first application program includes the K The interface detection result corresponding to the service interface.
  • the interface detection result corresponding to the service interface is determined, and the interface detection result corresponding to each service interface is included in the application program detection result, so that the detection result is more refined, so that the user according to The results of the program detection can intuitively know which service interface is abnormal.
  • the server may determine the interface detection result corresponding to the service interface in the following manner: if the identification result of each message in the at least one message indicates the sending location and receiving location of the message Located in the same geographical area, and there is no user information in the message, then determine that the interface detection result indicates that there is no abnormality in the service interface; if the identification result of the first message in the at least one message indicates that the If the sending location and the receiving location of the message are not located in the same geographical area, and/or, user information exists in the message, then it is determined that the interface detection result indicates that the service interface is abnormal.
  • the interface detection result corresponding to the service interface may include: an exception level.
  • the interface detection result corresponding to the service interface may include: the cause of the exception. In this way, the program detection result is more refined.
  • the identification result of each message includes a first identification result, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area; for the M
  • the first identification result of the message may be determined in the following manner: determine the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs; if The geographic area to which the sending location belongs is the same as the geographic area to which the receiving location belongs, then it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographic area; if the sending location belongs to If the geographic area is different from the geographic area to which the receiving location belongs, it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are not located in the same geographic area.
  • the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1; determine the geographical area to which the sending location of the message belongs, and the The geographical area to which the receiving location of the message belongs includes: determining the first service interface for sending the message from among the K service interfaces; using the geographical area corresponding to the first service interface as the address of the message The geographic area to which the sending location belongs; parsing and processing the message to obtain the geographic area to which the receiving location of the message belongs.
  • parsing and processing the message to obtain the geographical area to which the receiving location of the message belongs includes: obtaining the Internet connection corresponding to the receiving location of the message by parsing the message. Protocol IP address; obtain a preset correspondence relationship, the preset correspondence relationship indicates the correspondence relationship between different IP addresses and different geographical regions; determine the geographical region corresponding to the IP address in the preset correspondence relationship as The geographical area to which the receiving location of the message belongs.
  • the geographical area where the sending location of the message belongs is determined according to the service interface of the sending message, and the geographical area where the receiving location of the message belongs is determined by analyzing the IP address in the message, and then according to Whether the geographical area of the sending location and the receiving location are the same, the first identification result of the message is obtained, which ensures the accuracy of the first identification result, that is, the message transmitted across geographical areas can be accurately and comprehensively identified.
  • the identification result of each message includes a second identification result, and the second identification result is used to indicate whether user information exists in the message; for any of the M messages
  • the second identification result of the message may be determined in the following manner: the target data to be transmitted is obtained by parsing the message; the target data is decrypted to obtain decrypted data; the decrypted The data is matched with the user information corresponding to the first application program to obtain a second identification result of the message.
  • the user information corresponding to the first application program includes at least one information item; the decrypted data is matched with the user information corresponding to the first application program to obtain the information of the message.
  • the second identification result includes: respectively matching each information item with the decrypted data to obtain a matching result of each information item; if the matching result of the information item in the at least one information item is successful, then determine The second identification result of the message indicates that user information exists in the message; if the matching result of no information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that the There is no user information in the above message.
  • the target data to be transmitted is obtained by parsing the message, and the target data is decrypted to obtain the decrypted data, and then according to the matching result of the decrypted data and the user information of the first application program, the message is determined.
  • the second identification result ensures the accuracy of the second identification result, that is, the message transmitting the user information can be accurately and comprehensively identified.
  • the server before the server obtains the M messages sent by the terminal device through the first application, the server further includes: the server sends a control instruction to the terminal device, and the control instruction is used to control the first application The program starts running.
  • the server may send a control instruction to the terminal device in the following manner: receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program ; Sending the control instruction to the terminal device according to the target information.
  • the server sends a startup control instruction to the terminal device, and the startup control instruction is used to simulate the user manually clicking the icon of the first application program on the terminal device, so as to trigger the first application program to start running.
  • the start control instruction By sending the start control instruction to the terminal device, the first application program can be run to perform the subsequent detection process, thereby improving the automation degree of application program detection.
  • the method further includes: displaying the program detection result; or sending the program detection result result. In this way, it is convenient for relevant testing personnel to know the testing results of the program in time.
  • the embodiment of the present application provides an application detection device, the application detection device includes:
  • An acquisition unit configured to acquire M messages sent by the terminal device through the first application program during the running of the first application program to be detected, where M is an integer greater than or equal to 1;
  • a determining unit configured to determine an identification result of each message, where the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether User information exists;
  • a generating unit configured to generate a program detection result corresponding to the first application program according to the identification results of the M messages.
  • the detection device of the application program is applied to a server, the first application program includes service interfaces corresponding to K geographical areas, and the server is provided with a proxy interface corresponding to each service interface , the K is an integer greater than or equal to 1;
  • the acquisition unit includes: a traffic proxy module, configured to obtain, for each service interface, the traffic sent by the terminal device through the service interface through the proxy interface corresponding to the service interface The at least one message.
  • the generation unit includes: a detection result generation module, configured to, for each service interface, determine the corresponding Interface detection results; according to the interface detection results corresponding to the K service interfaces, the program detection results corresponding to the first application program are generated, and the program detection results corresponding to the first application program include the program detection results corresponding to the K service interfaces. Interface detection result.
  • the detection result generation module is specifically configured to: if the identification result of each message in the at least one message indicates that the sending location and the receiving location of the message are located in the same geographical area, and If there is no user information in the message, it is determined that the interface detection result indicates that there is no abnormality in the service interface; or,
  • the identification result of the first message in the at least one message indicates that the sending location and the receiving location of the message are not located in the same geographical area, and/or, there is user information in the message, then determine the The interface detection result indicates that the service interface is abnormal.
  • the identification result of each message includes a first identification result, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area;
  • the determining unit includes: Location analysis module.
  • a location analysis module configured to determine the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs; if the geographical area to which the sending location belongs is the same as the geographical area to which the receiving location belongs, then determine The first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographical area; if the geographical area to which the sending location belongs is different from the geographical area to which the receiving location belongs, then determine the location of the message The first identification result indicates that the sending location and the receiving location of the message are not located in the same geographical area.
  • the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1; the location analysis module is configured to select from the K service interfaces, determining the first service interface for sending the message; using the geographical area corresponding to the first service interface as the geographical area to which the sending location of the message belongs; parsing and processing the message to obtain the The geographic area to which the receiving location belongs.
  • the determining unit further includes: an IP parsing module, configured to parse the message to obtain an Internet Protocol IP address corresponding to a receiving location of the message.
  • the location analysis module is used to obtain a preset corresponding relationship, the preset corresponding relationship indicates the corresponding relationship between different IP addresses and different geographical areas; determine the geographical area corresponding to the IP address in the preset corresponding relationship is the geographical area to which the receiving location of the message belongs.
  • the identification result of each message includes a second identification result, and the second identification result is used to indicate whether user information exists in the message; for any of the M messages
  • the determination unit includes: an encrypted traffic cracking module and a user information matching module.
  • the encrypted traffic cracking module is used to analyze the target data to be transmitted from the message, and decrypt the target data to obtain decrypted data;
  • the user information matching module is used to match the decrypted data with the first application The user information corresponding to the program is matched, and the second recognition result of the message is obtained.
  • the user information corresponding to the first application program includes at least one information item;
  • the user information matching module is specifically configured to: respectively match each information item with the decrypted data to obtain each The matching result of the information item; if the matching result of the information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that there is user information in the message; if the at least one information item If the matching result of no information item in the item is successful, then it is determined that the second identification result of the message indicates that there is no user information in the message.
  • the apparatus for detecting an application program further includes: a dynamic running module, configured to send a control instruction to the terminal device, and the control instruction is used to control the first application program to start running.
  • the dynamic running module is configured to receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program; The terminal device sends the control instruction.
  • the detection result generating module is further configured to display the program detection result, or send the program detection result.
  • the geographical area is an area corresponding to a country.
  • the embodiment of the present application provides an electronic device, where the electronic device is a terminal device or a server.
  • the electronic device includes: a processor and a memory.
  • the processor is configured to be coupled with the memory, read and execute instructions in the memory, so as to implement the first aspect or the method described in various possible implementation manners of the first aspect.
  • the embodiment of the present application provides an apparatus for detecting an application program, including a unit, module, or circuit for performing the method provided in the above first aspect or each possible implementation manner of the first aspect.
  • the data processing apparatus may be a terminal device or a server, or a module applied to a terminal device or a server.
  • the embodiments of the present application provide a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the first aspect or various possibilities of the first aspect are realized.
  • an embodiment of the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed, implements the first aspect or the various possible implementations of the first aspect. method.
  • the application program detection method, device and equipment provided in the embodiment of the present application includes: during the running process of the first application program to be detected, obtain M messages sent by the terminal device through the first application program, and determine The identification result of each message, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, according to the The identification results of the M messages are generated to generate a program detection result corresponding to the first application program.
  • the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, which improves the accuracy of the program detection result.
  • FIG. 1 is a schematic diagram of a process of detecting an application program
  • FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of an application detection method provided in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of another application detection method provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of a message identification process provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another process for identifying a message provided in an embodiment of the present application.
  • FIG. 7A is a schematic diagram of a display interface corresponding to a program detection result provided in an embodiment of the present application.
  • FIG. 7B is a schematic diagram of a display interface corresponding to another program detection result provided in the embodiment of the present application.
  • FIG. 8A is a schematic diagram of another system architecture provided by the embodiment of the present application.
  • FIG. 8B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 8A;
  • FIG. 9A is a schematic diagram of another system architecture provided by the embodiment of the present application.
  • FIG. 9B is a schematic diagram of an interaction process of a detection method for an application program corresponding to the system architecture shown in FIG. 9A;
  • FIG. 10 is a schematic diagram of interface changes of a terminal device provided in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of the application detection process provided by the embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Application refers to a computer program designed to accomplish one or more specific tasks.
  • Applications in this application include, but are not limited to: mobile applications, portals, applets, etc.
  • User information In a broad sense, it refers to all kinds of information recorded electronically or in other ways that can identify a specific natural person or reflect the activities of a specific natural person, including but not limited to the name, date of birth, and ID number of a natural person , personal biometric information, address, phone number, email address, health information, whereabouts information, etc.
  • Cross-border transfer of user information refers to the transfer of user information from one country to another.
  • FIG. 1 is a schematic diagram of a process of detecting an application program.
  • the detection can be realized by parsing the installation package of the application program. Specifically, as shown in FIG. 1 , reverse analysis (for example, decompilation) is performed on the installation package of the application program to obtain the source code.
  • the source code is matched with preset keywords to detect the user information and the domain name to which the user information is sent. Furthermore, the domain name is analyzed to determine the target address to which the user information is sent, so as to determine whether the user information is transmitted across borders, and obtain the program detection result.
  • the source code of the application is obtained after reverse analysis is performed on the installation package of the application. Use the preset keywords "name”, “identification”, “birthday”, etc. to match the source code, and search for user information from the source code.
  • the domain name to which the user information is sent is searched out from the source code, and the domain name is analyzed to obtain the target network address. If the target network address is an overseas network address, it means that the application program has carried out cross-border transmission of user information.
  • the above-mentioned technology adopts the method of performing static analysis on the installation package.
  • the "static” here means that the application program does not need to be run, and only the installation package of the application program needs to be analyzed.
  • the detection results of the above methods depend on the coding style of the source code, and the coding styles of different developers are usually different. Taking the variable corresponding to "user name" in the source code as an example, some developers may name it “name”, while some developers may Named "Nm”, and some developers may name it "Nm01", “Nm_01”, etc. In this way, the user information is identified from the source code by using the preset keyword, so that there is a problem of misdetection or missed detection of the user information.
  • the above method needs to search the domain name from the source code, but in actual application, the domain name may be dynamically generated during the running of the application, so the domain name obtained by the above method is not comprehensive. Based on the above analysis, it can be seen that the accuracy of the program detection results obtained by the above method is not high.
  • the embodiment of the present application provides a detection method of an application program, which is different from the static analysis method adopted in the above-mentioned related art, and the embodiment of the present application adopts a dynamic analysis method.
  • multiple messages that is, dynamic traffic data
  • each message can be obtained in real time, and by identifying and processing the multiple messages, each message can be obtained
  • the identification result of each message, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, and then, according to the multiple messages
  • the identification result determines the program detection result corresponding to the application program.
  • the program detection result of the application program is determined by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
  • FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the system architecture includes an application detection client (hereinafter referred to as “detection client”) and an application detection server (hereinafter referred to as “detection server”). Detect applications that are installed on the client to be detected.
  • the detection server provides the function of detecting the application program.
  • the detection client refers to a terminal device that installs an application program to be detected, including but not limited to smart phones, smart wearable devices, smart home devices, personal computers (personal computers, PCs), wireless Handheld devices, computing devices, vehicle-mounted devices or wearable devices with communication functions, virtual reality (virtual reality, VR) terminal devices, augmented reality (augmented reality, AR) terminal devices, wireless terminals in industrial control (industrial control), wireless Wireless terminals in self driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety, smart city Wireless terminals in smart homes, wireless terminals in smart homes, etc.
  • VR virtual reality
  • AR augmented reality
  • wireless terminals in industrial control industrial control
  • wireless Wireless terminals in self driving
  • wireless terminals in remote medical wireless terminals in smart grid
  • wireless terminals in transportation safety smart city Wireless terminals in smart homes, wireless terminals in smart homes, etc.
  • the personal computer may be, for example, a tablet computer, a notebook computer, a desktop computer, a super mobile personal computer, a personal digital assistant, and the like.
  • the detection server may be, for example, a router, a switch, or a server, and the server may be, for example, an enterprise server, an operator server, or a service provider server. In some possible scenarios, the server may be a cloud server.
  • the detection client and the detection server may be deployed in different electronic devices, for example, the detection client is a terminal device, and the detection server is a server. In other scenarios, the detection client and the detection server may also be deployed in the same electronic device, for example, both are deployed in the electronic device where the application program to be detected is installed.
  • the detection client is taken as a terminal device, and the detection server is used as an example for description.
  • the detection of the application program can be realized.
  • the application program to be detected runs in the terminal device.
  • the server can obtain the message (that is, flow data) sent by the terminal device through the application program in real time, and detect and process the message to obtain the program detection result.
  • the server shown in FIG. 2 refers to a server for providing a detection function for an application program, which is different from a server for providing a service for an application program.
  • the server used to provide services to the application program is called the application server
  • the server used to provide the detection function of the application program is called the detection server.
  • the terminal device sends a message to the application server through the application program.
  • the detection server may obtain the message sent by the terminal device to the application server through a certain technology (for example, through a traffic proxy technology, a message interception technology, etc.). Furthermore, the detection server detects and processes the obtained message to obtain a program detection result.
  • the server may send the program detection result to the terminal device.
  • the server may display program detection results.
  • the detection process of the application program can be automatically executed by the terminal device and the server, so that the detection efficiency is high.
  • the application detection method provided in the embodiment of the present application can be applied in various application scenarios. Several possible scenarios are taken as examples for illustration below.
  • the supervision department may use the method of the embodiment of the present application to detect the application program during security detection, and obtain the program detection result. If the program detection result indicates that the application program is abnormal, the application program is required to make rectification according to the program detection result. Since the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
  • an application distribution platform (such as an application market, an application store, and a mobile phone manager) is responsible for providing download/installation portals for various types of applications.
  • the application program Before an application program is released on the application distribution platform, or after the application program is updated, the application program may be detected by using the method of the embodiment of the present application to obtain the program detection result. If the program detection results indicate that the application is abnormal, the application is required to be rectified before being put on the shelves.
  • the application distribution platform needs to put a large number of application programs on the shelves, and the method of the embodiment of the present application can automatically complete the detection of the application programs to ensure the detection efficiency.
  • the application program may be tested by using the method of the embodiment of the present application, and a program test result may be obtained. If the program detection result indicates that the application program is abnormal, it shall be corrected in time during the subsequent development process, so as to avoid the rectification workload required for rectification after the application program is released.
  • the embodiment of the present application does not limit the application scenarios of the application checking method, and the application checking method may also be used by third-party testing. It should be noted that when a user uses a website or other system programs, the transmission of user information across geographical regions may also be involved. Therefore, the embodiments of the present application may also be applicable to detecting websites or other system programs.
  • the application needs to provide a privacy statement to the user.
  • the privacy statement the use of user information by the terminal device during the use of the application by the user is explained.
  • the program detection result can be compared with the privacy statement of the application program to determine whether the application program transmits user information according to the terms of the privacy statement.
  • FIG. 3 is a schematic flowchart of a method for detecting an application provided by an embodiment of the present application. As shown in Figure 3, the method of this embodiment includes:
  • S301 Acquire M packets sent by the terminal device through the first application program during running of the first application program to be detected, where M is an integer greater than or equal to 1.
  • the first application program to be detected runs on the terminal device.
  • the execution subject of this embodiment acquires M messages sent by the terminal device through the first application program.
  • M is an integer greater than or equal to 1.
  • each message may correspond to a network request sent by the first application program to its corresponding application server.
  • Each message indicates the target data to be transmitted by the first application program, and the target network address to which the target data is to be transmitted.
  • the execution subject of this embodiment may be a terminal device or a server. It can be understood that when the execution subject of this embodiment is a terminal device, the terminal device can obtain the M messages sent by the first application program by monitoring its own sending interface. When the execution subject of this embodiment is a server, the server may obtain M messages sent by the terminal device through the first application program through message interception technology, traffic proxy technology, and the like.
  • S302 Determine the identification result of each message, the identification result of each message is used to indicate whether the sending location and receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message .
  • the identification result of each message can be obtained by performing identification processing on each message.
  • the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area. That is, the implementation can identify whether a message is transmitted across geographic regions.
  • the sending location of the message is usually the location of the terminal equipment, or the location of the user of the terminal equipment.
  • the receiving location of the message refers to the location of the application server of the first application program.
  • the geographical area may be a geographical area divided according to the coverage of the country.
  • the area covered by a country is called a geographic area.
  • another expression of “the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area” is "the first identification result is used to indicate that the message Whether the sending location and the receiving location are located in the same country", or "the first identification result is used to indicate whether the message is transmitted across countries (cross-borders)".
  • At least one of the sending location and the receiving location is carried in the message in the form of an Internet Protocol (Internet Protocol, IP) address. Therefore, the identification result can be obtained by parsing and processing the IP address in the message.
  • IP Internet Protocol
  • the identification result of each packet is used to indicate whether there is user information in the packet. That is to say, this implementation can identify whether the packet transmits user information.
  • the target data to be transmitted in the message may be parsed to determine whether there is user information in the target data, thereby obtaining the recognition result.
  • the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and whether there is user information in the message. That is to say, this implementation method can not only identify whether the message is transmitted across geographical regions, but also identify whether the message transmits user information.
  • S303 Generate a program detection result corresponding to the first application program according to the identification results of the M packets.
  • the identification results of M messages may have the following situations:
  • Case 1 The identification result of each of the M messages indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message. That is to say, none of the M messages transmits user information across geographic regions. In this case, it may be determined that the program detection result corresponding to the first application program is normal.
  • Case 2 The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area. That is to say, among the M messages, there are messages transmitted across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
  • Case 3 The identification result that the first message exists in the M messages indicates that the user information exists in the message. That is to say, there is a message transmitting user information among the M messages. In this case, it may be determined that the program detection result of the first application program is abnormal.
  • the program detection result may include an abnormal level.
  • the abnormal levels corresponding to the above-mentioned cases 2 and 3 are slight.
  • the exception level corresponding to the above case 4 is the severity level.
  • the program detection result may include the cause of the abnormality.
  • the abnormal cause corresponding to the above case 2 is "cross-geographical region transmission”
  • the above-mentioned case 3 corresponds to "transmission of user information”
  • the above-mentioned case 4 corresponds to "transmission of user information across geographical regions”.
  • the reason for the above abnormality may be represented by text or an identification code.
  • the terminal device may display the program detection result after generating the program detection result corresponding to the first application program, so that relevant personnel can know the program detection result in time.
  • the execution subject of this embodiment is a server
  • the server after the server generates the program detection result corresponding to the first application program, it can display the program detection result, or send the program detection result to the terminal device, so that relevant personnel can know the program detection result in time. result.
  • the application detection method provided in this embodiment includes: during the running of the first application to be detected, acquiring M messages sent by the terminal device through the first application, and determining the recognition result of each message , the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, according to the identification of the M messages As a result, a program detection result corresponding to the first application program is generated.
  • the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, which improves the accuracy of the program detection result.
  • FIG. 4 is a schematic flowchart of another detection method for an application provided by an embodiment of the present application. As shown in Figure 4, the method of this embodiment includes:
  • S401 Send a startup control instruction to the terminal device, where the startup control instruction is used to control the startup and operation of the first application program to be detected.
  • the method in this embodiment can be executed by a server.
  • the server sends the start control instruction to the terminal device, and the start control instruction is used to simulate the user manually clicking the icon of the first application program on the terminal device, so as to trigger the first application program to start and run.
  • the start control instruction By sending the start control instruction to the terminal device, the first application program can be run to perform the subsequent detection process, thereby improving the automation degree of application program detection.
  • the server may receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program.
  • the target information includes resource information required for starting and running the first application program.
  • resource information may be included: routing configuration information, application programming interface (Application Programming Interface, API) information of the terminal device, software package information to be loaded, and the like.
  • the server can send an activation control instruction to the terminal device according to the target information.
  • the target information further includes user information corresponding to the first application.
  • the user information corresponding to the first application program may be used in S403 to identify and process the message, so as to identify whether there is user information in the message.
  • the user information corresponding to the first application includes but is not limited to at least one of the following: name, date of birth, ID number, personal biometric information, address, phone number, email, health information, whereabouts information, etc.
  • S402 During the running of the first application program, for the service interface corresponding to each geographical area of the first application program, obtain at least one message sent by the terminal device through the service interface through the proxy interface corresponding to the service interface.
  • the first application program includes service interfaces corresponding to each of the K geographical areas.
  • K is an integer greater than or equal to 1.
  • the first application program includes service interfaces corresponding to four countries, namely: service interface A corresponding to country A, service interface B corresponding to country B, service interface C corresponding to country C, and service interface corresponding to country D Interface D.
  • the terminal device sends messages via service interface A in country A, via service interface B in country B, via service interface C in country C, and via service interface D in country D.
  • the server is provided with a proxy interface corresponding to each service interface, for example: proxy interface A corresponding to service interface A, proxy interface B corresponding to service interface B, proxy interface C corresponding to service interface C, corresponding to service interface D
  • the proxy interface D Each proxy interface is used to realize the traffic proxy function. That is to say, proxy interface A can proxy to receive packets sent through service interface A, proxy interface B can proxy to receive packets sent through service interface B, proxy interface C can proxy to receive packets sent through service interface C, and proxy Interface D can act as a proxy to receive packets sent through service interface D.
  • the server can obtain at least one message sent by the terminal device through the service interface A through the proxy interface A, obtain at least one message sent by the terminal device through the service interface B through the proxy interface B, and obtain at least one message sent by the terminal device through the service interface B through the proxy interface C.
  • the at least one message sent by C obtains at least one message sent by the terminal device through the service interface D through the proxy interface D.
  • S403 Determine the identification result of each message, the identification result of each message is used to indicate whether the sending location and receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message .
  • the identification result of each packet includes the first identification result and/or the second identification result.
  • the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area.
  • the second identification result is used to indicate whether there is user information in the packet.
  • the following possible manners may be used to determine the first identification result of each message.
  • the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1.
  • the terminal device sends the message through the first application program, it sends the message through the service interface corresponding to the geographical area to which the current location of the terminal device belongs. For example, if the current location of the terminal device is in country A, then the message will be sent through service interface A; if the current location of the terminal device is in country B, then the message will be sent through service interface B. Therefore, for each message, the geographical area corresponding to the service interface that sends the message may be used as the geographical area to which the sending location of the message belongs.
  • FIG. 5 is a schematic diagram of a packet identification process provided by an embodiment of the present application.
  • the K service interfaces determine the first service interface that sends the message, and use the geographical area corresponding to the first service interface as the message The geographical area to which the text is sent. Further, the message is parsed to obtain the geographical area to which the receiving location of the message belongs.
  • the geographical area to which the receiving location of the message belongs may be obtained in the following manner: as shown in FIG. 5 , the IP address corresponding to the receiving location of the message is obtained by parsing the message.
  • the IP address refers to the destination network address to which the packet is to be sent.
  • the IP address is carried in the message explicitly or implicitly, and the IP address can be obtained by parsing the message according to the protocol format adopted by the message.
  • a preset corresponding relationship is acquired, and the preset corresponding relationship indicates a corresponding relationship between different IP addresses and different geographic regions. Determining the geographical area corresponding to the IP address in the preset correspondence relationship as the geographical area to which the receiving location of the message belongs. That is to say, by using the IP address to query the preset correspondence relationship, the geographical area to which the receiving location of the message belongs can be obtained.
  • the first identification result of the message indicates that the sending location and the receiving location are not located in the same geographical area. If the geographical area of the sending location of a certain message is country C, and the geographical area of the receiving location is country C, then the first identification result of the message indicates that the sending location and the receiving location are located in the same geographic area.
  • the first identification result of the message is obtained, which ensures the accuracy of the first identification result, that is, the message transmitted across geographical areas can be accurately and comprehensively identified.
  • FIG. 6 is a schematic diagram of another packet identification process provided by the embodiment of the present application. As shown in Figure 6,
  • the target data to be transmitted can be obtained by parsing the message according to the protocol format adopted by the message.
  • the sender encrypts the target data in the message before sending the message. That is to say, the target data analyzed in the above step (1) is encrypted data. Therefore, the encryption and decryption algorithm corresponding to the first application program may be used to decrypt the target data, or the target data may be decrypted to obtain decrypted data.
  • the user information corresponding to the first application program includes at least one information item.
  • the second recognition result of the message may be determined in the following manner:
  • Each information item is matched with the decrypted data respectively to obtain a matching result of each information item, and the matching result of each information item is success or failure. If the matching result of the existence of the information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that the user information exists in the message. If the matching result of no information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that there is no user information in the message.
  • the user information corresponding to the first application program includes the following two information items: "56215467812" and "AAAaaa”. Among them, “56215467812” indicates the user location, and “AAAaaa” indicates the device ID. If at least one of “56215467812” and “AAAaaa” exists in the decrypted data corresponding to a certain message, it means that the second identification result of the message indicates that the message contains user information. If neither "56215467812" nor "AAAaaa” exists in the decrypted data of a certain message, it means that the second identification result of the message indicates that there is no user information in the message.
  • the target data to be transmitted is obtained by parsing the message, and the target data is decrypted to obtain the decrypted data, and then according to the matching result of the decrypted data and the user information of the first application program, the information of the message is determined.
  • the second identification result ensures the accuracy of the second identification result, that is, the message transmitting the user information can be accurately and comprehensively identified.
  • each message in the at least one message indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message, then determine The interface detection result indicates that there is no abnormality in the service interface.
  • the identification result of the first message in the at least one message indicates that the sending location and the receiving location of the message are not located in the same geographical area, and/or, there is user information in the message, then determine the The interface detection result indicates that the service interface is abnormal.
  • the identification result of each message indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user in the message. That is to say, none of the N1 messages transmit user information across geographic regions, which means that there is no abnormality in service interface A.
  • the identification result of a certain message indicates that there is user information in the message, that is, there is a message transmitting user information in the N3 messages, then it means There is an exception in service interface C.
  • the interface detection result corresponding to the service interface may include: an exception level.
  • the abnormality levels of the above-mentioned service interface B and service interface C are minor level, and the abnormality level of service interface D is severe level.
  • the interface detection result corresponding to the service interface may include: the cause of the exception.
  • the abnormal reason corresponding to the above-mentioned service interface B is "Transfer across geographic regions”
  • the corresponding abnormal reason of the above-mentioned service interface C is “Transfer user information”
  • the abnormal reason corresponding to the above-mentioned service interface D is "Transfer user information across geographic regions” .
  • the reason for the above abnormality may be represented by text or an identification code.
  • S405 Generate a program detection result corresponding to the first application program according to the interface detection result corresponding to each service interface, where the program detection result corresponding to the first application program includes the interface detection result corresponding to each service interface.
  • the program detection results of the first application program can be shown in Table 1:
  • FIG. 7A is a schematic diagram of a display interface corresponding to a program detection result provided in an embodiment of the present application. As shown in FIG. 7A , in the display interface, whether the service interface A, the service interface B, the service interface C, and the service interface D are normal is displayed respectively. When a certain service interface is abnormal, it also displays the corresponding exception level of the service interface.
  • FIG. 7B is a schematic diagram of a display interface corresponding to another program detection result provided in the embodiment of the present application. As shown in FIG. 7B , in the display interface, whether the service interface A, service interface B, service interface C, and service interface D are normal is displayed respectively. When a certain service interface is abnormal, the abnormal cause corresponding to the service interface is also specifically displayed.
  • terminal devices when terminal devices are located in different countries, they send messages through different service interfaces. Therefore, when detecting the first application program, if it is necessary to detect service interfaces corresponding to multiple countries, it is necessary to obtain messages sent through multiple service interfaces.
  • terminal devices located in different countries may be used for detection.
  • the server obtains the message sent by the terminal device A (located in country A) through the service interface A of the first application program, and obtains the interface detection result of the service interface A by analyzing the message.
  • the server obtains the message sent by the terminal device B (located in country B) through the service interface B of the first application program, and obtains the interface detection result of the service interface B by analyzing the message.
  • the server acquires the message sent by the terminal device C (located in country C) through the service interface C of the first application program, and obtains the interface detection result of the service interface C by analyzing the message.
  • the server obtains the message sent by the terminal device D (located in the country D) through the service interface D of the first application program, and obtains the interface detection result of the service interface D by analyzing the message. Furthermore, the interface detection results of the above service interfaces are integrated to obtain the program detection result of the first application program.
  • one terminal device may be used to complete the detection process for multiple service interfaces. For example, by piling and burying the terminal equipment, changing the location of the terminal equipment, respectively simulating the following scenarios: (1) The terminal equipment is located in country A, and the terminal equipment is sent through the service interface A of the first application program. message; (2) the terminal device is located in country B, and sends the message through the service interface B of the first application program; (3) the terminal device is located in country C, and sends the message through the service interface C of the first application program; (4) The terminal device is located in country D, and sends the message through the service interface D of the first application program.
  • the server obtains the message sent by the terminal device through the first application program, and analyzes the message to obtain the interface detection result corresponding to each service interface. Furthermore, the interface detection results of the above service interfaces are integrated to obtain the program detection result of the first application program. In this implementation mode, the detection of all service interfaces of the first application program can be completed by using one terminal device without the country where the mobile terminal device is located, which ensures the comprehensiveness of the detection process for the service country and improves the detection efficiency.
  • the way the terminal device sends the message through the first application program may be that the user operates the first application program to trigger the first application program to send a message, or the first application program may be controlled by an automatic test script.
  • the application program sends the message, which is not limited in this embodiment.
  • the program detection result of the application program is obtained by analyzing the message actually sent by the first application program during the running process, the accuracy of the program detection result is guaranteed. Further, when there are multiple geographical areas that the first application program can serve, the service interface of each geographical area can be detected separately, on the one hand, the comprehensiveness of the detection results is guaranteed, on the other hand, it also improves the detection efficiency.
  • FIG. 8A is a schematic diagram of another system architecture provided by the embodiment of the present application.
  • the system architecture includes: a terminal device and a server.
  • the server includes: a runtime system, a position analysis system, an interface positioning system, a data analysis system, and a detection result generation system.
  • a first application program to be detected is installed in the terminal device.
  • FIG. 8B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 8A .
  • the detection method of the application program in this embodiment includes:
  • S801 The runtime system controls the first application program to be detected to start running.
  • S802 The runtime system acquires the message sent by the terminal device through the first application program.
  • the runtime system provides a traffic proxy function to proxy the traffic data of the first application program in various service geographical regions in the world in real time, so as to ensure the detection of traffic in all service geographical regions and improve the comprehensiveness of detection.
  • the location analysis system performs identification processing on the message to obtain a first identification result of the message, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area.
  • S805 The location analysis system sends the first identification result of the message to the detection result generation system.
  • the interface positioning system determines the service interface corresponding to the packet.
  • the interface locating system performs interface-level locating for each message, so that subsequent interface-level detection results can be obtained for each service interface.
  • the interface locating system sends the service interface corresponding to the message to the detection result generating module.
  • the interface positioning system parses the message to obtain the target data to be transmitted, and decrypts the target data to obtain the decrypted data.
  • the interface positioning system sends the decrypted data to the data analysis system.
  • the data analysis system matches the decrypted data with the user information corresponding to the first application program to obtain a second identification result of the message.
  • the second identification result is used to indicate whether there is user information in the packet.
  • S811 The data analysis system sends the second identification result of the packet to the detection result generation system.
  • the detection result generating system generates a program detection result corresponding to the first application program according to the service interface corresponding to the message and the first identification result and/or the second identification result of the message.
  • S802 to S811 may be executed in a loop multiple times.
  • S804-S805, S806-S809, and S810-S811 can be executed at the same time, and there is no distinction between the three.
  • FIG. 9A is a schematic diagram of another system architecture provided by the embodiment of the present application.
  • the terminal device includes: a static analysis module, a runtime plug-in module and a display module.
  • the runtime system in the server includes: a dynamic operation module and a traffic proxy module;
  • the location analysis system includes: an IP resolution module and a location analysis module;
  • the interface location system includes: an encrypted traffic cracking module.
  • the data analysis system includes: a user information matching module;
  • the detection result generation system includes: a detection result generation module.
  • FIG. 9B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 9A .
  • the application detection method of this embodiment includes:
  • the static parsing module performs reverse parsing processing on the installation package of the first application program to be detected to obtain target information, where the target information includes resource information required for starting and running the first application program.
  • S902 The static analysis module sends the target information to the dynamic operation module.
  • the target information further includes: user information corresponding to the first application program.
  • the static analysis module can also send the user information corresponding to the first application program to the runtime system, so that the static analysis module can provide the data analysis system with the user information corresponding to the first application program.
  • Information, used for matching processing of user information can be used for matching processing of user information.
  • the dynamic running module interacts with the runtime plug-in module according to the target information, and controls the first application program to start running.
  • the dynamic running module sends control instructions to the runtime plug-in module, and the runtime plug-in module sends event information to the dynamic running module.
  • the runtime plug-in module ensures that the first application runs dynamically.
  • the traffic proxy module obtains the message sent by the terminal device through the first application program.
  • the traffic proxy module sends the packet to the IP analysis module and the encrypted traffic cracking module.
  • the IP parsing module parses the message to obtain the IP address corresponding to the receiving location of the message.
  • the location analysis module determines the geographical area corresponding to the IP address in the preset correspondence relationship as the geographical area to which the receiving location of the message belongs.
  • the location analysis module determines the geographical area corresponding to the first service interface that sends the message as the geographical area to which the sending location of the message belongs.
  • the location analysis module determines the first identification result of the message according to the geographical area to which the sending location and the receiving location of the message belong, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area .
  • the location analysis module sends the first identification result of the packet to the detection result generation module.
  • the encrypted traffic cracking module determines the service interface corresponding to the message.
  • the encrypted traffic cracking module sends the service interface corresponding to the message to the detection result generating module.
  • the encrypted traffic cracking module parses the message to obtain the target data to be transmitted, and decrypts the target data to obtain the decrypted data.
  • the encrypted traffic cracking module sends decrypted data to the user information matching module.
  • the user information matching module matches the decrypted data with the user information corresponding to the first application program, and obtains a second identification result of the message, and the second identification result is used to indicate whether there is user information in the message.
  • the user information matching module sends the second identification result of the message to the detection result generating module.
  • the above S904 to S916 are executed repeatedly multiple times, that is, to detect and analyze multiple messages sent by the terminal device through the first application program.
  • the detection result generation module sends a stop operation instruction to the dynamic operation module.
  • the detection result generation module generates a program detection result corresponding to the first application program according to the service interface corresponding to the message and the first identification result and/or the second identification result of the message.
  • the detection result generating module sends the program detection result to the display module.
  • the display module displays the program detection results.
  • S906-S910, S911-S914, and S915-S916 can be executed at the same time, and the order of the three is not distinguished.
  • the installation package of the application program to be detected can be downloaded to the terminal device, and then the interaction process between the terminal device and the server is triggered, so as to realize the detection method of the application program in any of the above embodiments.
  • FIG. 10 is a schematic diagram of interface changes of a terminal device provided by an embodiment of the present application.
  • the identifier of the application to be detected may be displayed on the interface 1001 .
  • the application to be detected is application X
  • the identifier of the application to be detected may be the icon or name of the application X.
  • the interface 1001 may also display a "detection" control, and the inspector may click on the "detection" control to trigger the execution of the application detection method in the above-mentioned embodiment.
  • the terminal device receives the program detection result of the application program X from the server, the interface 1001 may jump to the interface 1002, and the interface 1002 may be similar to the interface in FIG. 7A or FIG.
  • the above interface 1001 may jump to interface 1003 first, and then jump to interface 1002.
  • the interface 1003 may display a text reminder message of "application detection in progress".
  • FIG. 11 is a schematic diagram of an application detection process provided by an embodiment of the present application.
  • the application program X to be tested provides services in country A, country B, country C and country D.
  • the detection process for application X is as follows:
  • the terminal device performs reverse analysis processing on the installation package of the application program X through the static analysis module, and obtains the resource information required for the application program X to start and run.
  • the resource information obtained through parsing may include:
  • Device API interface device information interface (getImei) ⁇ location information interface (getLocation)
  • the server interacts with the terminal device to control the application program X to start and run.
  • the interaction between the dynamic running module in the server and the running plug-in module in the terminal device is as follows:
  • the interactive instructions corresponding to the dynamic running module in the server are as follows:
  • the interaction instructions corresponding to the runtime plug-in module in the terminal device are as follows:
  • the application program X starts to run, and, as shown in 1113 in FIG. 11 , the user information matching module of the server obtains the user information corresponding to the application program X including:
  • the server obtains the message sent by the terminal device through the first application program.
  • the application program X includes a service interface corresponding to each service geographic area.
  • the server proxies the traffic of each service interface through the traffic proxy module.
  • the service interface corresponding to each service geographic area is as follows:
  • the IP parsing module in the server parses the message to obtain the IP address corresponding to the receiving location of the message.
  • the IP addresses obtained through analysis in the four packets are as follows:
  • the location analysis module in the server maps the IP address to a geographical area according to the preset corresponding relationship, and obtains the geographical area to which the receiving location of the message belongs.
  • the geographical areas to which the receiving locations of the above four messages belong are as follows:
  • the location analysis module in the server determines the geographical area to which the sending location of the message belongs according to the service interface of the sending message. Assume that the geographical areas where the sending locations of the above four messages belong are as follows:
  • the location analysis module in the server determines the first identification result of the message according to the geographical area of the sending location and the receiving location of the message, namely: whether the message is transmitted across borders.
  • the first identification results of the above four messages are as follows:
  • the encrypted traffic cracking module in the server determines the service interface corresponding to the message. As an example, as shown in 1108 in FIG. 11 , it is assumed that the geographical areas where the sending locations of the above four messages belong are as follows:
  • the encrypted traffic cracking module in the server parses the message to obtain the target data to be transmitted.
  • the target data obtained by parsing the above four messages is as follows:
  • the encrypted traffic cracking module in the server decrypts the target data to obtain the decrypted data.
  • the decrypted data corresponding to the above four messages are as follows:
  • the user information matching module in the server matches the decrypted data with the user information corresponding to the first application program, and determines the first identification result of the message, that is, whether there is user information in the message.
  • the second identification results corresponding to the above four messages are as follows:
  • Packet 3 AAAaaa has user information
  • Packet 4: AAAaaa has user information
  • the detection result generating module in the server integrates the service interface corresponding to each message, the first identification result and the second identification result, as shown in 1112 in Figure 11, obtains:
  • Service interface D is not cross-border and has user information
  • the detection result generation module in the server generates a program detection result corresponding to the application program X according to the above integration result.
  • the program detection results are as follows:
  • Service interface A is abnormal (serious)
  • program detection results are as follows:
  • Service interface D is abnormal (user information exists)
  • the program detection result of the application program X is obtained, and the program detection result can be displayed on the terminal device.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device may be the terminal device and the server in the foregoing embodiments.
  • the electronic device 1200 may include: a processor 1201 (such as a CPU), a memory 1202 and a transceiver 1203 .
  • the memory 1202 and the transceiver 1203 may be coupled to the processor 1201, and the processor 1201 controls the transceiver 1203 to perform the above-mentioned transceiving actions of the terminal device or the server, so as to realize the interaction between the terminal device and the server.
  • the memory 1202 may include a high-speed random-access memory (random-access memory, RAM), and may also include a non-volatile memory (non-volatile memory, NVM), such as at least one disk memory, and various instructions may be stored in the memory 1202, It is used to complete various processing functions and realize the method steps of the present application.
  • the transceiver 1203 may be integrated into the transceiver of the electronic device, or may be a transceiver antenna independently set on the electronic device.
  • the above-mentioned memory 1202 is used to store computer-executable program codes, and the program codes include instructions; when the processor 1201 executes the instructions, the instructions cause the processor 1201 of the electronic device to perform the actions in the above-mentioned method embodiments, which The implementation principles and technical effects are similar and will not be repeated here.
  • the electronic device 1200 involved in this application may further include: a power supply 1204 , a communication bus 1205 and a communication port 1206 .
  • the communication bus 1205 is used to realize the communication connection between the components.
  • the above-mentioned communication port 1206 is used to realize connection and communication between the electronic device and other peripheral devices.
  • a computer program product includes one or more computer instructions.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • DSL digital subscriber line
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media.
  • Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Provided in the embodiments of the present application are a detection method and apparatus for an application program, and a device. The method comprises: during the running process of a first application program to be subjected to detection, acquiring M messages that are sent by a terminal device by means of the first application program; determining an identification result of each message, wherein the identification result of each message is used for indicating whether the sending place and receiving place of the message are located in the same geographic area, and/or whether there is user information in the message; and according to the identification results of the M message, generating a program detection result corresponding to the first application program. During the process, a program detection result of an application program is obtained by means of analyzing messages that are actually sent by the application program during a running process, and therefore the accuracy of the program detection result is improved.

Description

应用程序的检测方法、装置及设备Application detection method, device and equipment
本申请要求于2021年08月24日提交中国专利局、申请号为202110977670.9、申请名称为“应用程序的检测方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110977670.9 and the application title "Applied Program Detection Method, Apparatus and Equipment" submitted to the China Patent Office on August 24, 2021, the entire contents of which are incorporated herein by reference. Applying.
技术领域technical field
本申请涉及信息安全技术领域,尤其涉及一种应用程序的检测方法、装置及设备。The present application relates to the technical field of information security, and in particular to a detection method, device and equipment of an application program.
背景技术Background technique
随着信息技术的高速发展,当前社会对于用户隐私权益的重视程度越来越高。诸多法律法规要求应用程序对用户的隐私权益进行保障。示例性的,一些法规对用户信息的跨境传输进行了约束。With the rapid development of information technology, the current society pays more and more attention to users' privacy rights. Many laws and regulations require applications to protect users' privacy rights. Exemplarily, some regulations restrict the cross-border transmission of user information.
为了实现对应用程序的监管,需要一种对应用程序进行检测的方法,以检测应用程序是否对用户信息进行跨境传输。相关技术中,可以通过对应用程序的安装包进行解析来实现检测。具体而言,对应用程序的安装包进行逆向(例如反编译)解析处理得到源码。通过对源码进行静态分析,确定应用程序是否会对用户数据进行跨境传输。In order to realize the supervision of the application program, a method for detecting the application program is needed to detect whether the application program transmits user information across borders. In related technologies, the detection may be implemented by parsing the installation package of the application program. Specifically, the installation package of the application program is reversely analyzed (for example, decompiled) to obtain the source code. Through static analysis of the source code, determine whether the application will transfer user data across borders.
然而,上述检测方式的检测结果的准确性不高。However, the accuracy of the detection results of the above detection methods is not high.
发明内容Contents of the invention
本申请实施例提供一种应用程序的检测方法、装置及设备,以提高应用程序检测结果的准确性。Embodiments of the present application provide an application program detection method, device, and equipment, so as to improve the accuracy of application program detection results.
第一方面,本申请实施例提供一种应用程序的检测方法,该应用程序的检测方法可以由终端设备、终端设备中的处理器、芯片等执行,还可以由服务器、服务器中的处理器、芯片等执行,还可以由终端设备和服务器交互执行。以下以执行主体为服务器为例进行说明。In the first aspect, the embodiment of the present application provides a method for detecting an application program. The method for detecting an application program may be executed by a terminal device, a processor in a terminal device, a chip, etc., or may be performed by a server, a processor in a server, or a Chips, etc. can also be executed interactively by terminal devices and servers. The following takes the execution subject as a server as an example for illustration.
该应用程序的检测方法中,待检测的第一应用程序运行于终端设备中。在待检测的第一应用程序运行过程中,服务器获取终端设备通过所述第一应用程序发送的M个报文,所述M为大于或者等于1的整数;其中,每个报文可以对应第一应用程序向其对应的应用服务器发送的一个网络请求。每个报文指示了第一应用程序待传输的目标数据,以及所述目标数据待传输至的目标网络地址。服务器确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息;根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。In the method for detecting an application program, the first application program to be detected runs in the terminal device. During the running of the first application program to be detected, the server acquires M messages sent by the terminal device through the first application program, where M is an integer greater than or equal to 1; wherein, each message may correspond to the first A network request sent by an application program to its corresponding application server. Each message indicates the target data to be transmitted by the first application program, and the target network address to which the target data is to be transmitted. The server determines the identification result of each message, and the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message; Generate a program detection result corresponding to the first application program according to the identification results of the M messages.
可选的,所述地理区域为国家对应的区域。Optionally, the geographical area is an area corresponding to a country.
M个报文的识别结果可能存在如下几种情况:The identification results of M messages may have the following situations:
情况1:所述M个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地 点位于同一地理区域,且所述报文中不存在用户信息。也就是说,M个报文均未跨地理区域传输用户信息,该情况下,可以确定第一应用程序对应的程序检测结果为正常。Case 1: The identification result of each message in the M messages indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message. That is to say, none of the M messages transmits user information across geographic regions. In this case, it may be determined that the program detection result corresponding to the first application program is normal.
情况2:所述M个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。也就是说,M个报文中存在跨地理区域进行传输的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Case 2: The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area. That is to say, among the M messages, there are messages transmitted across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
情况3:所述M个报文中存在第一报文的识别结果指示所述报文中存在用户信息。也就是说,M个报文中存在传输用户信息的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Case 3: The identification result that the first message exists in the M messages indicates that the user information exists in the message. That is to say, there is a message transmitting user information among the M messages. In this case, it may be determined that the program detection result of the first application program is abnormal.
情况4:所述M个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,且所述报文中存在用户信息。也就是说,M个报文中存在对用户信息进行跨地理区域传输的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Situation 4: The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area, and user information exists in the message. That is to say, among the M messages, there are messages for transmitting user information across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
一种可能的实现方式中,在程序检测结果为异常的情况下,程序检测结果中可以包括异常等级。例如,上述情况2和情况3对应的异常等级为轻微等级。上述情况4对应的异常等级为严重等级。In a possible implementation manner, if the program detection result is abnormal, the program detection result may include an abnormal level. For example, the abnormal levels corresponding to the above-mentioned cases 2 and 3 are slight. The exception level corresponding to the above case 4 is the severity level.
另一种可能的实现方式中,在程序检测结果为异常的情况下,程序检测结果中可以包括异常原因。例如,上述情况2对应的异常原因为“跨地理区域传输”,上述情况3对应的异常原因为“传输用户信息”,上述情况4对应的异常原因为“跨地理区域传输用户信息”。可选的,上述异常原因可以采用文字或者标识码表示。In another possible implementation manner, if the program detection result is abnormal, the program detection result may include the cause of the abnormality. For example, the abnormal cause corresponding to the above case 2 is "cross-geographical region transmission", the above-mentioned case 3 corresponds to "transmission of user information", and the above-mentioned case 4 corresponds to "transmission of user information across geographical regions". Optionally, the reason for the above abnormality may be represented by text or an identification code.
本申请实施例中,由于是通过对应用程序在运行过程中实际发送的报文进行分析,得到应用程序的程序检测结果,保证了程序检测结果的准确性。In the embodiment of the present application, since the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
一种可能的实现方式中,该应用程序的检测方法应用于服务器时;所述第一应用程序包括K个地理区域各自对应的服务接口,所述服务器中设置有每个服务接口各自对应的代理接口,所述K为大于或者等于1的整数;服务器可以采用如下方式获取M个报文:针对每个服务接口,通过所述服务接口对应的代理接口,获取所述终端设备通过所述服务接口发送的所述至少一个报文。In a possible implementation, when the application detection method is applied to a server; the first application includes service interfaces corresponding to K geographical areas, and the server is provided with an agent corresponding to each service interface interface, the K is an integer greater than or equal to 1; the server can obtain M messages in the following manner: for each service interface, through the proxy interface corresponding to the service interface, obtain the The at least one message sent.
实际应用场景中,终端设备位于不同国家时,通过不同的服务接口发送报文。因此,在对第一应用程序进行检测时,若需要对多个国家对应的服务接口进行检测,则需要获取到通过多个服务接口发送的报文。第一种方式,可以使用位于不同国家的终端设备进行检测。另第二种方式,可以使用一个终端设备,通过对终端设备进行打桩、埋点等方式,更改终端设备的所处的位置,模拟出终端设备位于不同国家的场景,从而完成对多个服务接口的检测过程。上述第二种方式中,使用一个终端设备,并且无需移动终端设备所处的国家,即可完成对第一应用程序的所有服务接口的检测,保证了检测过程对服务国家的覆盖全面性,并提高了检测效率。In actual application scenarios, when terminal devices are located in different countries, they send messages through different service interfaces. Therefore, when detecting the first application program, if it is necessary to detect service interfaces corresponding to multiple countries, it is necessary to obtain messages sent through multiple service interfaces. In the first way, terminal devices located in different countries can be used for detection. In the second way, you can use a terminal device to change the location of the terminal device by piling and burying the terminal device, and simulate the scene where the terminal device is located in different countries, so as to complete the multiple service interfaces. detection process. In the above-mentioned second method, one terminal device is used, and the detection of all service interfaces of the first application program can be completed without the country where the mobile terminal device is located, which ensures that the detection process covers the service country comprehensively, and The detection efficiency is improved.
上述实现方式中,终端设备通过第一应用程序发送报文的方式,可以是通过用户对第一应用程序进行操作,触发第一应用程序发送报文,还可以是由自动测试脚本控制第一应用程序发送报文,本实施例对此不作限定。In the above implementation manner, the way the terminal device sends the message through the first application program may be that the user operates the first application program to trigger the first application program to send a message, or the first application program may be controlled by an automatic test script The program sends the message, which is not limited in this embodiment.
上述实现方式中,在第一应用程序可服务的地理区域有多个时,能够实现对每个地理区域的服务接口分别进行检测,一方面,保证了检测结果的全面性,另一方面,还提高了 检测效率。In the above implementation manner, when there are multiple geographical areas that the first application program can serve, the service interface of each geographical area can be detected separately. On the one hand, the comprehensiveness of the detection results is guaranteed; The detection efficiency is improved.
一种可能的实现方式中,服务器可以采用如下方式生成第一应用程序的程序检测结果:针对每个服务接口,根据通过所述服务接口发送的所述至少一个报文的识别结果,确定所述服务接口对应的接口检测结果;根据所述K个服务接口对应的接口检测结果,生成所述第一应用程序对应的程序检测结果,所述第一应用程序对应的程序检测结果包括所述K个服务接口对应的接口检测结果。In a possible implementation, the server may generate the program detection result of the first application program in the following manner: for each service interface, according to the identification result of the at least one message sent through the service interface, determine the The interface detection result corresponding to the service interface; according to the interface detection results corresponding to the K service interfaces, the program detection result corresponding to the first application program is generated, and the program detection result corresponding to the first application program includes the K The interface detection result corresponding to the service interface.
上述实现方式中,通过针对每个服务接口,确定出该服务接口对应的接口检测结果,并在应用程序检测结果中包括各服务接口对应的接口检测结果,使得检测结果更加精细化,从而用户根据程序检测结果可以直观了解到哪个服务接口出现异常。In the above implementation manner, for each service interface, the interface detection result corresponding to the service interface is determined, and the interface detection result corresponding to each service interface is included in the application program detection result, so that the detection result is more refined, so that the user according to The results of the program detection can intuitively know which service interface is abnormal.
一种可能的实现方式中,服务器可以采用如下方式确定服务接口对应的接口检测结果:若所述至少一个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息,则确定所述接口检测结果指示所述服务接口不存在异常;若所述至少一个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,和/或,所述报文中存在用户信息,则确定所述接口检测结果指示所述服务接口存在异常。In a possible implementation manner, the server may determine the interface detection result corresponding to the service interface in the following manner: if the identification result of each message in the at least one message indicates the sending location and receiving location of the message Located in the same geographical area, and there is no user information in the message, then determine that the interface detection result indicates that there is no abnormality in the service interface; if the identification result of the first message in the at least one message indicates that the If the sending location and the receiving location of the message are not located in the same geographical area, and/or, user information exists in the message, then it is determined that the interface detection result indicates that the service interface is abnormal.
可选的,在服务接口存在异常的情况下,服务接口对应的接口检测结果可以包括:异常等级。可选的,在服务接口存在异常的情况下,服务接口对应的接口检测结果可以包括:异常原因。这样,使得程序检测结果更加精细化。Optionally, when there is an exception in the service interface, the interface detection result corresponding to the service interface may include: an exception level. Optionally, if there is an exception in the service interface, the interface detection result corresponding to the service interface may include: the cause of the exception. In this way, the program detection result is more refined.
一种可能的实现方式中,每个报文的识别结果包括第一识别结果,所述第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域;针对所述M个报文中的任意一个报文,可以采用如下方式确定所述报文的第一识别结果:确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域;若所述发送地点所属地理区域与所述接收地点所属地理区域相同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点位于同一地理区域;若所述发送地点所属地理区域与所述接收地点所属地理区域不同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。In a possible implementation manner, the identification result of each message includes a first identification result, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area; for the M For any one of the messages, the first identification result of the message may be determined in the following manner: determine the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs; if The geographic area to which the sending location belongs is the same as the geographic area to which the receiving location belongs, then it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographic area; if the sending location belongs to If the geographic area is different from the geographic area to which the receiving location belongs, it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are not located in the same geographic area.
一种可能的实现方式中,所述第一应用程序包括K个地理区域各自对应的服务接口,所述K为大于或者等于1的整数;确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域,包括:从所述K个服务接口中,确定发送所述报文的第一服务接口;将所述第一服务接口对应的地理区域作为所述报文的发送地点所属地理区域;对所述报文进行解析处理,得到所述报文的接收地点所属地理区域。In a possible implementation manner, the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1; determine the geographical area to which the sending location of the message belongs, and the The geographical area to which the receiving location of the message belongs includes: determining the first service interface for sending the message from among the K service interfaces; using the geographical area corresponding to the first service interface as the address of the message The geographic area to which the sending location belongs; parsing and processing the message to obtain the geographic area to which the receiving location of the message belongs.
一种可能的实现方式中,对所述报文进行解析处理,得到所述报文的接收地点所属地理区域,包括:从所述报文中解析得到所述报文的接收地点对应的网际互联协议IP地址;获取预设对应关系,所述预设对应关系指示不同IP地址与不同地理区域之间的对应关系;将所述预设对应关系中与所述IP地址对应的地理区域,确定为所述报文的接收地点所属地理区域。In a possible implementation manner, parsing and processing the message to obtain the geographical area to which the receiving location of the message belongs includes: obtaining the Internet connection corresponding to the receiving location of the message by parsing the message. Protocol IP address; obtain a preset correspondence relationship, the preset correspondence relationship indicates the correspondence relationship between different IP addresses and different geographical regions; determine the geographical region corresponding to the IP address in the preset correspondence relationship as The geographical area to which the receiving location of the message belongs.
上述实现方式中,通过根据发送报文的服务接口,确定报文的发送地点所属地理区域,并通过对报文中的IP地址进行解析处理,确定出报文的接收地点所属地理区域,进而根据发送地点所属地理区域和接收地点所属地理区域是否相同,得到报文的第一识别结果, 保证了第一识别结果的准确性,即,能够准确、全面的识别出跨地理区域传输的报文。In the above implementation manner, the geographical area where the sending location of the message belongs is determined according to the service interface of the sending message, and the geographical area where the receiving location of the message belongs is determined by analyzing the IP address in the message, and then according to Whether the geographical area of the sending location and the receiving location are the same, the first identification result of the message is obtained, which ensures the accuracy of the first identification result, that is, the message transmitted across geographical areas can be accurately and comprehensively identified.
一种可能的实现方式中,每个报文的识别结果包括第二识别结果,所述第二识别结果用于指示所述报文中是否存在用户信息;针对所述M个报文中的任意一个报文,可以采用如下方式确定所述报文的第二识别结果:从所述报文中解析得到待传输的目标数据;对所述目标数据进行解密处理,得到解密数据;将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果。In a possible implementation manner, the identification result of each message includes a second identification result, and the second identification result is used to indicate whether user information exists in the message; for any of the M messages For a message, the second identification result of the message may be determined in the following manner: the target data to be transmitted is obtained by parsing the message; the target data is decrypted to obtain decrypted data; the decrypted The data is matched with the user information corresponding to the first application program to obtain a second identification result of the message.
一种可能的实现方式中,所述第一应用程序对应的用户信息包括至少一个信息项;将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果,包括:分别将每个信息项与所述解密数据进行匹配处理,得到每个信息项的匹配结果;若所述至少一个信息项中存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中存在用户信息;若所述至少一个信息项中不存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中不存在用户信息。In a possible implementation manner, the user information corresponding to the first application program includes at least one information item; the decrypted data is matched with the user information corresponding to the first application program to obtain the information of the message. The second identification result includes: respectively matching each information item with the decrypted data to obtain a matching result of each information item; if the matching result of the information item in the at least one information item is successful, then determine The second identification result of the message indicates that user information exists in the message; if the matching result of no information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that the There is no user information in the above message.
上述实现方式中,通过从报文中解析得到待传输的目标数据,并对目标数据进行解密处理,得到解密数据,进而根据解密数据与第一应用程序的用户信息的匹配结果,确定报文的第二识别结果,保证了第二识别结果的准确性,即,能够准确、全面的识别出传递用户信息的报文。In the above implementation manner, the target data to be transmitted is obtained by parsing the message, and the target data is decrypted to obtain the decrypted data, and then according to the matching result of the decrypted data and the user information of the first application program, the message is determined. The second identification result ensures the accuracy of the second identification result, that is, the message transmitting the user information can be accurately and comprehensively identified.
一种可能的实现方式中,服务器获取终端设备通过第一应用程序发送的M个报文之前,还包括:服务器向所述终端设备发送控制指令,所述控制指令用于控制所述第一应用程序启动运行。In a possible implementation manner, before the server obtains the M messages sent by the terminal device through the first application, the server further includes: the server sends a control instruction to the terminal device, and the control instruction is used to control the first application The program starts running.
一种可能的实现方式中,服务器可以采用如下方式向所述终端设备发送控制指令:接收所述终端设备发送的目标信息,所述目标信息包括所述第一应用程序启动运行所需的资源信息;根据所述目标信息,向所述终端设备发送所述控制指令。In a possible implementation manner, the server may send a control instruction to the terminal device in the following manner: receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program ; Sending the control instruction to the terminal device according to the target information.
上述实现方式中,服务器向终端设备发送启动控制指令,启动控制指令用于模拟用户在终端设备手动点击第一应用程序的图标,以触发第一应用程序启动运行。通过向终端设备发送启动控制指令,使得第一应用程序能够运行起来,以进行后续的检测流程,提高了应用程序检测的自动化程度。In the above implementation manner, the server sends a startup control instruction to the terminal device, and the startup control instruction is used to simulate the user manually clicking the icon of the first application program on the terminal device, so as to trigger the first application program to start running. By sending the start control instruction to the terminal device, the first application program can be run to perform the subsequent detection process, thereby improving the automation degree of application program detection.
一种可能的实现方式中,根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果之后,还包括:显示所述程序检测结果;或者,发送所述程序检测结果。这样,可以方便相关检测人员及时获知该程序检测结果。In a possible implementation manner, after generating the program detection result corresponding to the first application program according to the identification results of the M messages, the method further includes: displaying the program detection result; or sending the program detection result result. In this way, it is convenient for relevant testing personnel to know the testing results of the program in time.
第二方面,本申请实施例提供一种应用程序的检测装置,该应用程序的检测装置包括:In the second aspect, the embodiment of the present application provides an application detection device, the application detection device includes:
获取单元,用于在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,所述M为大于或者等于1的整数;An acquisition unit, configured to acquire M messages sent by the terminal device through the first application program during the running of the first application program to be detected, where M is an integer greater than or equal to 1;
确定单元,用于确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息;A determining unit, configured to determine an identification result of each message, where the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether User information exists;
生成单元,用于根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。A generating unit, configured to generate a program detection result corresponding to the first application program according to the identification results of the M messages.
一种可能的实现方式中,该应用程序的检测装置应用于服务器,所述第一应用程序包括K个地理区域各自对应的服务接口,所述服务器中设置有每个服务接口各自对应的代理接口,所述K为大于或者等于1的整数;获取单元包括:流量代理模块,用于针对每个服 务接口,通过所述服务接口对应的代理接口,获取所述终端设备通过所述服务接口发送的所述至少一个报文。In a possible implementation manner, the detection device of the application program is applied to a server, the first application program includes service interfaces corresponding to K geographical areas, and the server is provided with a proxy interface corresponding to each service interface , the K is an integer greater than or equal to 1; the acquisition unit includes: a traffic proxy module, configured to obtain, for each service interface, the traffic sent by the terminal device through the service interface through the proxy interface corresponding to the service interface The at least one message.
一种可能的实现方式中,生成单元包括:检测结果生成模块,用于针对每个服务接口,根据通过所述服务接口发送的所述至少一个报文的识别结果,确定所述服务接口对应的接口检测结果;根据所述K个服务接口对应的接口检测结果,生成所述第一应用程序对应的程序检测结果,所述第一应用程序对应的程序检测结果包括所述K个服务接口对应的接口检测结果。In a possible implementation manner, the generation unit includes: a detection result generation module, configured to, for each service interface, determine the corresponding Interface detection results; according to the interface detection results corresponding to the K service interfaces, the program detection results corresponding to the first application program are generated, and the program detection results corresponding to the first application program include the program detection results corresponding to the K service interfaces. Interface detection result.
一种可能的实现方式中,检测结果生成模块具体用于:若所述至少一个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息,则确定所述接口检测结果指示所述服务接口不存在异常;或者,In a possible implementation manner, the detection result generation module is specifically configured to: if the identification result of each message in the at least one message indicates that the sending location and the receiving location of the message are located in the same geographical area, and If there is no user information in the message, it is determined that the interface detection result indicates that there is no abnormality in the service interface; or,
若所述至少一个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,和/或,所述报文中存在用户信息,则确定所述接口检测结果指示所述服务接口存在异常。If the identification result of the first message in the at least one message indicates that the sending location and the receiving location of the message are not located in the same geographical area, and/or, there is user information in the message, then determine the The interface detection result indicates that the service interface is abnormal.
一种可能的实现方式中,每个报文的识别结果包括第一识别结果,所述第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域;确定单元包括:位置分析模块。位置分析模块,用于确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域;若所述发送地点所属地理区域与所述接收地点所属地理区域相同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点位于同一地理区域;若所述发送地点所属地理区域与所述接收地点所属地理区域不同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。In a possible implementation manner, the identification result of each message includes a first identification result, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area; the determining unit includes: Location analysis module. A location analysis module, configured to determine the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs; if the geographical area to which the sending location belongs is the same as the geographical area to which the receiving location belongs, then determine The first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographical area; if the geographical area to which the sending location belongs is different from the geographical area to which the receiving location belongs, then determine the location of the message The first identification result indicates that the sending location and the receiving location of the message are not located in the same geographical area.
一种可能的实现方式中,所述第一应用程序包括K个地理区域各自对应的服务接口,所述K为大于或者等于1的整数;位置分析模块用于从所述K个服务接口中,确定发送所述报文的第一服务接口;将所述第一服务接口对应的地理区域作为所述报文的发送地点所属地理区域;对所述报文进行解析处理,得到所述报文的接收地点所属地理区域。In a possible implementation manner, the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1; the location analysis module is configured to select from the K service interfaces, determining the first service interface for sending the message; using the geographical area corresponding to the first service interface as the geographical area to which the sending location of the message belongs; parsing and processing the message to obtain the The geographic area to which the receiving location belongs.
一种可能的实现方式中,确定单元还包括:IP解析模块,IP解析模块用于从所述报文中解析得到所述报文的接收地点对应的网际互联协议IP地址。位置分析模块用于获取预设对应关系,所述预设对应关系指示不同IP地址与不同地理区域之间的对应关系;将所述预设对应关系中与所述IP地址对应的地理区域,确定为所述报文的接收地点所属地理区域。In a possible implementation manner, the determining unit further includes: an IP parsing module, configured to parse the message to obtain an Internet Protocol IP address corresponding to a receiving location of the message. The location analysis module is used to obtain a preset corresponding relationship, the preset corresponding relationship indicates the corresponding relationship between different IP addresses and different geographical areas; determine the geographical area corresponding to the IP address in the preset corresponding relationship is the geographical area to which the receiving location of the message belongs.
一种可能的实现方式中,每个报文的识别结果包括第二识别结果,所述第二识别结果用于指示所述报文中是否存在用户信息;针对所述M个报文中的任意一个报文,确定单元包括:加密流量破解模块和用户信息匹配模块。加密流量破解模块用于从所述报文中解析得到待传输的目标数据,对所述目标数据进行解密处理,得到解密数据;用户信息匹配模块用于将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果。In a possible implementation manner, the identification result of each message includes a second identification result, and the second identification result is used to indicate whether user information exists in the message; for any of the M messages For a message, the determination unit includes: an encrypted traffic cracking module and a user information matching module. The encrypted traffic cracking module is used to analyze the target data to be transmitted from the message, and decrypt the target data to obtain decrypted data; the user information matching module is used to match the decrypted data with the first application The user information corresponding to the program is matched, and the second recognition result of the message is obtained.
一种可能的实现方式中,所述第一应用程序对应的用户信息包括至少一个信息项;用户信息匹配模块具体用于:分别将每个信息项与所述解密数据进行匹配处理,得到每个信息项的匹配结果;若所述至少一个信息项中存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中存在用户信息;若所述至少一个信息项中不存在信息项 的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中不存在用户信息。In a possible implementation manner, the user information corresponding to the first application program includes at least one information item; the user information matching module is specifically configured to: respectively match each information item with the decrypted data to obtain each The matching result of the information item; if the matching result of the information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that there is user information in the message; if the at least one information item If the matching result of no information item in the item is successful, then it is determined that the second identification result of the message indicates that there is no user information in the message.
一种可能的实现方式中,应用程序的检测装置还包括:动态运行模块,动态运行模块用于向所述终端设备发送控制指令,所述控制指令用于控制所述第一应用程序启动运行。In a possible implementation manner, the apparatus for detecting an application program further includes: a dynamic running module, configured to send a control instruction to the terminal device, and the control instruction is used to control the first application program to start running.
一种可能的实现方式中,动态运行模块用于接收所述终端设备发送的目标信息,所述目标信息包括所述第一应用程序启动运行所需的资源信息;根据所述目标信息,向所述终端设备发送所述控制指令。In a possible implementation manner, the dynamic running module is configured to receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program; The terminal device sends the control instruction.
一种可能的实现方式中,检测结果生成模块还用于显示所述程序检测结果,或者发送所述程序检测结果。In a possible implementation manner, the detection result generating module is further configured to display the program detection result, or send the program detection result.
一种可能的实现方式中,所述地理区域为国家对应的区域。In a possible implementation manner, the geographical area is an area corresponding to a country.
第三方面,本申请实施例提供一种电子设备,该电子设备为终端设备或者服务器。所述电子设备包括:处理器和存储器。所述处理器用于与所述存储器耦合,读取并执行所述存储器中的指令,以实现第一方面或者第一方面的各种可能的实现方式所述的方法。In a third aspect, the embodiment of the present application provides an electronic device, where the electronic device is a terminal device or a server. The electronic device includes: a processor and a memory. The processor is configured to be coupled with the memory, read and execute instructions in the memory, so as to implement the first aspect or the method described in various possible implementation manners of the first aspect.
第四方面,本申请实施例提供一种应用程序的检测装置,包括用于执行以上第一方面或第一方面各可能的实现方式所提供的方法的单元、模块或电路。该数据处理装置可以为终端设备或服务器,也可以为应用于终端设备或服务器的一个模块。In a fourth aspect, the embodiment of the present application provides an apparatus for detecting an application program, including a unit, module, or circuit for performing the method provided in the above first aspect or each possible implementation manner of the first aspect. The data processing apparatus may be a terminal device or a server, or a module applied to a terminal device or a server.
第五方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,当所述计算机指令被执行时,实现第一方面或者第一方面的各种可能的实现方式所述的方法。In the fifth aspect, the embodiments of the present application provide a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the first aspect or various possibilities of the first aspect are realized. The method described in the implementation.
第六方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被执行时,实现第一方面或者第一方面的各种可能的实现方式所述的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed, implements the first aspect or the various possible implementations of the first aspect. method.
应理解,本申请实施例中第二方面至第六方面的有益效果可以参照上述第一方面中的有效效果的相关描述。It should be understood that for the beneficial effects of the second aspect to the sixth aspect in the embodiments of the present application, reference may be made to the relevant description of the effective effects in the first aspect above.
本申请实施例提供的应用程序的检测方法、装置及设备,该方法包括:在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息,根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。上述过程中,由于是通过对应用程序在运行过程中实际发送的报文进行分析,得到应用程序的程序检测结果,提高了程序检测结果的准确性。The application program detection method, device and equipment provided in the embodiment of the present application, the method includes: during the running process of the first application program to be detected, obtain M messages sent by the terminal device through the first application program, and determine The identification result of each message, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, according to the The identification results of the M messages are generated to generate a program detection result corresponding to the first application program. In the above process, the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, which improves the accuracy of the program detection result.
附图说明Description of drawings
图1为一种对应用程序进行检测的过程示意图;FIG. 1 is a schematic diagram of a process of detecting an application program;
图2为本申请实施例提供的一种系统架构的示意图;FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application;
图3为本申请实施例提供的一种应用程序的检测方法的流程示意图;FIG. 3 is a schematic flowchart of an application detection method provided in an embodiment of the present application;
图4为本申请实施例提供的另一种应用程序的检测方法的流程示意图;FIG. 4 is a schematic flowchart of another application detection method provided by the embodiment of the present application;
图5为本申请实施例提供的一种对报文进行识别处理过程的示意图;FIG. 5 is a schematic diagram of a message identification process provided by an embodiment of the present application;
图6为本申请实施例提供的另一种对报文进行识别处理过程的示意图;FIG. 6 is a schematic diagram of another process for identifying a message provided in an embodiment of the present application;
图7A为本申请实施例提供的一种程序检测结果对应的显示界面的示意图;FIG. 7A is a schematic diagram of a display interface corresponding to a program detection result provided in an embodiment of the present application;
图7B为本申请实施例提供的另一种程序检测结果对应的显示界面的示意图;FIG. 7B is a schematic diagram of a display interface corresponding to another program detection result provided in the embodiment of the present application;
图8A为本申请实施例提供的另一种系统架构的示意图;FIG. 8A is a schematic diagram of another system architecture provided by the embodiment of the present application;
图8B为图8A所示系统架构对应的应用程序的检测方法的交互流程示意图;FIG. 8B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 8A;
图9A为本申请实施例提供的又一种系统架构的示意图;FIG. 9A is a schematic diagram of another system architecture provided by the embodiment of the present application;
图9B为图9A所示系统架构对应的应用程序的检测方法的交互流程示意图;FIG. 9B is a schematic diagram of an interaction process of a detection method for an application program corresponding to the system architecture shown in FIG. 9A;
图10为本申请实施例提供的终端设备的界面变化示意图;FIG. 10 is a schematic diagram of interface changes of a terminal device provided in an embodiment of the present application;
图11为本申请实施例提供的应用程序检测过程的示意图;FIG. 11 is a schematic diagram of the application detection process provided by the embodiment of the present application;
图12为本申请实施例提供的一种电子设备的结构示意图。FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于理解本申请的技术方案,首先对本申请涉及的名词或术语进行解释说明。In order to facilitate the understanding of the technical solution of the application, the nouns or terms involved in the application are firstly explained.
应用程序:是指为了完成某项或多项特定工作的计算机程序。本申请中的应用程序包括但不限于:移动应用程序、门户网站、小程序等。Application: Refers to a computer program designed to accomplish one or more specific tasks. Applications in this application include, but are not limited to: mobile applications, portals, applets, etc.
用户信息:广义上是指以电子或者其他方式记录的能够单独或者与其他信息结合识别特定自然人身份或者反映特定自然人活动情况的各种信息,包括但不限于自然人的姓名、出生日期、身份证件号码、个人生物识别信息、地址、电话号码、电子邮箱、健康信息、行踪信息等。User information: In a broad sense, it refers to all kinds of information recorded electronically or in other ways that can identify a specific natural person or reflect the activities of a specific natural person, including but not limited to the name, date of birth, and ID number of a natural person , personal biometric information, address, phone number, email address, health information, whereabouts information, etc.
对用户信息进行跨境传输:是指将用户信息从一个国家传输至另一个国家。Cross-border transfer of user information: refers to the transfer of user information from one country to another.
如前所述,为了实现对应用程序的监管,需要一种对应用程序进行检测的方法,以检测应用程序是否对用户信息进行跨境传输。As mentioned above, in order to realize the supervision of applications, a method of detecting applications is needed to detect whether the applications transmit user information across borders.
图1为一种对应用程序进行检测的过程示意图。该技术中,可以通过对应用程序的安装包进行解析来实现检测。具体而言,如图1所示,对应用程序的安装包进行逆向解析(例如反编译)处理得到源码。利用预设的关键字对源码进行匹配处理,检测出用户信息、以及用户信息被发送至的域名。进而,对域名进行解析处理,以确定用户信息被发送至的目标地址,从而确定用户信息是否被跨境传输,得到程序检测结果。FIG. 1 is a schematic diagram of a process of detecting an application program. In this technology, the detection can be realized by parsing the installation package of the application program. Specifically, as shown in FIG. 1 , reverse analysis (for example, decompilation) is performed on the installation package of the application program to obtain the source code. The source code is matched with preset keywords to detect the user information and the domain name to which the user information is sent. Furthermore, the domain name is analyzed to determine the target address to which the user information is sent, so as to determine whether the user information is transmitted across borders, and obtain the program detection result.
举例而言,对应用程序的安装包进行逆向解析之后,得到应用程序的源码。利用预设关键字“name”、“identification”、“birthday”等,对源码进行匹配处理,从源码中搜索得到用户信息。并且,从源码中搜索出上述用户信息被发送至的域名,对域名进行解析处理,得到目标网络地址。若目标网络地址为境外的网络地址,则说明应用程序对用户信息进行了跨境传输。For example, the source code of the application is obtained after reverse analysis is performed on the installation package of the application. Use the preset keywords "name", "identification", "birthday", etc. to match the source code, and search for user information from the source code. In addition, the domain name to which the user information is sent is searched out from the source code, and the domain name is analyzed to obtain the target network address. If the target network address is an overseas network address, it means that the application program has carried out cross-border transmission of user information.
然而,上述技术采用的是对安装包进行静态分析的方式。这里的“静态”是指无需应用程序运行,只需要对应用程序的安装包进行分析即可。上述方式的检测结果依赖于源码的编码风格,而不同开发人员的编码风格通常不同,以源码中“用户姓名”对应的变量为例,有些开发人员可能命名为“name”,而有些开发人员可能命名为“Nm”,还有些开发人员可能命名为“Nm01”、“Nm_01”等。这样利用预设关键字从源码中识别用户信息,使得用户信息存在误检或者漏检的问题。另外,上述方式需要从源码中搜索得到域名,而实际应用中,域名可能是在应用程序运行过程中动态生成的,因此,上述方式搜索得到的域名也并不全面。综合上述分析可见,上述方式得到的程序检测结果的准确性不高。However, the above-mentioned technology adopts the method of performing static analysis on the installation package. The "static" here means that the application program does not need to be run, and only the installation package of the application program needs to be analyzed. The detection results of the above methods depend on the coding style of the source code, and the coding styles of different developers are usually different. Taking the variable corresponding to "user name" in the source code as an example, some developers may name it "name", while some developers may Named "Nm", and some developers may name it "Nm01", "Nm_01", etc. In this way, the user information is identified from the source code by using the preset keyword, so that there is a problem of misdetection or missed detection of the user information. In addition, the above method needs to search the domain name from the source code, but in actual application, the domain name may be dynamically generated during the running of the application, so the domain name obtained by the above method is not comprehensive. Based on the above analysis, it can be seen that the accuracy of the program detection results obtained by the above method is not high.
为了解决上述技术问题,本申请实施例提供一种应用程序的检测方法,与上述相关技 术中采用的静态分析的方式不同,本申请实施例采用动态分析的方式。具体而言,在待检测的应用程序运行过程中,可以实时获取终端设备通过应用程序发送的多个报文(即动态流量数据),通过对多个报文进行识别处理,得到每个报文的识别结果,每个报文的识别结果用于指示报文的发送地点和接收地点是否位于同一地理区域,和/或,报文中是否存在用户信息,进而,根据所述多个报文的识别结果,确定应用程序对应的程序检测结果。本申请技术方案中,由于是通过对应用程序在运行过程中实际发送的报文进行分析,确定应用程序的程序检测结果,保证了程序检测结果的准确性。In order to solve the above-mentioned technical problems, the embodiment of the present application provides a detection method of an application program, which is different from the static analysis method adopted in the above-mentioned related art, and the embodiment of the present application adopts a dynamic analysis method. Specifically, during the running of the application program to be detected, multiple messages (that is, dynamic traffic data) sent by the terminal device through the application program can be obtained in real time, and by identifying and processing the multiple messages, each message can be obtained The identification result of each message, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, and then, according to the multiple messages The identification result determines the program detection result corresponding to the application program. In the technical solution of the present application, since the program detection result of the application program is determined by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
图2为本申请实施例提供的一种系统架构的示意图。如图2所示,该系统架构包括应用程序检测客户端(后续简称“检测客户端”)和应用程序检测服务端(后续简称“检测服务端”)。检测客户端中安装有待检测的应用程序。检测服务端提供对应用程序进行检测的功能。FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application. As shown in FIG. 2 , the system architecture includes an application detection client (hereinafter referred to as “detection client”) and an application detection server (hereinafter referred to as “detection server”). Detect applications that are installed on the client to be detected. The detection server provides the function of detecting the application program.
图2所示的系统架构中,检测客户端是指安装有待检测的应用程序的终端设备,包括但不限于智能手机、智能穿戴设备、智能家居设备、个人计算机(personal computer,PC)、具有无线通信功能的手持设备、计算设备、车载设备或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等。其中,个人计算机例如可以为平板电脑、笔记本电脑、台式电脑、超级移动个人计算机、个人数字助理等。检测服务端例如可以为路由器、交换机、服务器等,服务器例如为企业服务器、运营商服务器、服务提供商服务器等。在一些可能的场景中,服务器可以为云端服务器。In the system architecture shown in Figure 2, the detection client refers to a terminal device that installs an application program to be detected, including but not limited to smart phones, smart wearable devices, smart home devices, personal computers (personal computers, PCs), wireless Handheld devices, computing devices, vehicle-mounted devices or wearable devices with communication functions, virtual reality (virtual reality, VR) terminal devices, augmented reality (augmented reality, AR) terminal devices, wireless terminals in industrial control (industrial control), wireless Wireless terminals in self driving, wireless terminals in remote medical, wireless terminals in smart grid, wireless terminals in transportation safety, smart city Wireless terminals in smart homes, wireless terminals in smart homes, etc. Wherein, the personal computer may be, for example, a tablet computer, a notebook computer, a desktop computer, a super mobile personal computer, a personal digital assistant, and the like. The detection server may be, for example, a router, a switch, or a server, and the server may be, for example, an enterprise server, an operator server, or a service provider server. In some possible scenarios, the server may be a cloud server.
需要说明的是,一些场景中,检测客户端和检测服务端可以部署在不同的电子设备中,例如,检测客户端为终端设备,检测服务端为服务器。另一些场景中,检测客户端和检测服务端还可以部署在同一电子设备中,例如二者均部署在安装有待检测的应用程序的电子设备中。为了方便描述,后续实施例中以检测客户端为终端设备、检测服务端为服务器为例进行说明。It should be noted that, in some scenarios, the detection client and the detection server may be deployed in different electronic devices, for example, the detection client is a terminal device, and the detection server is a server. In other scenarios, the detection client and the detection server may also be deployed in the same electronic device, for example, both are deployed in the electronic device where the application program to be detected is installed. For convenience of description, in the subsequent embodiments, the detection client is taken as a terminal device, and the detection server is used as an example for description.
通过终端设备和服务器之间的交互,可以实现对应用程序的检测。继续参见图2,终端设备中运行待检测的应用程序。在应用程序运行过程中,服务器能够实时获取终端设备通过应用程序发送的报文(即流量数据),并对报文进行检测处理,得到程序检测结果。Through the interaction between the terminal device and the server, the detection of the application program can be realized. Continuing to refer to FIG. 2 , the application program to be detected runs in the terminal device. During the running of the application program, the server can obtain the message (that is, flow data) sent by the terminal device through the application program in real time, and detect and process the message to obtain the program detection result.
需要说明的是,图2所示的服务器是指用于提供对应用程序进行检测功能的服务器,其与用于向应用程序提供服务的服务器不同。为了区分,将用于向应用程序提供服务的服务器称为应用服务器,将用于提供对应用程序检测功能的服务器称为检测服务器。在应用程序运行过程中,终端设备通过应用程序向应用服务器发送报文。检测服务器可以通过某种技术(例如通过流量代理技术、报文拦截技术等)获取到终端设备向应用服务器发送的报文。进而,检测服务器对获取到的报文进行检测处理,得到程序检测结果。It should be noted that the server shown in FIG. 2 refers to a server for providing a detection function for an application program, which is different from a server for providing a service for an application program. In order to distinguish, the server used to provide services to the application program is called the application server, and the server used to provide the detection function of the application program is called the detection server. During the running of the application program, the terminal device sends a message to the application server through the application program. The detection server may obtain the message sent by the terminal device to the application server through a certain technology (for example, through a traffic proxy technology, a message interception technology, etc.). Furthermore, the detection server detects and processes the obtained message to obtain a program detection result.
可选的,服务器得到程序检测结果之后,可以向终端设备发送程序检测结果。可选的,服务器可以显示程序检测结果。本申请实施例中,对应用程序的检测过程可以由终端设备和服务器自动化执行,从而使得检测效率较高。Optionally, after the server obtains the program detection result, it may send the program detection result to the terminal device. Optionally, the server may display program detection results. In the embodiment of the present application, the detection process of the application program can be automatically executed by the terminal device and the server, so that the detection efficiency is high.
本申请实施例提供的应用程序的检测方法可应用于多种应用场景中。下面以几种可能的场景为例进行举例说明。The application detection method provided in the embodiment of the present application can be applied in various application scenarios. Several possible scenarios are taken as examples for illustration below.
一个示例场景中,监管部门在安全检测中,可以采用本申请实施例的方法对应用程序进行检测,得到程序检测结果。若程序检测结果指示应用程序存在异常,则要求应用程序根据程序检测结果进行整改。由于是通过对应用程序在运行过程中实际发送的报文进行分析,得到应用程序的程序检测结果,保证了程序检测结果的准确性。In an example scenario, the supervision department may use the method of the embodiment of the present application to detect the application program during security detection, and obtain the program detection result. If the program detection result indicates that the application program is abnormal, the application program is required to make rectification according to the program detection result. Since the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, the accuracy of the program detection result is guaranteed.
另一个示例场景中,应用分发平台(例如应用市场、应用商城、手机管家等应用程序)负责提供各种类型的应用程序的下载/安装入口。在应用分发平台上架某个应用程序之前,或者在应用程序更新后,可以采用本申请实施例的方法对该应用程序进行检测,得到程序检测结果。若程序检测结果指示该应用程序存在异常,则要求应用程序整改后再上架。In another example scenario, an application distribution platform (such as an application market, an application store, and a mobile phone manager) is responsible for providing download/installation portals for various types of applications. Before an application program is released on the application distribution platform, or after the application program is updated, the application program may be detected by using the method of the embodiment of the present application to obtain the program detection result. If the program detection results indicate that the application is abnormal, the application is required to be rectified before being put on the shelves.
通常,应用分发平台需要上架的应用程序数量较多,采用本申请实施例的方法能够自动完成对应用程序进行检测,保证检测效率。Usually, the application distribution platform needs to put a large number of application programs on the shelves, and the method of the embodiment of the present application can automatically complete the detection of the application programs to ensure the detection efficiency.
又一个示例场景中,在应用程序的开发以及测试过程中,可以采用本申请实施例的方法对应用程序进行检测,得到程序检测结果。若程序检测结果指示该应用程序存在异常,则在后续开发过程中及时修正,从而避免在应用程序发布后被要求整改的整改工作量。In yet another exemplary scenario, during the development and testing of the application program, the application program may be tested by using the method of the embodiment of the present application, and a program test result may be obtained. If the program detection result indicates that the application program is abnormal, it shall be corrected in time during the subsequent development process, so as to avoid the rectification workload required for rectification after the application program is released.
需要说明的是,本申请实施例对于应用程序的检查方法的应用场景不作限定,应用程序的检测方法还可以由第三方测试使用。应注意,用户在使用网站或者其他系统程序时,同样也可能涉及用户信息的跨地理区域传输,因此,本申请实施例还可以适用于对网站或者其他系统程序进行检测。It should be noted that the embodiment of the present application does not limit the application scenarios of the application checking method, and the application checking method may also be used by third-party testing. It should be noted that when a user uses a website or other system programs, the transmission of user information across geographical regions may also be involved. Therefore, the embodiments of the present application may also be applicable to detecting websites or other system programs.
一些可能的实现方式中,应用程序需要向用户提供隐私声明。在隐私声明中针对用户在使用应用程序过程中终端设备对用户信息的使用情况进行说明。本申请实施例检测得到应用程序的程序检测结果之后,可以将程序检测结果与应用程序的隐私声明进行对比,以确定应用程序是否按照隐私声明的条款对用户信息进行传输。In some possible implementations, the application needs to provide a privacy statement to the user. In the privacy statement, the use of user information by the terminal device during the use of the application by the user is explained. After the program detection result of the application program is detected by the embodiment of the present application, the program detection result can be compared with the privacy statement of the application program to determine whether the application program transmits user information according to the terms of the privacy statement.
下面以具体地实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solution of the present application will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
图3为本申请实施例提供的一种应用程序的检测方法的流程示意图。如图3所示,本实施例的方法包括:FIG. 3 is a schematic flowchart of a method for detecting an application provided by an embodiment of the present application. As shown in Figure 3, the method of this embodiment includes:
S301:在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,所述M为大于或者等于1的整数。S301: Acquire M packets sent by the terminal device through the first application program during running of the first application program to be detected, where M is an integer greater than or equal to 1.
本实施例中,待检测的第一应用程序运行于终端设备中。在第一应用程序运行过程中,本实施例的执行主体获取终端设备通过第一应用程序发送的M个报文。M为大于或者等于1的整数。其中,每个报文可以对应第一应用程序向其对应的应用服务器发送的一个网络请求。每个报文指示了第一应用程序待传输的目标数据,以及所述目标数据待传输至的目标网络地址。In this embodiment, the first application program to be detected runs on the terminal device. During the running of the first application program, the execution subject of this embodiment acquires M messages sent by the terminal device through the first application program. M is an integer greater than or equal to 1. Wherein, each message may correspond to a network request sent by the first application program to its corresponding application server. Each message indicates the target data to be transmitted by the first application program, and the target network address to which the target data is to be transmitted.
本实施例的执行主体可以为终端设备或者服务器。能够理解,当本实施例的执行主体为终端设备时,终端设备可以通过对自身发送接口进行监听,即可获取通过第一应用程序发送的M个报文。当本实施例的执行主体为服务器时,服务器可以通过报文拦截技术、流量代理技术等获取到终端设备通过第一应用程序发送的M个报文。The execution subject of this embodiment may be a terminal device or a server. It can be understood that when the execution subject of this embodiment is a terminal device, the terminal device can obtain the M messages sent by the first application program by monitoring its own sending interface. When the execution subject of this embodiment is a server, the server may obtain M messages sent by the terminal device through the first application program through message interception technology, traffic proxy technology, and the like.
S302:确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点 和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息。S302: Determine the identification result of each message, the identification result of each message is used to indicate whether the sending location and receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message .
本实施例中,可以通过分别对每个报文进行识别处理,得到每个报文的识别结果。In this embodiment, the identification result of each message can be obtained by performing identification processing on each message.
一种可能的实现方式中,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域。也就是说,该实现方式可以识别出报文是否跨地理区域传输。In a possible implementation manner, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area. That is, the implementation can identify whether a message is transmitted across geographic regions.
其中,报文的发送地点通常为终端设备所处地点,或者说终端设备的用户所处地点。报文的接收地点是指第一应用程序的应用服务器所处地点。Wherein, the sending location of the message is usually the location of the terminal equipment, or the location of the user of the terminal equipment. The receiving location of the message refers to the location of the application server of the first application program.
可选的,地理区域可以为根据国家覆盖范围划分得到的地理区域。一个国家覆盖的区域范围称为一个地理区域。相应的,“所述第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域”的另一种表述方式为“所述第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一国家”,或者“所述第一识别结果用于指示所述报文是否跨国家区域(跨境)传输”。Optionally, the geographical area may be a geographical area divided according to the coverage of the country. The area covered by a country is called a geographic area. Correspondingly, another expression of "the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area" is "the first identification result is used to indicate that the message Whether the sending location and the receiving location are located in the same country", or "the first identification result is used to indicate whether the message is transmitted across countries (cross-borders)".
通常,发送地点和接收地点中的至少一个以网际互连协议(Internet Protocol,IP)地址的形式携带在报文中。因此,可以通过对报文中的IP地址进行解析处理,得到识别结果。Usually, at least one of the sending location and the receiving location is carried in the message in the form of an Internet Protocol (Internet Protocol, IP) address. Therefore, the identification result can be obtained by parsing and processing the IP address in the message.
另一种可能的实现方式中,每个报文的识别结果用于指示所述报文中是否存在用户信息。也就是说,该实现方式可以识别出报文是否传输了用户信息。In another possible implementation manner, the identification result of each packet is used to indicate whether there is user information in the packet. That is to say, this implementation can identify whether the packet transmits user information.
具体而言,可以通过对报文中待传输的目标数据进行解析处理,以确定目标数据中是否存在用户信息,从而得到识别结果。Specifically, the target data to be transmitted in the message may be parsed to determine whether there is user information in the target data, thereby obtaining the recognition result.
再一种可能的实现方式中,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,以及所述报文中是否存在用户信息。也就是说,该实现方式既可以识别出报文是否跨地理区域传输,还可以识别出报文是否传输了用户信息。In another possible implementation manner, the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and whether there is user information in the message. That is to say, this implementation method can not only identify whether the message is transmitted across geographical regions, but also identify whether the message transmits user information.
S303:根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。S303: Generate a program detection result corresponding to the first application program according to the identification results of the M packets.
实际应用中,M个报文的识别结果可能存在如下几种情况:In practical applications, the identification results of M messages may have the following situations:
情况1:所述M个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息。也就是说,M个报文均未跨地理区域传输用户信息,该情况下,可以确定第一应用程序对应的程序检测结果为正常。Case 1: The identification result of each of the M messages indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message. That is to say, none of the M messages transmits user information across geographic regions. In this case, it may be determined that the program detection result corresponding to the first application program is normal.
情况2:所述M个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。也就是说,M个报文中存在跨地理区域进行传输的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Case 2: The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area. That is to say, among the M messages, there are messages transmitted across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
情况3:所述M个报文中存在第一报文的识别结果指示所述报文中存在用户信息。也就是说,M个报文中存在传输用户信息的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Case 3: The identification result that the first message exists in the M messages indicates that the user information exists in the message. That is to say, there is a message transmitting user information among the M messages. In this case, it may be determined that the program detection result of the first application program is abnormal.
情况4:所述M个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,且所述报文中存在用户信息。也就是说,M个报文中存在对用户信息进行跨地理区域传输的报文。该情况下,可以确定第一应用程序的程序检测结果为异常。Situation 4: The identification result of the first message among the M messages indicates that the sending location and the receiving location of the message are not located in the same geographical area, and user information exists in the message. That is to say, among the M messages, there are messages for transmitting user information across geographic regions. In this case, it may be determined that the program detection result of the first application program is abnormal.
一种可能的实现方式中,在程序检测结果为异常的情况下,程序检测结果中可以包括异常等级。例如,上述情况2和情况3对应的异常等级为轻微等级。上述情况4对应的异常等级为严重等级。In a possible implementation manner, if the program detection result is abnormal, the program detection result may include an abnormal level. For example, the abnormal levels corresponding to the above-mentioned cases 2 and 3 are slight. The exception level corresponding to the above case 4 is the severity level.
另一种可能的实现方式中,在程序检测结果为异常的情况下,程序检测结果中可以包括异常原因。例如,上述情况2对应的异常原因为“跨地理区域传输”,上述情况3对应的异常原因为“传输用户信息”,上述情况4对应的异常原因为“跨地理区域传输用户信息”。可选的,上述异常原因可以采用文字或者标识码表示。In another possible implementation manner, if the program detection result is abnormal, the program detection result may include the cause of the abnormality. For example, the abnormal cause corresponding to the above case 2 is "cross-geographical region transmission", the above-mentioned case 3 corresponds to "transmission of user information", and the above-mentioned case 4 corresponds to "transmission of user information across geographical regions". Optionally, the reason for the above abnormality may be represented by text or an identification code.
当本实施例的执行主体为终端设备时,终端设备生成第一应用程序对应的程序检测结果后,可以显示该程序检测结果,以便相关人员可以及时获知该程序检测结果。When the execution subject of this embodiment is a terminal device, the terminal device may display the program detection result after generating the program detection result corresponding to the first application program, so that relevant personnel can know the program detection result in time.
当本实施例的执行主体为服务器时,服务器生成第一应用程序对应的程序检测结果之后,可以显示该程序检测结果,或者向终端设备发送该程序检测结果,以便相关人员可以及时获知该程序检测结果。When the execution subject of this embodiment is a server, after the server generates the program detection result corresponding to the first application program, it can display the program detection result, or send the program detection result to the terminal device, so that relevant personnel can know the program detection result in time. result.
本实施例提供的应用程序的检测方法,包括:在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息,根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。上述过程中,由于是通过对应用程序在运行过程中实际发送的报文进行分析,得到应用程序的程序检测结果,提高了程序检测结果的准确性。The application detection method provided in this embodiment includes: during the running of the first application to be detected, acquiring M messages sent by the terminal device through the first application, and determining the recognition result of each message , the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message, according to the identification of the M messages As a result, a program detection result corresponding to the first application program is generated. In the above process, the program detection result of the application program is obtained by analyzing the message actually sent by the application program during the running process, which improves the accuracy of the program detection result.
在图3所示实施例的基础上,下面以一个更具体的实施例对本申请提供的技术方案进行更详细的介绍。On the basis of the embodiment shown in FIG. 3 , the technical solution provided by the present application will be described in more detail below with a more specific embodiment.
图4为本申请实施例提供的另一种应用程序的检测方法的流程示意图。如图4所示,本实施例的方法包括:FIG. 4 is a schematic flowchart of another detection method for an application provided by an embodiment of the present application. As shown in Figure 4, the method of this embodiment includes:
S401:向终端设备发送启动控制指令,所述启动控制指令用于控制待检测的第一应用程序启动运行。S401: Send a startup control instruction to the terminal device, where the startup control instruction is used to control the startup and operation of the first application program to be detected.
本实施例的方法可以由服务器执行。服务器向终端设备发送启动控制指令,启动控制指令用于模拟用户在终端设备手动点击第一应用程序的图标,以触发第一应用程序启动运行。通过向终端设备发送启动控制指令,使得第一应用程序能够运行起来,以进行后续的检测流程,提高了应用程序检测的自动化程度。The method in this embodiment can be executed by a server. The server sends the start control instruction to the terminal device, and the start control instruction is used to simulate the user manually clicking the icon of the first application program on the terminal device, so as to trigger the first application program to start and run. By sending the start control instruction to the terminal device, the first application program can be run to perform the subsequent detection process, thereby improving the automation degree of application program detection.
一种可能的实现方式中,在服务器向终端设备发送启动控制指令之前,服务器可以接收终端设备发送的目标信息,所述目标信息包括所述第一应用程序启动运行所需的资源信息。例如,可以包括下述资源信息中的至少一种:路由配置信息、终端设备的应用程序接口(Application Programming Interface,API)信息、需要加载的软件包信息等。这样,服务器可以根据所述目标信息,向终端设备发送启动控制指令。In a possible implementation manner, before the server sends the start control instruction to the terminal device, the server may receive target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program. For example, at least one of the following resource information may be included: routing configuration information, application programming interface (Application Programming Interface, API) information of the terminal device, software package information to be loaded, and the like. In this way, the server can send an activation control instruction to the terminal device according to the target information.
可选的,所述目标信息还包括第一应用程序对应的用户信息。第一应用程序对应的用户信息可用于S403对报文的识别处理过程,以识别报文中是否存在用户信息。第一应用程序对应的用户信息包括但不限于下述中的至少一项:姓名、出生日期、身份证件号码、个人生物识别信息、地址、电话号码、电子邮箱、健康信息、行踪信息等。Optionally, the target information further includes user information corresponding to the first application. The user information corresponding to the first application program may be used in S403 to identify and process the message, so as to identify whether there is user information in the message. The user information corresponding to the first application includes but is not limited to at least one of the following: name, date of birth, ID number, personal biometric information, address, phone number, email, health information, whereabouts information, etc.
S402:在第一应用程序运行过程中,针对第一应用程序的每个地理区域对应的服务接口,通过所述服务接口对应的代理接口获取终端设备通过所述服务接口发送的至少一个报文。S402: During the running of the first application program, for the service interface corresponding to each geographical area of the first application program, obtain at least one message sent by the terminal device through the service interface through the proxy interface corresponding to the service interface.
本实施例中,第一应用程序包括K个地理区域各自对应的服务接口。K为大于或者等于1的整数。举例而言,假设第一应用程序包括4个国家各自对应的服务接口,分别为: 国家A对应服务接口A,国家B对应的服务接口B,国家C对应的服务接口C,国家D对应的服务接口D。终端设备在国家A中通过服务接口A发送报文,在国家B中通过服务接口B发送报文,在国家C中通过服务接口C发送报文,在国家D中通过服务接口D发送报文。In this embodiment, the first application program includes service interfaces corresponding to each of the K geographical areas. K is an integer greater than or equal to 1. For example, assume that the first application program includes service interfaces corresponding to four countries, namely: service interface A corresponding to country A, service interface B corresponding to country B, service interface C corresponding to country C, and service interface corresponding to country D Interface D. The terminal device sends messages via service interface A in country A, via service interface B in country B, via service interface C in country C, and via service interface D in country D.
服务器设置有每个服务接口各自对应的代理接口,例如:与服务接口A对应的代理接口A,与服务接口B对应的代理接口B,与服务接口C对应的代理接口C,与服务接口D对应的代理接口D。每个代理接口用于实现流量代理功能。也就是说,代理接口A可以代理接收通过服务接口A发送的报文,代理接口B可以代理接收通过服务接口B发送的报文,代理接口C可以代理接收通过服务接口C发送的报文,代理接口D可以代理接收通过服务接口D发送的报文。The server is provided with a proxy interface corresponding to each service interface, for example: proxy interface A corresponding to service interface A, proxy interface B corresponding to service interface B, proxy interface C corresponding to service interface C, corresponding to service interface D The proxy interface D. Each proxy interface is used to realize the traffic proxy function. That is to say, proxy interface A can proxy to receive packets sent through service interface A, proxy interface B can proxy to receive packets sent through service interface B, proxy interface C can proxy to receive packets sent through service interface C, and proxy Interface D can act as a proxy to receive packets sent through service interface D.
这样,服务器可以通过代理接口A获取终端设备通过服务接口A发送的至少一个报文,通过代理接口B获取终端设备通过服务接口B发送的至少一个报文,通过代理接口C获取终端设备通过服务接口C发送的至少一个报文,通过代理接口D获取终端设备通过服务接口D发送的至少一个报文。In this way, the server can obtain at least one message sent by the terminal device through the service interface A through the proxy interface A, obtain at least one message sent by the terminal device through the service interface B through the proxy interface B, and obtain at least one message sent by the terminal device through the service interface B through the proxy interface C. The at least one message sent by C obtains at least one message sent by the terminal device through the service interface D through the proxy interface D.
S403:确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息。S403: Determine the identification result of each message, the identification result of each message is used to indicate whether the sending location and receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message .
具体而言,每个报文的识别结果包括第一识别结果和/或第二识别结果。其中,第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域。第二识别结果用于指示所述报文中是否存在用户信息。Specifically, the identification result of each packet includes the first identification result and/or the second identification result. Wherein, the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area. The second identification result is used to indicate whether there is user information in the packet.
一种可能的实现方式中,可以采用下述可能的方式确定每个报文的第一识别结果。In a possible implementation manner, the following possible manners may be used to determine the first identification result of each message.
(1)确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域。(1) Determine the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs.
假设第一应用程序包括K个地理区域各自对应的服务接口,所述K为大于或者等于1的整数。终端设备在通过第一应用程序发送报文时,是通过终端设备当前位置所属地理区域对应的服务接口发送的。例如,终端设备当前位置位于国家A,则通过服务接口A发送报文,终端设备当前位置位于国家B,则通过服务接口B发送报文。因此,针对每个报文,可以将发送该报文的服务接口对应的地理区域,作为该报文的发送地点所属地理区域。Assume that the first application program includes service interfaces corresponding to K geographical areas, where K is an integer greater than or equal to 1. When the terminal device sends the message through the first application program, it sends the message through the service interface corresponding to the geographical area to which the current location of the terminal device belongs. For example, if the current location of the terminal device is in country A, then the message will be sent through service interface A; if the current location of the terminal device is in country B, then the message will be sent through service interface B. Therefore, for each message, the geographical area corresponding to the service interface that sends the message may be used as the geographical area to which the sending location of the message belongs.
下面结合图5描述对报文的识别处理过程。图5为本申请实施例提供的一种对报文进行识别处理过程的示意图。如图5所示,针对每个报文,首先,从所述K个服务接口中,确定发送所述报文的第一服务接口,将所述第一服务接口对应的地理区域作为所述报文的发送地点所属地理区域。进一步的,对所述报文进行解析处理,得到所述报文的接收地点所属地理区域。The process of identifying the message will be described below with reference to FIG. 5 . FIG. 5 is a schematic diagram of a packet identification process provided by an embodiment of the present application. As shown in Figure 5, for each message, first, from the K service interfaces, determine the first service interface that sends the message, and use the geographical area corresponding to the first service interface as the message The geographical area to which the text is sent. Further, the message is parsed to obtain the geographical area to which the receiving location of the message belongs.
可选的,可以采用如下方式得到所述报文的接收地点所属地理区域:如图5所示,从所述报文中解析得到所述报文的接收地点对应的IP地址。IP地址是指报文待发送至的目标网络地址。通常,IP地址会显式或隐式携带在报文中,通过按照报文所采用的协议格式,对报文进行解析即可得到IP地址。进一步的,获取预设对应关系,所述预设对应关系指示不同IP地址与不同地理区域之间的对应关系。将所述预设对应关系中与所述IP地址对应的地理区域,确定为所述报文的接收地点所属地理区域。也就是说,使用IP地址查询预设对应关系,即可得到报文的接收地点所属地理区域。Optionally, the geographical area to which the receiving location of the message belongs may be obtained in the following manner: as shown in FIG. 5 , the IP address corresponding to the receiving location of the message is obtained by parsing the message. The IP address refers to the destination network address to which the packet is to be sent. Usually, the IP address is carried in the message explicitly or implicitly, and the IP address can be obtained by parsing the message according to the protocol format adopted by the message. Further, a preset corresponding relationship is acquired, and the preset corresponding relationship indicates a corresponding relationship between different IP addresses and different geographic regions. Determining the geographical area corresponding to the IP address in the preset correspondence relationship as the geographical area to which the receiving location of the message belongs. That is to say, by using the IP address to query the preset correspondence relationship, the geographical area to which the receiving location of the message belongs can be obtained.
(2)若所述发送地点所属地理区域与所述接收地点所属地理区域相同,则确定所述 报文的第一识别结果指示所述报文的发送地点和接收地点位于同一地理区域;若所述发送地点所属地理区域与所述接收地点所属地理区域不同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。(2) If the geographic area to which the sending location belongs is the same as the geographic area to which the receiving location belongs, then determine that the first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographic area; if the If the geographic area to which the sending location belongs is different from the geographic area to which the receiving location belongs, then it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are not located in the same geographic area.
例如,若某个报文的发送地点所属地理区域为国家A,接收地点所属地理区域为国家B,则该报文的第一识别结果指示发送地点和接收地点不位于同一地理区域。若某个报文的发送地点所属地理区域为国家C,接收地点所属地理区域为国家C,则该报文的第一识别结果指示发送地点和接收地点位于同一地理区域。For example, if the geographical area of a sending location of a certain message is country A, and the geographical area of the receiving location is country B, the first identification result of the message indicates that the sending location and the receiving location are not located in the same geographical area. If the geographical area of the sending location of a certain message is country C, and the geographical area of the receiving location is country C, then the first identification result of the message indicates that the sending location and the receiving location are located in the same geographic area.
本实施例中,通过根据发送报文的服务接口,确定报文的发送地点所属地理区域,并通过对报文中的IP地址进行解析处理,确定出报文的接收地点所属地理区域,进而根据发送地点所属地理区域和接收地点所属地理区域是否相同,得到报文的第一识别结果,保证了第一识别结果的准确性,即,能够准确、全面的识别出跨地理区域传输的报文。In this embodiment, by determining the geographical area where the sending location of the message belongs to according to the service interface that sends the message, and by analyzing the IP address in the message, it is determined that the geographical area that the receiving location of the message belongs to, and then according to Whether the geographical area to which the sending location belongs is the same as that to which the receiving location belongs, the first identification result of the message is obtained, which ensures the accuracy of the first identification result, that is, the message transmitted across geographical areas can be accurately and comprehensively identified.
一种可能的实现方式中,可以如图6所示的方式确定每个报文的第二识别结果。图6为本申请实施例提供的另一种对报文进行识别处理过程的示意图。如图6所示,In a possible implementation manner, the second identification result of each message may be determined in a manner as shown in FIG. 6 . FIG. 6 is a schematic diagram of another packet identification process provided by the embodiment of the present application. As shown in Figure 6,
(1)从报文中解析得到待传输的目标数据。(1) Parsing the message to obtain the target data to be transmitted.
能够理解,按照报文所采用的协议格式,对报文进行解析,可以从报文中解析得到待传输的目标数据。It can be understood that the target data to be transmitted can be obtained by parsing the message according to the protocol format adopted by the message.
(2)对所述目标数据进行解密处理,得到解密数据。(2) Decrypt the target data to obtain decrypted data.
实际应用中,为了保证数据传输的安全性,发送端在发送报文之前,会对报文中的目标数据进行加密处理。也就是说,上述步骤(1)中解析得到的目标数据为加密后的数据。因此,可以采用第一应用程序对应的加解密算法对目标数据进行解密处理,或者,对所述目标数据进行破解处理,得到解密数据。In practical applications, in order to ensure the security of data transmission, the sender encrypts the target data in the message before sending the message. That is to say, the target data analyzed in the above step (1) is encrypted data. Therefore, the encryption and decryption algorithm corresponding to the first application program may be used to decrypt the target data, or the target data may be decrypted to obtain decrypted data.
(3)将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果。(3) Perform matching processing on the decrypted data and the user information corresponding to the first application program to obtain a second identification result of the message.
可选的,所述第一应用程序对应的用户信息包括至少一个信息项。可以通过如下方式确定出报文的第二识别结果:Optionally, the user information corresponding to the first application program includes at least one information item. The second recognition result of the message may be determined in the following manner:
分别将每个信息项与所述解密数据进行匹配处理,得到每个信息项的匹配结果,每个信息项的匹配结果为成功或者失败。若所述至少一个信息项中存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中存在用户信息。若所述至少一个信息项中不存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中不存在用户信息。Each information item is matched with the decrypted data respectively to obtain a matching result of each information item, and the matching result of each information item is success or failure. If the matching result of the existence of the information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that the user information exists in the message. If the matching result of no information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that there is no user information in the message.
举例而言,假设第一应用程序对应的用户信息包括如下两个信息项:“56215467812”和“AAAaaa”。其中,“56215467812”表示用户位置,“AAAaaa”表示设备标识。若某个报文对应的解密数据中存在“56215467812”、“AAAaaa”中的至少一个,则说明该报文的第二识别结果指示报文中存在用户信息。若某个报文的解密数据中既不存在“56215467812”,也不存在“AAAaaa”,则说明该报文的第二识别结果指示报文中不存在用户信息。For example, assume that the user information corresponding to the first application program includes the following two information items: "56215467812" and "AAAaaa". Among them, "56215467812" indicates the user location, and "AAAaaa" indicates the device ID. If at least one of "56215467812" and "AAAaaa" exists in the decrypted data corresponding to a certain message, it means that the second identification result of the message indicates that the message contains user information. If neither "56215467812" nor "AAAaaa" exists in the decrypted data of a certain message, it means that the second identification result of the message indicates that there is no user information in the message.
本实施例中,通过从报文中解析得到待传输的目标数据,并对目标数据进行解密处理,得到解密数据,进而根据解密数据与第一应用程序的用户信息的匹配结果,确定报文的第二识别结果,保证了第二识别结果的准确性,即,能够准确、全面的识别出传递用户信息的报文。In this embodiment, the target data to be transmitted is obtained by parsing the message, and the target data is decrypted to obtain the decrypted data, and then according to the matching result of the decrypted data and the user information of the first application program, the information of the message is determined. The second identification result ensures the accuracy of the second identification result, that is, the message transmitting the user information can be accurately and comprehensively identified.
S404:针对每个服务接口,根据通过所述服务接口发送的所述至少一个报文的识别结果,确定所述服务接口对应的接口检测结果。S404: For each service interface, determine an interface detection result corresponding to the service interface according to the identification result of the at least one message sent through the service interface.
示例性的,若所述至少一个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息,则确定所述接口检测结果指示所述服务接口不存在异常。Exemplarily, if the identification result of each message in the at least one message indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message, then determine The interface detection result indicates that there is no abnormality in the service interface.
若所述至少一个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,和/或,所述报文中存在用户信息,则确定所述接口检测结果指示所述服务接口存在异常。If the identification result of the first message in the at least one message indicates that the sending location and the receiving location of the message are not located in the same geographical area, and/or, there is user information in the message, then determine the The interface detection result indicates that the service interface is abnormal.
举例而言,假设终端设备通过服务接口A发送的N1个报文中,每个报文的识别结果均指示报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息,也就是说,N1个报文均未对用户信息进行跨地理区域传输,则说明服务接口A不存在异常。For example, assume that among the N1 messages sent by the terminal device through service interface A, the identification result of each message indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user in the message. That is to say, none of the N1 messages transmit user information across geographic regions, which means that there is no abnormality in service interface A.
假设终端设备通过服务接口B发送的N2个报文中,存在某个报文的识别结果指示报文的发送地点和接收地点不位于同一地理区域,也就是说,N2个报文中存在跨地理传输的报文,则说明服务接口B存在异常。Assume that among the N2 messages sent by the terminal device through the service interface B, there is a message whose identification result indicates that the sending location and the receiving location of the message are not located in the same geographical area, that is, there are cross-geographical messages among the N2 messages. If the packet is transmitted, it indicates that there is an exception in service interface B.
假设终端设备通过服务接口C发送的N3个报文中,存在某个报文的识别结果指示报文中存在用户信息,也就是说,N3个报文中存在传输用户信息的报文,则说明服务接口C存在异常。Assuming that among the N3 messages sent by the terminal device through the service interface C, the identification result of a certain message indicates that there is user information in the message, that is, there is a message transmitting user information in the N3 messages, then it means There is an exception in service interface C.
假设终端设备通过服务接口D发送的N4个报文中,存在某个报文的识别结果指示报文的发送地点和接收地点不位于同一地理区域,且报文中存在用户信息,也就是说,N4个报文中存在对用户信息进行跨地理区域传输的报文,则说明服务接口D存在异常。Assume that among the N4 messages sent by the terminal device through the service interface D, there is a message whose identification result indicates that the sending location and the receiving location of the message are not located in the same geographical area, and there is user information in the message, that is, If among the N4 messages, there is a message for transmitting user information across geographic regions, it means that there is an exception in the service interface D.
可选的,在服务接口存在异常的情况下,服务接口对应的接口检测结果可以包括:异常等级。例如,上述服务接口B和服务接口C的异常等级为轻微等级,服务接口D的异常等级为严重等级。Optionally, when there is an exception in the service interface, the interface detection result corresponding to the service interface may include: an exception level. For example, the abnormality levels of the above-mentioned service interface B and service interface C are minor level, and the abnormality level of service interface D is severe level.
可选的,在服务接口存在异常的情况下,服务接口对应的接口检测结果可以包括:异常原因。例如,上述服务接口B对应的异常原因为“跨地理区域传输”,上述服务接口C对应的异常原因为“传输用户信息”,上述服务接口D对应的异常原因为“跨地理区域传输用户信息”。可选的,上述异常原因可以采用文字或者标识码表示。Optionally, if there is an exception in the service interface, the interface detection result corresponding to the service interface may include: the cause of the exception. For example, the abnormal reason corresponding to the above-mentioned service interface B is "Transfer across geographic regions", the corresponding abnormal reason of the above-mentioned service interface C is "Transfer user information", and the abnormal reason corresponding to the above-mentioned service interface D is "Transfer user information across geographic regions" . Optionally, the reason for the above abnormality may be represented by text or an identification code.
S405:根据各服务接口对应的接口检测结果,生成所述第一应用程序对应的程序检测结果,所述第一应用程序对应的程序检测结果包括各服务接口对应的接口检测结果。S405: Generate a program detection result corresponding to the first application program according to the interface detection result corresponding to each service interface, where the program detection result corresponding to the first application program includes the interface detection result corresponding to each service interface.
作为一个示例,第一应用程序的程序检测结果可以如表1所示:As an example, the program detection results of the first application program can be shown in Table 1:
表1Table 1
 the 正常/异常normal/abnormal 异常等级Exception level 异常原因Abnormal
服务接口AService interface A 正常normal // //
服务接口Bservice interface B 异常abnormal 轻微slight 跨地理区域传输Transmitting across geographic regions
服务接口Cservice interface C 异常abnormal 轻微slight 传输用户信息Transfer user information
服务接口DService interface D 异常abnormal 严重serious 跨地理区域传输用户信息Transferring User Information Across Geographic Areas
作为另一个示例,图7A为本申请实施例提供的一种程序检测结果对应的显示界面的示意图。如图7A所示,在该显示界面中,分别显示了服务接口A、服务接口B、服务接口C、服务接口D是否正常。在某个服务接口异常的情况下,还显示了该服务接口对应的异 常等级。As another example, FIG. 7A is a schematic diagram of a display interface corresponding to a program detection result provided in an embodiment of the present application. As shown in FIG. 7A , in the display interface, whether the service interface A, the service interface B, the service interface C, and the service interface D are normal is displayed respectively. When a certain service interface is abnormal, it also displays the corresponding exception level of the service interface.
作为又一个示例,图7B为本申请实施例提供的另一种程序检测结果对应的显示界面的示意图。如图7B所示,在该显示界面中,分别显示了服务接口A、服务接口B、服务接口C、服务接口D是否正常。在某个服务接口异常的情况下,还具体显示了该服务接口对应的异常原因。As yet another example, FIG. 7B is a schematic diagram of a display interface corresponding to another program detection result provided in the embodiment of the present application. As shown in FIG. 7B , in the display interface, whether the service interface A, service interface B, service interface C, and service interface D are normal is displayed respectively. When a certain service interface is abnormal, the abnormal cause corresponding to the service interface is also specifically displayed.
实际应用场景中,终端设备位于不同国家时,通过不同的服务接口发送报文。因此,在对第一应用程序进行检测时,若需要对多个国家对应的服务接口进行检测,则需要获取到通过多个服务接口发送的报文。In actual application scenarios, when terminal devices are located in different countries, they send messages through different service interfaces. Therefore, when detecting the first application program, if it is necessary to detect service interfaces corresponding to multiple countries, it is necessary to obtain messages sent through multiple service interfaces.
一种可能的实现方式中,可以使用位于不同国家的终端设备进行检测。例如,服务器获取终端设备A(位于国家A)通过第一应用程序的服务接口A发送的报文,通过对报文进行分析,得到服务接口A的接口检测结果。服务器获取终端设备B(位于国家B)通过第一应用程序的服务接口B发送的报文,通过对报文进行分析,得到服务接口B的接口检测结果。服务器获取终端设备C(位于国家C)通过第一应用程序的服务接口C发送的报文,通过对报文进行分析,得到服务接口C的接口检测结果。服务器获取终端设备D(位于国家D)通过第一应用程序的服务接口D发送的报文,通过对报文进行分析,得到服务接口D的接口检测结果。进而,综合上述各服务接口的接口检测结果,得到第一应用程序的程序检测结果。In a possible implementation manner, terminal devices located in different countries may be used for detection. For example, the server obtains the message sent by the terminal device A (located in country A) through the service interface A of the first application program, and obtains the interface detection result of the service interface A by analyzing the message. The server obtains the message sent by the terminal device B (located in country B) through the service interface B of the first application program, and obtains the interface detection result of the service interface B by analyzing the message. The server acquires the message sent by the terminal device C (located in country C) through the service interface C of the first application program, and obtains the interface detection result of the service interface C by analyzing the message. The server obtains the message sent by the terminal device D (located in the country D) through the service interface D of the first application program, and obtains the interface detection result of the service interface D by analyzing the message. Furthermore, the interface detection results of the above service interfaces are integrated to obtain the program detection result of the first application program.
另一种可能的实现方式中,可以使用一个终端设备完成对多个服务接口的检测过程。举例而言,通过对终端设备进行打桩、埋点等方式,更改终端设备所处的位置,分别模拟如下几种场景:(1)终端设备位于国家A,通过第一应用程序的服务接口A发送报文;(2)终端设备位于国家B,通过第一应用程序的服务接口B发送报文;(3)终端设备位于国家C,通过第一应用程序的服务接口C发送报文;(4)终端设备位于国家D,通过第一应用程序的服务接口D发送报文。在上述每种场景下,服务器获取终端设备通过第一应用程序发送的报文,并对报文进行分析,得到各服务接口对应的接口检测结果。进而,综合上述各服务接口的接口检测结果,得到第一应用程序的程序检测结果。该实现方式中,使用一个终端设备,并且无需移动终端设备所处的国家,即可完成对第一应用程序的所有服务接口的检测,保证了检测过程对服务国家的覆盖全面性,并提高了检测效率。In another possible implementation manner, one terminal device may be used to complete the detection process for multiple service interfaces. For example, by piling and burying the terminal equipment, changing the location of the terminal equipment, respectively simulating the following scenarios: (1) The terminal equipment is located in country A, and the terminal equipment is sent through the service interface A of the first application program. message; (2) the terminal device is located in country B, and sends the message through the service interface B of the first application program; (3) the terminal device is located in country C, and sends the message through the service interface C of the first application program; (4) The terminal device is located in country D, and sends the message through the service interface D of the first application program. In each of the above scenarios, the server obtains the message sent by the terminal device through the first application program, and analyzes the message to obtain the interface detection result corresponding to each service interface. Furthermore, the interface detection results of the above service interfaces are integrated to obtain the program detection result of the first application program. In this implementation mode, the detection of all service interfaces of the first application program can be completed by using one terminal device without the country where the mobile terminal device is located, which ensures the comprehensiveness of the detection process for the service country and improves the detection efficiency.
上述各实现方式中,终端设备通过第一应用程序发送报文的方式,可以是通过用户对第一应用程序进行操作,触发第一应用程序发送报文,还可以是由自动测试脚本控制第一应用程序发送报文,本实施例对此不作限定。In each of the above implementations, the way the terminal device sends the message through the first application program may be that the user operates the first application program to trigger the first application program to send a message, or the first application program may be controlled by an automatic test script. The application program sends the message, which is not limited in this embodiment.
本实施例中,由于是通过对第一应用程序在运行过程中实际发送的报文进行分析,得到应用程序的程序检测结果,保证了程序检测结果的准确性。进一步的,在第一应用程序可服务的地理区域有多个时,能够实现对每个地理区域的服务接口分别进行检测,一方面,保证了检测结果的全面性,另一方面,还提高了检测效率。In this embodiment, because the program detection result of the application program is obtained by analyzing the message actually sent by the first application program during the running process, the accuracy of the program detection result is guaranteed. Further, when there are multiple geographical areas that the first application program can serve, the service interface of each geographical area can be detected separately, on the one hand, the comprehensiveness of the detection results is guaranteed, on the other hand, it also improves the detection efficiency.
图8A为本申请实施例提供的另一种系统架构的示意图。如图8A所示,该系统架构包括:终端设备和服务器。其中,服务器包括:运行时系统、位置分析系统、接口定位系统、数据分析系统、检测结果生成系统。终端设备中安装有待检测的第一应用程序。FIG. 8A is a schematic diagram of another system architecture provided by the embodiment of the present application. As shown in FIG. 8A, the system architecture includes: a terminal device and a server. Wherein, the server includes: a runtime system, a position analysis system, an interface positioning system, a data analysis system, and a detection result generation system. A first application program to be detected is installed in the terminal device.
图8B为图8A所示系统架构对应的应用程序的检测方法的交互流程示意图。如图8B 所示,本实施例的应用程序的检测方法,包括:FIG. 8B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 8A . As shown in FIG. 8B, the detection method of the application program in this embodiment includes:
S801:运行时系统控制待检测的第一应用程序启动运行。S801: The runtime system controls the first application program to be detected to start running.
S802:运行时系统获取终端设备通过第一应用程序发送的报文。S802: The runtime system acquires the message sent by the terminal device through the first application program.
本实施例中,运行时系统提供流量代理功能,实时代理第一应用程序在全球各个服务地理区域的流量数据,从而保证对所有服务地理区域的流量进行检测,提高检测全面性。In this embodiment, the runtime system provides a traffic proxy function to proxy the traffic data of the first application program in various service geographical regions in the world in real time, so as to ensure the detection of traffic in all service geographical regions and improve the comprehensiveness of detection.
S803:运行时系统向位置分析系统、接口定位系统发送报文。S803: the runtime system sends a message to the position analysis system and the interface positioning system.
S804:位置分析系统对报文进行识别处理,得到报文的第一识别结果,第一识别结果用于指示报文的发送地点和接收地点是否位于同一地理区域。S804: The location analysis system performs identification processing on the message to obtain a first identification result of the message, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area.
S805:位置分析系统向检测结果生成系统发送报文的第一识别结果。S805: The location analysis system sends the first identification result of the message to the detection result generation system.
S806:接口定位系统确定报文对应的服务接口。S806: The interface positioning system determines the service interface corresponding to the packet.
接口定位系统对每个报文进行接口级定位,便于后续针对每个服务接口,得到接口级别的检测结果。The interface locating system performs interface-level locating for each message, so that subsequent interface-level detection results can be obtained for each service interface.
S807:接口定位系统向检测结果生成模块发送报文对应的服务接口。S807: The interface locating system sends the service interface corresponding to the message to the detection result generating module.
S808:接口定位系统从报文中解析得到待传输的目标数据,对目标数据进行解密处理,得到解密数据。S808: The interface positioning system parses the message to obtain the target data to be transmitted, and decrypts the target data to obtain the decrypted data.
S809:接口定位系统向数据分析系统发送解密数据。S809: The interface positioning system sends the decrypted data to the data analysis system.
S810:数据分析系统将解密数据与第一应用程序对应的用户信息进行匹配处理,得到报文的第二识别结果。第二识别结果用于指示报文中是否存在用户信息。S810: The data analysis system matches the decrypted data with the user information corresponding to the first application program to obtain a second identification result of the message. The second identification result is used to indicate whether there is user information in the packet.
S811:数据分析系统向检测结果生成系统发送报文的第二识别结果。S811: The data analysis system sends the second identification result of the packet to the detection result generation system.
S812:检测结果生成系统根据报文对应的服务接口、以及报文的第一识别结果和/或第二识别结果,生成第一应用程序对应的程序检测结果。S812: The detection result generating system generates a program detection result corresponding to the first application program according to the service interface corresponding to the message and the first identification result and/or the second identification result of the message.
本实施例中,上述的S802至S811可以循环执行多次。S804-S805、S806-S809、S810-S811可以同时执行,三者没有先后顺序的区分。In this embodiment, the above S802 to S811 may be executed in a loop multiple times. S804-S805, S806-S809, and S810-S811 can be executed at the same time, and there is no distinction between the three.
图9A为本申请实施例提供的又一种系统架构的示意图。在图8A所示实施例的基础上,如图9A所示,终端设备包括:静态解析模块、运行时插件模块和展示模块。服务器中的运行时系统包括:动态运行模块和流量代理模块;位置分析系统包括:IP解析模块、位置分析模块;接口定位系统包括:加密流量破解模块。数据分析系统包括:用户信息匹配模块;检测结果生成系统包括:检测结果生成模块。FIG. 9A is a schematic diagram of another system architecture provided by the embodiment of the present application. On the basis of the embodiment shown in FIG. 8A , as shown in FIG. 9A , the terminal device includes: a static analysis module, a runtime plug-in module and a display module. The runtime system in the server includes: a dynamic operation module and a traffic proxy module; the location analysis system includes: an IP resolution module and a location analysis module; the interface location system includes: an encrypted traffic cracking module. The data analysis system includes: a user information matching module; the detection result generation system includes: a detection result generation module.
图9B为图9A所示系统架构对应的应用程序的检测方法的交互流程示意图。如图9B所示,本实施例的应用程序的检测方法,包括:FIG. 9B is a schematic diagram of an interaction flow of a detection method for an application program corresponding to the system architecture shown in FIG. 9A . As shown in FIG. 9B, the application detection method of this embodiment includes:
S901:静态解析模块对待检测的第一应用程序的安装包进行逆向解析处理,得到目标信息,目标信息中包括第一应用程序启动运行所需的资源信息。S901: The static parsing module performs reverse parsing processing on the installation package of the first application program to be detected to obtain target information, where the target information includes resource information required for starting and running the first application program.
S902:静态解析模块向动态运行模块发送目标信息。S902: The static analysis module sends the target information to the dynamic operation module.
可选的,目标信息中还包括:第一应用程序对应的用户信息。当目标信息中包括第一应用程序对应的用户信息时,静态解析模块还可以向运行时系统发送第一应用程序对应的用户信息,以便静态解析模块向数据分析系统提供第一应用程序对应的用户信息,用于用户信息的匹配处理。Optionally, the target information further includes: user information corresponding to the first application program. When the target information includes the user information corresponding to the first application program, the static analysis module can also send the user information corresponding to the first application program to the runtime system, so that the static analysis module can provide the data analysis system with the user information corresponding to the first application program. Information, used for matching processing of user information.
S903:动态运行模块根据目标信息,与运行时插件模块进行交互,控制第一应用程序启动运行。S903: The dynamic running module interacts with the runtime plug-in module according to the target information, and controls the first application program to start running.
示例性的,动态运行模块向运行时插件模块发送控制指令,运行时插件模块向动态运行模块发送事件信息。运行时插件模块确保第一应用程序动态运行。Exemplarily, the dynamic running module sends control instructions to the runtime plug-in module, and the runtime plug-in module sends event information to the dynamic running module. The runtime plug-in module ensures that the first application runs dynamically.
S904:流量代理模块获取终端设备通过第一应用程序发送的报文。S904: The traffic proxy module obtains the message sent by the terminal device through the first application program.
S905:流量代理模块向IP解析模块、加密流量破解模块发送所述报文。S905: The traffic proxy module sends the packet to the IP analysis module and the encrypted traffic cracking module.
S906:IP解析模块从报文中解析得到报文的接收地点对应的IP地址。S906: The IP parsing module parses the message to obtain the IP address corresponding to the receiving location of the message.
S907:位置分析模块将预设对应关系中与IP地址对应的地理区域,确定为报文的接收地点所属地理区域。S907: The location analysis module determines the geographical area corresponding to the IP address in the preset correspondence relationship as the geographical area to which the receiving location of the message belongs.
S908:位置分析模块将发送报文的第一服务接口对应的地理区域,确定为报文的发送地点所属地理区域。S908: The location analysis module determines the geographical area corresponding to the first service interface that sends the message as the geographical area to which the sending location of the message belongs.
S909:位置分析模块根据报文的发送地点所属地理区域和接收地点所属地理区域,确定报文的第一识别结果,第一识别结果用于指示报文的发送地点和接收地点是否位于同一地理区域。S909: The location analysis module determines the first identification result of the message according to the geographical area to which the sending location and the receiving location of the message belong, and the first identification result is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area .
S910:位置分析模块向检测结果生成模块发送报文的第一识别结果。S910: The location analysis module sends the first identification result of the packet to the detection result generation module.
S911:加密流量破解模块确定报文对应的服务接口。S911: The encrypted traffic cracking module determines the service interface corresponding to the message.
S912:加密流量破解模块向检测结果生成模块发送报文对应的服务接口。S912: The encrypted traffic cracking module sends the service interface corresponding to the message to the detection result generating module.
S913:加密流量破解模块从报文中解析得到待传输的目标数据,对目标数据进行解密处理,得到解密数据。S913: The encrypted traffic cracking module parses the message to obtain the target data to be transmitted, and decrypts the target data to obtain the decrypted data.
S914:加密流量破解模块向用户信息匹配模块发送解密数据。S914: The encrypted traffic cracking module sends decrypted data to the user information matching module.
S915:用户信息匹配模块将解密数据与第一应用程序对应的用户信息进行匹配处理,得到报文的第二识别结果,所述第二识别结果用于指示报文中是否存在用户信息。S915: The user information matching module matches the decrypted data with the user information corresponding to the first application program, and obtains a second identification result of the message, and the second identification result is used to indicate whether there is user information in the message.
S916:用户信息匹配模块向检测结果生成模块发送报文的第二识别结果。S916: The user information matching module sends the second identification result of the message to the detection result generating module.
应理解,上述的S904至S916循环执行多次,即对终端设备通过第一应用程序发送的多个报文进行检测分析。当检测完成(例如,检测的报文数量达到预设数量,或者检测时间达到预设时长)后,检测结果生成模块向动态运行模块发送终止运行指令。It should be understood that the above S904 to S916 are executed repeatedly multiple times, that is, to detect and analyze multiple messages sent by the terminal device through the first application program. When the detection is completed (for example, the number of detected packets reaches a preset number, or the detection time reaches a preset duration), the detection result generation module sends a stop operation instruction to the dynamic operation module.
S917:检测结果生成模块根据报文对应的服务接口、以及报文的第一识别结果和/或第二识别结果,生成第一应用程序对应的程序检测结果。S917: The detection result generation module generates a program detection result corresponding to the first application program according to the service interface corresponding to the message and the first identification result and/or the second identification result of the message.
S918:检测结果生成模块向展示模块发送程序检测结果。S918: The detection result generating module sends the program detection result to the display module.
S919:展示模块对程序检测结果进行展示。S919: The display module displays the program detection results.
本实施例中,S906-S910、S911-S914、S915-S916可以同时执行,三者没有先后顺序的区分。In this embodiment, S906-S910, S911-S914, and S915-S916 can be executed at the same time, and the order of the three is not distinguished.
应理解,图8B和图9B所示的应用程序的检测方法的流程具有与上述实施例相同的技术效果,可以参照上述实施例的相关描述,在此不做赘述。It should be understood that the flow of the method for detecting an application shown in FIG. 8B and FIG. 9B has the same technical effect as that of the above embodiment, and reference may be made to relevant descriptions of the above embodiment, and details are not repeated here.
在上述任意实施例的基础上,下面结合一个具体的示例对本申请技术方案进行举例说明。本申请实施例中,可以将待检测的应用程序的安装包下载到终端设备中,进而触发终端设备和服务器交互流程,以实现上述任一实施例中的应用程序的检测方法。On the basis of any of the above embodiments, the technical solution of the present application will be illustrated below in conjunction with a specific example. In the embodiment of the present application, the installation package of the application program to be detected can be downloaded to the terminal device, and then the interaction process between the terminal device and the server is triggered, so as to realize the detection method of the application program in any of the above embodiments.
图10为本申请实施例提供的终端设备的界面变化示意图。如图10所示,界面1001上可以显示有待检测的应用程序的标识,若待检测的应用程序为应用程序X,该待检测的应用程序的标识可以为应用程序X的图标或名称。界面1001中还可以显示有“检测”控 件,检测人员点击该“检测”控件,可以触发执行上述实施例中的应用程序检测方法。当终端设备接收来自服务器的应用程序X的程序检测结果时,界面1001可以跳转至界面1002,该界面1002可以与上述图7A或图7B中的界面类似,在此不做赘述。可选的,在一种可能的实现方式中,上述界面1001可以先跳转至界面1003,再跳转至界面1002。其中,界面1003上可以显示有“正在进行应用程序检测”的文字提醒信息。FIG. 10 is a schematic diagram of interface changes of a terminal device provided by an embodiment of the present application. As shown in FIG. 10 , the identifier of the application to be detected may be displayed on the interface 1001 . If the application to be detected is application X, the identifier of the application to be detected may be the icon or name of the application X. The interface 1001 may also display a "detection" control, and the inspector may click on the "detection" control to trigger the execution of the application detection method in the above-mentioned embodiment. When the terminal device receives the program detection result of the application program X from the server, the interface 1001 may jump to the interface 1002, and the interface 1002 may be similar to the interface in FIG. 7A or FIG. Optionally, in a possible implementation manner, the above interface 1001 may jump to interface 1003 first, and then jump to interface 1002. Wherein, the interface 1003 may display a text reminder message of "application detection in progress".
图11为本申请实施例提供的应用程序检测过程的示意图。本实施例中,假设待检测的应用程序X在国家A、国家B、国家C和国家D提供服务。如图11所示,对应用程序X的检测过程如下:FIG. 11 is a schematic diagram of an application detection process provided by an embodiment of the present application. In this embodiment, it is assumed that the application program X to be tested provides services in country A, country B, country C and country D. As shown in Figure 11, the detection process for application X is as follows:
(1)终端设备通过静态解析模块对应用程序X的安装包进行逆向解析处理,得到应用程序X启动运行时所需的资源信息。作为一个示例,如图11中的1101所示,解析得到的资源信息可以包括:(1) The terminal device performs reverse analysis processing on the installation package of the application program X through the static analysis module, and obtains the resource information required for the application program X to start and run. As an example, as shown in 1101 in Figure 11, the resource information obtained through parsing may include:
路由列表:en\ru\cn\euRouting list: en\ru\cn\eu
库列表:库1\库2Library list: library 1\ library 2
设备API接口:设备信息接口(getImei)\位置信息接口(getLocation)Device API interface: device information interface (getImei)\location information interface (getLocation)
等。wait.
(2)服务器与终端设备进行交互,以控制应用程序X启动运行。作为一个示例,服务器中的动态运行模块和终端设备中的运行插件模块之间的交互方式如下:(2) The server interacts with the terminal device to control the application program X to start and run. As an example, the interaction between the dynamic running module in the server and the running plug-in module in the terminal device is as follows:
如图11中的1102所示,服务器中的动态运行模块对应的交互指令如下:As shown in 1102 in Figure 11, the interactive instructions corresponding to the dynamic running module in the server are as follows:
发送:运行apksend: run apk
发送:获取网页视图文本send: get webview text
接收:更新位置信息“56215467812”Receive: update location information "56215467812"
接收:获取设备信息“AAAaaa”Receive: Get device information "AAAaaa"
如图11中的1103所示,终端设备中的运行时插件模块对应的交互指令如下:As shown in 1103 in FIG. 11 , the interaction instructions corresponding to the runtime plug-in module in the terminal device are as follows:
接收:运行apkReceive: run apk
接收:获取网页视图文本Receive: Get the web view text
发送:更新位置信息“56215467812”Send: update location information "56215467812"
发送:获取设备信息“AAAaaa”Send: get device information "AAAaaa"
经过上述交互过程,应用程序X启动运行,并且,如图11中的1113所示,服务器的用户信息匹配模块获取到应用程序X对应的用户信息包括:After the above interaction process, the application program X starts to run, and, as shown in 1113 in FIG. 11 , the user information matching module of the server obtains the user information corresponding to the application program X including:
位置信息:56215467812Location information: 56215467812
设备信息:AAAaaaDevice information: AAAaaa
(3)服务器获取终端设备通过第一应用程序发送的报文。(3) The server obtains the message sent by the terminal device through the first application program.
示例性的,应用程序X包括每个服务地理区域对应的服务接口。服务器通过流量代理模块对各服务接口的流量进行代理。作为一个示例,如图11中的1104所示,假设各服务地理区域对应的服务接口如下:Exemplarily, the application program X includes a service interface corresponding to each service geographic area. The server proxies the traffic of each service interface through the traffic proxy module. As an example, as shown in 1104 in Figure 11, it is assumed that the service interface corresponding to each service geographic area is as follows:
国家A-服务接口A:en.ttt.com/ACountry A-Service Interface A: en.ttt.com/A
国家B-服务接口B:eu.ttt.com/BCountry B - Service Interface B: eu.ttt.com/B
国家C-服务接口C:ru.ttt.com/CNational C-service interface C: ru.ttt.com/C
国家D-服务接口D:cn.ttt.com/DNational D-service interface D: cn.ttt.com/D
(4)服务器中的IP解析模块从报文中解析得到报文的接收地点对应的IP地址。作为一个示例,如图11中的1105所示,假设4个报文中解析得到的IP地址如下:(4) The IP parsing module in the server parses the message to obtain the IP address corresponding to the receiving location of the message. As an example, as shown in 1105 in FIG. 11 , it is assumed that the IP addresses obtained through analysis in the four packets are as follows:
报文1:199.60.4.20Message 1: 199.60.4.20
报文2:154.12.1.3Message 2: 154.12.1.3
报文3:163.43.9.4Message 3: 163.43.9.4
报文4:172.78.45.45Message 4: 172.78.45.45
(5)服务器中的位置分析模块根据预设对应关系,将IP地址映射为地理区域,得到报文的接收地点所属地理区域。作为一个示例,如图11中的1106所示,上述4个报文的接收地点所属地理区域如下:(5) The location analysis module in the server maps the IP address to a geographical area according to the preset corresponding relationship, and obtains the geographical area to which the receiving location of the message belongs. As an example, as shown in 1106 in FIG. 11 , the geographical areas to which the receiving locations of the above four messages belong are as follows:
199.60.4.20:国家A199.60.4.20: Country A
154.12.1.3:国家F154.12.1.3: Country F
163.43.9.4:国家D163.43.9.4: Country D
172.78.45.45:国家D172.78.45.45: Country D
(6)服务器中的位置分析模块根据发送报文的服务接口,确定报文的发送地点所属地理区域。假设上述4个报文的发送地点所属地理区域如下:(6) The location analysis module in the server determines the geographical area to which the sending location of the message belongs according to the service interface of the sending message. Assume that the geographical areas where the sending locations of the above four messages belong are as follows:
报文1:国家AMessage 1: Country A
报文2:国家BMessage 2: Country B
报文3:国家CMessage 3: Country C
报文4:国家DMessage 4: Country D
(7)服务器中的位置分析模块根据报文的发送地点所属地理区域和接收地点所属地理区域,确定报文的第一识别结果,即:报文是否跨境传输。作为一个示例,如图11中的1107所示,上述4个报文的第一识别结果如下:(7) The location analysis module in the server determines the first identification result of the message according to the geographical area of the sending location and the receiving location of the message, namely: whether the message is transmitted across borders. As an example, as shown in 1107 in Figure 11, the first identification results of the above four messages are as follows:
报文1:国家A->国家D 跨境Message 1: Country A -> Country D cross-border
报文2:国家B->国家F 跨境Message 2: Country B -> Country F cross-border
报文3:国家C->国家D 跨境Message 3: Country C -> Country D cross-border
报文4:国家D->国家D 未跨境Message 4: Country D -> Country D has not crossed the border
(8)服务器中的加密流量破解模块确定报文对应的服务接口。作为一个示例,如图11中的1108所示,假设上述4个报文的发送地点所属地理区域如下:(8) The encrypted traffic cracking module in the server determines the service interface corresponding to the message. As an example, as shown in 1108 in FIG. 11 , it is assumed that the geographical areas where the sending locations of the above four messages belong are as follows:
报文1:服务接口AMessage 1: service interface A
报文2:服务接口BMessage 2: service interface B
报文3:服务接口CMessage 3: service interface C
报文4:服务接口DMessage 4: service interface D
(9)服务器中的加密流量破解模块从报文中解析得到待传输的目标数据。作为一个示例,如图11中的1109所示,上述4个报文中解析得到的目标数据如下:(9) The encrypted traffic cracking module in the server parses the message to obtain the target data to be transmitted. As an example, as shown in 1109 in Figure 11, the target data obtained by parsing the above four messages is as follows:
报文1:<dasdzxoiajs==>Message 1: <dasdzxoiajs==>
报文2:<8798797>Packet 2: <8798797>
报文3:<AAAaaa>Packet 3: <AAAaaa>
报文4:<ssadasdasa>Message 4: <ssadasdasa>
(10)服务器中的加密流量破解模块对目标数据进行解密处理,得到解密数据。作为 一个示例,如图11中的1110所示,上述4个报文对应的解密数据如下:(10) The encrypted traffic cracking module in the server decrypts the target data to obtain the decrypted data. As an example, as shown in 1110 in Figure 11, the decrypted data corresponding to the above four messages are as follows:
报文1:56215467812Packet 1: 56215467812
报文2:8798797Message 2: 8798797
报文3:AAAaaaPacket 3: AAAaaa
报文4:AAAaaaPacket 4: AAAaaa
(11)服务器中的用户信息匹配模块将解密数据与第一应用程序对应的用户信息进行匹配处理,确定报文的第一识别结果,即报文中是否存在用户信息。如图11中的1111所示,上述4个报文对应的第二识别结果如下:(11) The user information matching module in the server matches the decrypted data with the user information corresponding to the first application program, and determines the first identification result of the message, that is, whether there is user information in the message. As shown in 1111 in Figure 11, the second identification results corresponding to the above four messages are as follows:
报文1:56215467812 存在用户信息Packet 1: 56215467812 User information exists
报文2:8798797 不存在用户信息Message 2: 8798797 There is no user information
报文3:AAAaaa 存在用户信息Packet 3: AAAaaa has user information
报文4:AAAaaa 存在用户信息Packet 4: AAAaaa has user information
(12)服务器中的检测结果生成模块整合各报文对应的服务接口、第一识别结果和第二识别结果,如图11中的1112所示,得到:(12) The detection result generating module in the server integrates the service interface corresponding to each message, the first identification result and the second identification result, as shown in 1112 in Figure 11, obtains:
报文1:服务接口A 跨境 存在用户信息Message 1: service interface A cross-border user information exists
报文2:服务接口B 跨境 不存在用户信息Message 2: service interface B cross-border user information does not exist
报文3:服务接口C 跨境 存在用户信息Message 3: service interface C cross-border user information exists
报文4:服务接口D 未跨境 存在用户信息Message 4: Service interface D is not cross-border and has user information
(13)服务器中的检测结果生成模块根据上述整合结果,生成应用程序X对应的程序检测结果。如图11中的1112所示,程序检测结果如下:(13) The detection result generation module in the server generates a program detection result corresponding to the application program X according to the above integration result. As shown in 1112 in Figure 11, the program detection results are as follows:
服务接口A 异常(严重)Service interface A is abnormal (serious)
服务接口B 异常(轻微)Service interface B exception (minor)
服务接口C 异常(严重)Service interface C exception (critical)
服务接口D 异常(轻微)Service interface D exception (minor)
或者,程序检测结果如下:Alternatively, the program detection results are as follows:
服务接口A 异常(对用户信息跨境传输)Abnormal service interface A (cross-border transmission of user information)
服务接口B 异常(跨境传输)Service interface B exception (cross-border transmission)
服务接口C 异常(对用户信息跨境传输)Service interface C exception (cross-border transmission of user information)
服务接口D 异常(存在用户信息)Service interface D is abnormal (user information exists)
通过上述过程,得到应用程序X的程序检测结果,该程序检测结果可以在终端设备中进行显示。Through the above process, the program detection result of the application program X is obtained, and the program detection result can be displayed on the terminal device.
图12为本申请实施例提供的电子设备的一种结构示意图。该电子设备可以如上述实施例中的终端设备和服务器。如图12所示,该电子设备1200可以包括:处理器1201(例如CPU)、存储器1202和收发器1203。存储器1202和收发器1203可以耦合至处理器1201,处理器1201控制收发器1203执行上述终端设备或服务器的收发动作,以实现终端设备与服务器之间的交互。存储器1202可以包含高速随机存取存储器(random-access memory,RAM),也可以包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器1202中可以存储各种指令,以用于完成各种处理功能以及实现本申请的方 法步骤。收发器1203可以集成在电子设备的收发信机中,也可以为电子设备上独立设置的收发天线。在本申请实施例中,上述存储器1202用于存储计算机可执行程序代码,程序代码包括指令;当处理器1201执行指令时,指令使电子设备的处理器1201执行上述方法实施例中的动作,其实现原理和技术效果类似,在此不再赘述。可选的,本申请涉及的电子设备1200还可以包括:电源1204、通信总线1205以及通信端口1206。通信总线1205用于实现元件之间的通信连接。上述通信端口1206用于实现电子设备与其他外设之间的连接通信。FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may be the terminal device and the server in the foregoing embodiments. As shown in FIG. 12 , the electronic device 1200 may include: a processor 1201 (such as a CPU), a memory 1202 and a transceiver 1203 . The memory 1202 and the transceiver 1203 may be coupled to the processor 1201, and the processor 1201 controls the transceiver 1203 to perform the above-mentioned transceiving actions of the terminal device or the server, so as to realize the interaction between the terminal device and the server. The memory 1202 may include a high-speed random-access memory (random-access memory, RAM), and may also include a non-volatile memory (non-volatile memory, NVM), such as at least one disk memory, and various instructions may be stored in the memory 1202, It is used to complete various processing functions and realize the method steps of the present application. The transceiver 1203 may be integrated into the transceiver of the electronic device, or may be a transceiver antenna independently set on the electronic device. In the embodiment of the present application, the above-mentioned memory 1202 is used to store computer-executable program codes, and the program codes include instructions; when the processor 1201 executes the instructions, the instructions cause the processor 1201 of the electronic device to perform the actions in the above-mentioned method embodiments, which The implementation principles and technical effects are similar and will not be repeated here. Optionally, the electronic device 1200 involved in this application may further include: a power supply 1204 , a communication bus 1205 and a communication port 1206 . The communication bus 1205 is used to realize the communication connection between the components. The above-mentioned communication port 1206 is used to realize connection and communication between the electronic device and other peripheral devices.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. A computer can be a general purpose computer, special purpose computer, computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。The term "plurality" herein means two or more. The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations. In addition, the character "/" in this paper generally indicates that the contextual objects are an "or" relationship; in the formula, the character "/" indicates that the contextual objects are a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or imply order.
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It can be understood that the various numbers involved in the embodiments of the present application are only for convenience of description, and are not used to limit the scope of the embodiments of the present application. It can be understood that, in the embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in the implementation of this application. The implementation of the examples constitutes no limitation.

Claims (18)

  1. 一种应用程序的检测方法,其特征在于,包括:A detection method for an application program, comprising:
    在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,所述M为大于或者等于1的整数;During the running of the first application program to be detected, acquire M messages sent by the terminal device through the first application program, where M is an integer greater than or equal to 1;
    确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息;Determine an identification result of each message, where the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether there is user information in the message;
    根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。Generate a program detection result corresponding to the first application program according to the identification results of the M messages.
  2. 根据权利要求1所述的方法,其特征在于,所述方法应用于服务器;所述第一应用程序包括K个地理区域各自对应的服务接口,所述服务器中设置有每个服务接口各自对应的代理接口,所述K为大于或者等于1的整数;The method according to claim 1, wherein the method is applied to a server; the first application program includes service interfaces corresponding to K geographical areas, and the server is provided with a service interface corresponding to each service interface proxy interface, the K is an integer greater than or equal to 1;
    获取终端设备通过第一应用程序发送的M个报文,包括:Obtain M messages sent by the terminal device through the first application program, including:
    针对每个服务接口,通过所述服务接口对应的代理接口,获取所述终端设备通过所述服务接口发送的至少一个报文。For each service interface, at least one message sent by the terminal device through the service interface is acquired through the proxy interface corresponding to the service interface.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果,包括:The method according to claim 2, wherein said generating a program detection result corresponding to the first application program according to the identification results of the M messages includes:
    针对每个服务接口,根据通过所述服务接口发送的所述至少一个报文的识别结果,确定所述服务接口对应的接口检测结果;For each service interface, determine an interface detection result corresponding to the service interface according to the identification result of the at least one message sent through the service interface;
    根据所述K个服务接口对应的接口检测结果,生成所述第一应用程序对应的程序检测结果,所述第一应用程序对应的程序检测结果包括所述K个服务接口对应的接口检测结果。According to the interface detection results corresponding to the K service interfaces, the program detection results corresponding to the first application program are generated, and the program detection results corresponding to the first application program include the interface detection results corresponding to the K service interfaces.
  4. 根据权利要求3所述的方法,其特征在于,所述根据通过所述服务接口发送的所述至少一个报文的识别结果,确定所述服务接口对应的接口检测结果,包括:The method according to claim 3, wherein the determining the interface detection result corresponding to the service interface according to the identification result of the at least one message sent through the service interface includes:
    若所述至少一个报文中的每个报文的识别结果均指示所述报文的发送地点和接收地点位于同一地理区域,且所述报文中不存在用户信息,则确定所述接口检测结果指示所述服务接口不存在异常;或者,If the identification result of each message in the at least one message indicates that the sending location and the receiving location of the message are located in the same geographical area, and there is no user information in the message, then determine that the interface detection A result indicates that the service interface is free of exceptions; or,
    若所述至少一个报文中存在第一报文的识别结果指示所述报文的发送地点和接收地点不位于同一地理区域,和/或,所述报文中存在用户信息,则确定所述接口检测结果指示所述服务接口存在异常。If the identification result of the first message in the at least one message indicates that the sending location and the receiving location of the message are not located in the same geographical area, and/or, there is user information in the message, then determine the The interface detection result indicates that the service interface is abnormal.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,每个报文的识别结果包括第一识别结果,所述第一识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域;针对所述M个报文中的任意一个报文,确定所述报文的识别结果,包括:The method according to any one of claims 1 to 4, wherein the identification result of each message includes a first identification result, and the first identification result is used to indicate the sending location and receiving location of the message Whether it is located in the same geographical area; for any one of the M messages, determining the identification result of the message, including:
    确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域;determining the geographical area to which the sending location of the message belongs, and the geographical area to which the receiving location of the message belongs;
    若所述发送地点所属地理区域与所述接收地点所属地理区域相同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点位于同一地理区域;If the geographic area to which the sending location belongs is the same as the geographic area to which the receiving location belongs, then determining that the first identification result of the message indicates that the sending location and the receiving location of the message are located in the same geographic area;
    若所述发送地点所属地理区域与所述接收地点所属地理区域不同,则确定所述报文的第一识别结果指示所述报文的发送地点和接收地点不位于同一地理区域。If the geographic area to which the sending location belongs is different from the geographic area to which the receiving location belongs, it is determined that the first identification result of the message indicates that the sending location and the receiving location of the message are not located in the same geographic area.
  6. 根据权利要求5所述的方法,其特征在于,所述第一应用程序包括K个地理区域各自对应的服务接口,所述K为大于或者等于1的整数;确定所述报文的发送地点所属地理区域,以及所述报文的接收地点所属地理区域,包括:The method according to claim 5, wherein the first application program includes service interfaces corresponding to K geographical areas, and K is an integer greater than or equal to 1; determine the location to which the message is sent. Geographical area, and the geographical area to which the receiving location of the message belongs, including:
    从所述K个服务接口中,确定发送所述报文的第一服务接口;From the K service interfaces, determine the first service interface for sending the message;
    将所述第一服务接口对应的地理区域作为所述报文的发送地点所属地理区域;Taking the geographical area corresponding to the first service interface as the geographical area to which the sending location of the message belongs;
    对所述报文进行解析处理,得到所述报文的接收地点所属地理区域。Analyzing and processing the message to obtain the geographical area to which the receiving location of the message belongs.
  7. 根据权利要求6所述的方法,其特征在于,对所述报文进行解析处理,得到所述报文的接收地点所属地理区域,包括:The method according to claim 6, characterized in that, parsing and processing the message to obtain the geographical area to which the receiving location of the message belongs includes:
    从所述报文中解析得到所述报文的接收地点对应的网际互联协议IP地址;Analyzing from the message to obtain the Internet Protocol IP address corresponding to the receiving location of the message;
    获取预设对应关系,所述预设对应关系指示不同IP地址与不同地理区域之间的对应关系;Acquiring a preset corresponding relationship, the preset corresponding relationship indicating the corresponding relationship between different IP addresses and different geographical regions;
    将所述预设对应关系中与所述IP地址对应的地理区域,确定为所述报文的接收地点所属地理区域。Determining the geographical area corresponding to the IP address in the preset correspondence relationship as the geographical area to which the receiving location of the message belongs.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,每个报文的识别结果包括第二识别结果,所述第二识别结果用于指示所述报文中是否存在用户信息;针对所述M个报文中的任意一个报文,确定所述报文的识别结果,包括:The method according to any one of claims 1 to 7, wherein the identification result of each message includes a second identification result, and the second identification result is used to indicate whether there is user information in the message; For any one of the M messages, determining the identification result of the message includes:
    从所述报文中解析得到待传输的目标数据;Analyzing the message to obtain the target data to be transmitted;
    对所述目标数据进行解密处理,得到解密数据;Decrypting the target data to obtain decrypted data;
    将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果。Matching the decrypted data with the user information corresponding to the first application program to obtain a second identification result of the message.
  9. 根据权利要求8所述的方法,其特征在于,所述第一应用程序对应的用户信息包括至少一个信息项;将所述解密数据与所述第一应用程序对应的用户信息进行匹配处理,得到所述报文的第二识别结果,包括:The method according to claim 8, wherein the user information corresponding to the first application program includes at least one information item; matching the decrypted data with the user information corresponding to the first application program to obtain The second identification result of the message includes:
    分别将每个信息项与所述解密数据进行匹配处理,得到每个信息项的匹配结果;performing matching processing on each information item and the decrypted data respectively, to obtain a matching result of each information item;
    若所述至少一个信息项中存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中存在用户信息;If the matching result of the information item in the at least one information item is successful, then determine that the second identification result of the message indicates that user information exists in the message;
    若所述至少一个信息项中不存在信息项的匹配结果为成功,则确定所述报文的第二识别结果指示所述报文中不存在用户信息。If the matching result of no information item in the at least one information item is successful, it is determined that the second identification result of the message indicates that there is no user information in the message.
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述获取终端设备通过第一应用程序发送的M个报文之前,还包括:The method according to any one of claims 1 to 9, wherein before acquiring the M messages sent by the terminal device through the first application program, further comprising:
    向所述终端设备发送控制指令,所述控制指令用于控制所述第一应用程序启动运行。Sending a control instruction to the terminal device, where the control instruction is used to control the first application program to start and run.
  11. 根据权利要求10所述的方法,其特征在于,所述向所述终端设备发送控制指令,包括:The method according to claim 10, wherein the sending a control instruction to the terminal device comprises:
    接收所述终端设备发送的目标信息,所述目标信息包括所述第一应用程序启动运行所需的资源信息;receiving target information sent by the terminal device, where the target information includes resource information required for starting and running the first application program;
    根据所述目标信息,向所述终端设备发送所述控制指令。Send the control instruction to the terminal device according to the target information.
  12. 根据权利要求1至11任一项所述的方法,其特征在于,所述根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果之后,还包括:The method according to any one of claims 1 to 11, characterized in that, after generating the program detection result corresponding to the first application program according to the identification results of the M messages, further comprising:
    显示所述程序检测结果;或者,display the program test results; or,
    发送所述程序检测结果。Send the program detection result.
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述地理区域为国家对应的区域。The method according to any one of claims 1 to 12, wherein the geographical area is an area corresponding to a country.
  14. 一种应用程序的检测装置,其特征在于,包括:A detection device for an application program, characterized in that it comprises:
    获取单元,用于在待检测的第一应用程序运行过程中,获取终端设备通过所述第一应用程序发送的M个报文,所述M为大于或者等于1的整数;An acquisition unit, configured to acquire M messages sent by the terminal device through the first application program during the running of the first application program to be detected, where M is an integer greater than or equal to 1;
    确定单元,用于确定每个报文的识别结果,每个报文的识别结果用于指示所述报文的发送地点和接收地点是否位于同一地理区域,和/或,所述报文中是否存在用户信息;A determining unit, configured to determine an identification result of each message, where the identification result of each message is used to indicate whether the sending location and the receiving location of the message are located in the same geographical area, and/or, whether User information exists;
    生成单元,用于根据所述M个报文的识别结果,生成所述第一应用程序对应的程序检测结果。A generating unit, configured to generate a program detection result corresponding to the first application program according to the identification results of the M messages.
  15. 一种电子设备,其特征在于,包括:存储器和处理器;所述处理器用于与所述存储器耦合,读取并执行所述存储器中的指令,以实现权利要求1至13任一项所述的方法。An electronic device, characterized in that it comprises: a memory and a processor; the processor is used to be coupled with the memory, read and execute instructions in the memory, so as to realize any one of claims 1 to 13 Methods.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令被执行时,实现权利要求1至13任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the method according to any one of claims 1 to 13 is implemented.
  17. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,所述计算机程序被执行时,实现权利要求1至13任一项所述的方法。A computer program product, characterized in that the computer program product includes a computer program, and when the computer program is executed, the method according to any one of claims 1 to 13 is realized.
  18. 一种程序产品,其特征在于,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,通信装置的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得通信装置实施如权利要求1-13任意一项所述的方法。A program product, characterized in that the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of a communication device can read the computer program from the readable storage medium , the at least one processor executes the computer program so that the communication device implements the method according to any one of claims 1-13.
PCT/CN2022/111956 2021-08-24 2022-08-12 Detection method and apparatus for application program, and device WO2023024928A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110977670.9A CN115720144A (en) 2021-08-24 2021-08-24 Application program detection method, device and equipment
CN202110977670.9 2021-08-24

Publications (1)

Publication Number Publication Date
WO2023024928A1 true WO2023024928A1 (en) 2023-03-02

Family

ID=85253491

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/111956 WO2023024928A1 (en) 2021-08-24 2022-08-12 Detection method and apparatus for application program, and device

Country Status (2)

Country Link
CN (1) CN115720144A (en)
WO (1) WO2023024928A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535865A (en) * 2019-08-30 2019-12-03 北京小米移动软件有限公司 Information processing method, device, test terminal, test platform and storage medium
CN110633112A (en) * 2019-08-30 2019-12-31 北京小米移动软件有限公司 Information processing method and device, equipment and storage medium
US20200202316A1 (en) * 2018-12-20 2020-06-25 Mastercard International Incorporated Methods and systems for reducing cross-border traffic over a network
CN112101954A (en) * 2020-09-29 2020-12-18 支付宝(杭州)信息技术有限公司 Cross-border service processing method and device based on private data and equipment information
CN112423297A (en) * 2020-11-16 2021-02-26 重庆满集网络科技有限公司 Cross-border e-commerce and mobile terminal interaction method, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200202316A1 (en) * 2018-12-20 2020-06-25 Mastercard International Incorporated Methods and systems for reducing cross-border traffic over a network
CN110535865A (en) * 2019-08-30 2019-12-03 北京小米移动软件有限公司 Information processing method, device, test terminal, test platform and storage medium
CN110633112A (en) * 2019-08-30 2019-12-31 北京小米移动软件有限公司 Information processing method and device, equipment and storage medium
CN112101954A (en) * 2020-09-29 2020-12-18 支付宝(杭州)信息技术有限公司 Cross-border service processing method and device based on private data and equipment information
CN112423297A (en) * 2020-11-16 2021-02-26 重庆满集网络科技有限公司 Cross-border e-commerce and mobile terminal interaction method, system and storage medium

Also Published As

Publication number Publication date
CN115720144A (en) 2023-02-28

Similar Documents

Publication Publication Date Title
US11520912B2 (en) Methods, media, apparatuses and computing devices of user data authorization based on blockchain
CN106936793B (en) Information interception processing method and terminal
Jung et al. Privacy oracle: a system for finding application leaks with black box differential testing
US9268946B2 (en) Quantifying the risks of applications for mobile devices
US11244074B2 (en) Security systems and methods for social networking
US20160036849A1 (en) Method, Apparatus and System for Detecting and Disabling Computer Disruptive Technologies
US9280665B2 (en) Fast and accurate identification of message-based API calls in application binaries
KR102504075B1 (en) Matching and attributes of user device events
US11677774B2 (en) Interactive web application scanning
US20160078221A1 (en) Automated vulnerability and error scanner for mobile applications
GB2507960A (en) Wireless access point login dependent upon supply of stored (key/personal) information and/or viewing a message (advertisement)
US10754717B2 (en) Fast and accurate identification of message-based API calls in application binaries
CN109635581A (en) A kind of data processing method, equipment, system and storage medium
WO2013074245A1 (en) Security systems and methods for encoding and decoding digital content
US20220207636A1 (en) Methods and apparatus for managing and online transactions involving personal data
US20190050910A1 (en) System, devices and methods for identifying mobile devices and other computer devices
WO2023024928A1 (en) Detection method and apparatus for application program, and device
CN111666567A (en) Detection method, device, computer program and medium for malicious modification of application program
WO2022247226A1 (en) Applet monitoring method and device
Pourali et al. Hidden in plain sight: exploring encrypted channels in android apps
US10178512B2 (en) Information broadcast
CN108055286B (en) Method, client, computer-readable storage medium and computer device for generating user identity information
CN117240618B (en) Household cloud box access method, device, equipment and storage medium
CN111181831A (en) Communication data processing method and device, storage medium and electronic device
US20230124545A1 (en) Verifying content and interactions within webviews

Legal Events

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

Ref document number: 22860274

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE