Method, device, apparatus and computer-readable storage medium for discovering third-party SDK
The method captures network requests in real time and uses a database to identify third-party SDKs in iOS applications, addressing implementation challenges and enhancing stability and security monitoring.
Patent Information
- Application Number
- CN202211115118.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-09-13
AI Technical Summary
Existing methods for discovering third-party SDKs in iOS applications are difficult to implement and lack stability due to the challenges of decompiling iOS applications and the instability of SDK package names.
A method that captures network requests in real time, determines network data including destination and source addresses, and uses a preset address list and associated database to identify third-party SDKs by parsing network data packets and querying against a pre-collected database.
Enables reliable and efficient discovery of third-party SDKs in iOS applications by capturing network data in real time and utilizing a database to match and identify SDKs, improving user experience and security monitoring.
Smart Images

Figure CN115460274B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of discovering third-party SDKs, and in particular to a method, apparatus, device and computer-readable storage medium for discovering third-party SDKs. Background Art
[0002] With the continuous development of the iOS platform, the functional modules provided by iOS applications are becoming more and more abundant, and the number of third-party SDKs referenced in various iOS applications is also increasing. However, as the scale of SDK references continues to grow, the risks such as privacy compliance and application security brought by third-party SDK references to the application itself are becoming more and more serious. Therefore, it is necessary to implement a discovery method for iOS applications to reference third-party SDKs, so as to uniformly monitor and manage the application's reference to third-party SDKs.
[0003] The current mainstream third-party SDK discovery method is mainly for Android applications. It decompiles the application package, and then searches for the third-party SDK package name in the decompiled application resources or code files to discover the application's reference to the third-party SDK. Due to the difficulty of decompiling iOS applications, this method is difficult to use to discover third-party SDKs referenced by iOS applications. Developers can modify and rename the SDK package name, but the corresponding relationship between the package name and the third-party SDK is not stable enough. After the SDK package name is modified, the corresponding SDK reference behavior cannot be discovered.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide a method, device, equipment and computer-readable storage medium for discovering third-party SDKs, aiming to solve the technical problems that the existing methods for discovering third-party SDK behaviors are difficult to implement on the iOS platform and the existing methods for discovering third-party SDKs are insufficient in stability.
[0006] To achieve the above object, the present invention provides a method for discovering a third-party SDK, which is applied to a user terminal. The method for discovering a third-party SDK comprises the following steps:
[0007] Capture network requests of running applications in real time;
[0008] Determine network data according to the network request, wherein the network data includes a destination address and a source address, and store the destination address and the source address in a preset address list;
[0009] When a query SDK request is received, the third-party SDK data corresponding to the application is determined according to the address list and a preset associated database.
[0010] Furthermore, the step of determining network data according to the network request includes:
[0011] A network data packet corresponding to the network request is determined, and the network data packet is parsed to obtain a destination address and a source address in the network data packet.
[0012] Furthermore, the step of determining the third-party SDK data corresponding to the application according to the user address, the address list and the preset association database further includes:
[0013] Determine each target network data in the address list;
[0014] The third-party SDK data is determined according to the target network data and a preset associated database.
[0015] Furthermore, the step of determining the third-party SDK data according to the target network data and a preset associated database includes:
[0016] Determine each associated destination address in the associated database and third-party SDK data corresponding to the associated destination address;
[0017] According to the target destination address in the target network data, determining in the association database a target association address whose association destination address matches the target destination address;
[0018] According to the target associated address, third-party SDK data corresponding to the target associated address is determined in the associated database.
[0019] Furthermore, the step of capturing the network request of the running application in real time includes:
[0020] The application data corresponding to the application is obtained, and the application data and the user address of the user terminal are associated and stored in a database.
[0021] Furthermore, after the step of determining the third-party SDK data corresponding to the application according to the address list and the preset associated database, the following steps are included:
[0022] A third-party SDK data table is determined according to the database, the source address and the third-party SDK data.
[0023] Further, the step of determining the third-party SDK data table according to the database and the target SDK data includes:
[0024] Determine in the database a target user address whose source address matches the user address, and determine target application data associated with the target user address;
[0025] Generate an SDK data table according to the target SDK data and the target application data.
[0026] In addition, to achieve the above-mentioned purpose, the present invention further provides a third-party SDK discovery device, the third-party SDK discovery device comprising:
[0027] Capture module, used to capture network requests of running applications in real time;
[0028] A storage module, configured to determine network data according to the network request, wherein the network data includes a destination address and a source address, and store the destination address and the source address in a preset address list;
[0029] The query module is used to determine the third-party SDK data corresponding to the application according to the address list and a preset associated database when a query SDK request is received.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a third-party SDK discovery device, which includes: a memory, a processor, and a third-party SDK discovery program stored in the memory and executable on the processor, and the third-party SDK discovery program implements the steps of the aforementioned third-party SDK discovery method when executed by the processor.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a third-party SDK discovery program is stored, and when the third-party SDK discovery program is executed by a processor, the steps of the aforementioned third-party SDK discovery method are implemented.
[0032] The present invention captures the network request of the running application in real time, and then determines the network data according to the network request, wherein the network data includes the destination address and the source address, and stores the destination address and the source address in a preset address list, and then when receiving a query SDK request, determines the third-party SDK data corresponding to the application according to the address list and a preset relational database. The present invention can determine the network data according to the network request, and then obtain the network data from the address list based on the received query SDK request, and obtain the third-party SDK data corresponding to the application through a preset relational database, so as to discover the behavior of the application referencing the third-party SDK. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1It is a structural diagram of discovering a third-party SDK device in a hardware operating environment involved in an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a flow chart of a first embodiment of a method for discovering a third-party SDK according to the present invention;
[0035] Figure 3 It is a functional module diagram of an embodiment of a third-party SDK device discovered by the present invention.
[0036] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0037] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0038] like Figure 1 As shown, Figure 1 It is a structural diagram of discovering a third-party SDK device in a hardware operating environment involved in an embodiment of the present invention.
[0039] The embodiment of the present invention finds that the third-party SDK device can be a PC, or it can be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a portable computer, and other portable terminal devices with display functions.
[0040] like Figure 1 As shown, the third-party SDK device discovered may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0041] Optionally, the third-party SDK device may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the third-party SDK device is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the application of the third-party SDK device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the third-party SDK device may also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.
[0042] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0043] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a third-party SDK program.
[0044] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the third-party SDK program stored in the memory 1005.
[0045] In this embodiment, the third-party SDK discovery device includes: a memory 1005, a processor 1001, and a third-party SDK discovery program stored on the memory 1005 and executable on the processor 1001, wherein the processor 1001 calls the third-party SDK discovery program stored in the memory 1005 and executes the steps of the third-party SDK discovery method in each of the following embodiments.
[0046] The present invention also provides a method for discovering a third-party SDK, which is applied to a user terminal, referring to Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the method of the present invention.
[0047] In this embodiment, the method for discovering a third-party SDK includes the following steps:
[0048] Step S101, capturing network requests of running applications in real time;
[0049] In this embodiment, a network packet capture environment is first configured for each user terminal, and then the network request of the application running in the user terminal is captured in real time, wherein the application is an application actively selected by the user to run in the user terminal, and the network request of the application is captured in real time to obtain the network request of the running application.
[0050] Step S102, determining network data according to the network request, wherein the network data includes a destination address and a source address, and storing the destination address and the source address in a preset address list;
[0051] In this embodiment, according to each captured network request, the network request data packet corresponding to the network request is parsed to obtain the network data in the network request data packet, and the network data includes a destination address and a source address. Then, the obtained destination address and source address are associated and stored in a preset address list, wherein the address list refers to a list composed of various network data.
[0052] Furthermore, in one embodiment, step S102 includes:
[0053] Step a, determining a network data packet corresponding to the network request, and parsing the network data packet to obtain a destination address and a source address in the network data packet.
[0054] In this embodiment, according to each captured network request, the network request data packet corresponding to the network request is parsed to obtain the network data in the network request data packet, wherein the network data includes a destination address and a source address, and the destination address refers to the address corresponding to the network request. The source address refers to the network request corresponding to the source address, and the user address of the user terminal sending the above network request.
[0055] Step S103, when a query SDK request is received, the third-party SDK data corresponding to the application is determined according to the address list and a preset association database.
[0056] In this embodiment, the target network data refers to the network data stored in the address list. When a query SDK request is received, each target network data is determined in the address list. The target network data includes a target source address and a target destination address. A query is made in a preset associated database as to whether there is third-party SDK data corresponding to the target destination address. If there is third-party SDK data corresponding to the target destination address, the third-party SDK data corresponding to the application is determined.
[0057] It should be noted that the associated database is data collected in advance by humans, and based on the above data, the destination address is associated with the third-party SDK data.
[0058] Furthermore, in one embodiment, step S103 includes:
[0059] Step b, determining each target network data in the address list;
[0060] Step c: determining the third-party SDK data according to the target network data and a preset associated database.
[0061] In this embodiment, all network data in the address list are first determined, and the above network data is used as the target network data. Then, based on the target destination address in the target network data, it is determined in the associated database whether there is a destination address that matches the target destination address. If it is determined in the associated database that there is an associated destination address that matches the target destination address, while obtaining the associated destination address, the third-party SDK data corresponding to the associated destination address is found in the database based on the associated destination address. It should be noted that the third-party SDK data may include the version number and the name of the third-party SDK.
[0062] Furthermore, in one embodiment, step c comprises:
[0063] Step c1, determining each associated destination address in the associated database and the third-party SDK data corresponding to the associated destination address;
[0064] Step c2, determining, in an association database, a target association address whose association destination address matches the target destination address according to the target destination address in the target network data;
[0065] Step c3: determining, according to the target associated address, third-party SDK data corresponding to the target associated address in the associated database.
[0066] In this embodiment, each associated destination address in the associated database is first determined, wherein the associated destination address can be used to query the third-party SDK data corresponding to the associated destination address in the database, thereby determining the third-party SDK data corresponding to the associated destination address. Then, based on the target destination address in the target network data, it is queried in the database whether there is a target associated address matching the target destination address. If the target associated address exists, the third-party SDK data corresponding to the target associated address is determined in the database based on the target associated address, so as to complete the discovery of the application's reference to the third-party SDK behavior.
[0067] The method for discovering a third-party SDK proposed in this embodiment captures the network request of a running application in real time, and then determines the network data based on the network request, wherein the network data includes a destination address and a source address, and stores the destination address and the source address in a preset address list. Then, when a query SDK request is received, the third-party SDK data corresponding to the application is determined based on the address list and a preset associated database. The network data can be determined based on the network request, and then based on the received query SDK request, the network data is obtained from the address list, and the third-party SDK data corresponding to the application is obtained through a preset relational database, so as to discover the behavior of the application referencing the third-party SDK.
[0068] Based on the first embodiment, a second embodiment of the method for discovering a third-party SDK of the present invention is proposed. In this embodiment, before step S101, the following steps are included:
[0069] Step S201, obtaining application data corresponding to an application, and storing the application data and a user address of the user terminal in a database in association with each other.
[0070] In this embodiment, the application data corresponding to the application uploaded by the user can be obtained, and the application data can be the application name and the version number of the application, and the application data and the user address of the user terminal can be associated and stored in the database. Specifically, for example, the application data is the name A of the map app, and the user address corresponding to the user terminal is 124.95.40.31. 124.95.40.31 is associated with the name A, and the name A associated with the user address can be found by querying the user address 124.95.40.31, and then the associated data of associating 124.95.40.31 with the name A is stored, and the associated data is stored in the database for subsequent use.
[0071] The method for discovering a third-party SDK proposed in this embodiment obtains application data corresponding to the application and stores the application data and the user address of the user terminal in a database in association with each other. It can pre-upload the application data of the application and store the application data and the user address of the user terminal in a database in association with each other. Then, when a query SDK request is received, after determining the third-party SDK data corresponding to the application based on the address list and the preset associated database, the application data corresponding to the third-party SDK data can be determined by obtaining the application data and the user address stored in the database, so as to facilitate user viewing, thereby improving the user experience.
[0072] Based on the second embodiment, a third embodiment of the method for discovering a third-party SDK of the present invention is proposed. In this embodiment, the following steps are included after step S103:
[0073] Step 301, determining a third-party SDK data table according to the database, the source address and the third-party SDK data.
[0074] In this embodiment, the third-party SDK data table is determined based on the user address pre-stored in the database and the application data corresponding to the user address, the source address of the network data packet, and the third-party SDK data, wherein the third-party SKD data table is a table including various third-party SDK data, and the purpose is to provide a visual table for users to view.
[0075] Furthermore, in one embodiment, step 301 includes:
[0076] Step d, determining in the database a target user address whose source address matches the user address, and determining target application data associated with the target user address;
[0077] Step e: generating an SDK data table according to the target SDK data and the target application data.
[0078] In this embodiment, first, whether there is a target user address whose source address matches the user address in the database. If there is a target user address whose source address matches the user address in the database, the target application data associated with the target user address is queried in the database to obtain the target application data. Then, an SDK data table is generated based on the target SDK data and the target application data, wherein the SDK data table includes the target application data and each target SDK data.
[0079] The method for discovering a third-party SDK proposed in this embodiment determines the third-party SDK data table based on the database, the source address and the third-party SDK data. It can determine the target user address in the database where the source address matches the user address, determine the target application data associated with the target user address, and generate an SDK data table based on the target SDK data and the target application data, so as to provide the SDK data table for the user to view, thereby facilitating the user and improving the user experience.
[0080] The present invention also provides a third-party SDK device, referring to Figure 3 , the discovery of a third-party SDK device includes:
[0081] The capture module 10 is used to capture the network requests of the running application in real time;
[0082] The storage module 20 is used to determine network data according to the network request, wherein the network data includes a destination address and a source address, and store the destination address and the source address in a preset address list;
[0083] The query module 30 is used to determine the third-party SDK data corresponding to the application according to the address list and a preset association database when receiving a query SDK request.
[0084] Furthermore, the storage module 20 is used to:
[0085] A network data packet corresponding to the network request is determined, and the network data packet is parsed to obtain a destination address and a source address in the network data packet.
[0086] Furthermore, the query module 30 is used to:
[0087] Determine each target network data in the address list;
[0088] The third-party SDK data is determined according to the target network data and a preset associated database.
[0089] Furthermore, the query module 30 is used to:
[0090] Determine each associated destination address in the associated database and third-party SDK data corresponding to the associated destination address;
[0091] According to the target destination address in the target network data, determining in the association database a target association address whose association destination address matches the target destination address;
[0092] According to the target associated address, third-party SDK data corresponding to the target associated address is determined in the associated database.
[0093] Furthermore, it was found that the third-party SDK device was also used for:
[0094] The application data corresponding to the application is obtained, and the application data and the user address of the user terminal are associated and stored in a database.
[0095] Furthermore, it was found that the third-party SDK device was also used for:
[0096] A third-party SDK data table is determined according to the database, the source address and the third-party SDK data.
[0097] Furthermore, it was found that the third-party SDK device was also used for:
[0098] Determine in the database a target user address whose source address matches the user address, and determine target application data associated with the target user address;
[0099] Generate an SDK data table according to the target SDK data and the target application data.
[0100] The methods executed by the above-mentioned program units can refer to the various embodiments of the method for discovering a third-party SDK of the present invention, which will not be described in detail here.
[0101] In addition, an embodiment of the present invention also proposes a third-party SDK discovery device, which includes: a memory, a processor, and a third-party SDK discovery program stored in the memory and executable on the processor, and the third-party SDK discovery program, when executed by the processor, implements the steps of the third-party SDK discovery method as described above.
[0102] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a third-party SDK discovery program is stored. When the third-party SDK discovery program is executed by a processor, the steps of the third-party SDK discovery method described above are implemented.
[0103] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0104] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for discovering a third-party SDK, characterized in that: Applied to a user terminal, the method for discovering a third-party SDK includes the following steps: Capture network requests of running applications in real time; Determine network data according to the network request, wherein the network data includes a destination address and a source address, and store the destination address and the source address in a preset address list, wherein the source address refers to a user address of a user terminal sending the network request; When receiving a query SDK request, determining the third-party SDK data corresponding to the application according to the address list and a preset association database; Wherein, the step of determining the third-party SDK data corresponding to the application according to the address list and the preset association database further includes: Determine each target network data in the address list, wherein the target network data includes a target source address and a target destination address; Determining the third-party SDK data according to the target network data and a preset associated database; The step of determining the third-party SDK data according to the target network data and a preset associated database includes: Determine each associated destination address in the associated database and third-party SDK data corresponding to the associated destination address; According to the target destination address in the target network data, determining in the association database a target association address whose association destination address matches the target destination address; According to the target associated address, third-party SDK data corresponding to the target associated address is determined in the associated database.
2. The method for discovering a third-party SDK according to claim 1, wherein: The step of determining network data according to the network request comprises: A network data packet corresponding to the network request is determined, and the network data packet is parsed to obtain a destination address and a source address in the network data packet.
3. The method for discovering a third-party SDK according to claim 1, wherein: The step of capturing the network request of the running application in real time previously includes: The application data corresponding to the application is obtained, and the application data and the user address of the user terminal are associated and stored in a database.
4. The method for discovering a third-party SDK according to claim 3, wherein: The step of determining the third-party SDK data corresponding to the application according to the address list and the preset association database includes: A third-party SDK data table is determined according to the database, the source address and the third-party SDK data.
5. The method for discovering a third-party SDK according to claim 4, wherein: The step of determining the third-party SDK data table according to the database and the target SDK data includes: Determine in the database a target user address whose source address matches the user address, and determine target application data associated with the target user address; Generate an SDK data table according to the target SDK data and the target application data.
6. A method for discovering a third-party SDK device, characterized in that: The discovery of a third-party SDK device includes: Capture module, used to capture network requests of running applications in real time; A storage module, configured to determine network data according to the network request, wherein the network data includes a destination address and a source address, and store the destination address and the source address in a preset address list, wherein the source address refers to a user address of a user terminal sending the network request; A query module, configured to determine the third-party SDK data corresponding to the application according to the address list and a preset associated database when a query SDK request is received; Wherein, the query module is also used for: Determine each target network data in the address list, wherein the target network data includes a target source address and a target destination address; Determining the third-party SDK data according to the target network data and a preset associated database; The step of determining the third-party SDK data according to the target network data and a preset associated database includes: Determine each associated destination address in the associated database and third-party SDK data corresponding to the associated destination address; According to the target destination address in the target network data, determining in the association database a target association address whose association destination address matches the target destination address; According to the target associated address, third-party SDK data corresponding to the target associated address is determined in the associated database.
7. A method for discovering a third-party SDK device, characterized in that: The third-party SDK discovery device includes: a memory, a processor, and a third-party SDK discovery program stored in the memory and executable on the processor. When the third-party SDK discovery program is executed by the processor, the steps of the third-party SDK discovery method as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a third-party SDK discovery program, which, when executed by a processor, implements the steps of the third-party SDK discovery method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Network testing method and device
CA3129986A1
Flow attack defense method, preset list generation method and apparatus, and cleaning device
CN107306255A
Software development and distribution platform
CN107924305A
Network data monitoring method and device based on third-party SDK and storage medium
CN110113325A
Method and system for discovering that Android application introduces third-party tool, and storage medium
CN111124486A
