Application program operation control method and device, storage medium and computer equipment

By using digital certificates and signature information in the root directory of the application's installation package for the first layer of verification, and using hash values ​​for the second layer of verification in the Java layer file, the problem that the application is easily cracked is solved. Ensures the security of the application and the protection of user data.

CN118940254APending Publication Date: 2024-11-12CHENGDU MEGAYOU TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410951229.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing applications are easily cracked, resulting in the inability to protect developers' rights and user data security to be threatened. The existing reinforcement obfuscation methods cannot prevent the continued use of cracked applications.

Method used

Ensure the security of the application by using digital certificates and signature information in the root directory of the application's installation package to perform the first layer verification and using hash values ​​in the Java layer file to perform the second layer verification, ensuring the security of the application only in two The main process will be started after all passes.

Benefits of technology

Effectively prevent the application from continuing to run after being tampered with, protect the rights and interests of developers and user data security, and ensure the integrity and security of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940254A_ABST
    Figure CN118940254A_ABST
Patent Text Reader

Abstract

The invention discloses an application program operation control method and device, a storage medium and computer equipment, and the method comprises the steps: searching a target folder from a root directory of an application program installation package when detecting that a host process of an application program is started, searching a target object and a hash value storage file from a java layer file of the application program installation package; searching a first certificate file from a target folder, identifying a first digital certificate and first signature information from the first certificate file, and verifying the first signature information through a first public key in the first digital certificate to obtain a first verification result; calculating a first hash value of the target object through a target hash algorithm, and verifying the first hash value through a second hash value stored in a hash value storage file to obtain a second verification result; and when both the first verification result and the second verification result indicate that the security verification is passed, continuing to start the host process of the application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for controlling the operation of an application program, a storage medium, and a computer device. Background Art

[0002] An application (App, English full name: Application) refers to a computer program that can complete one or more specific tasks. Applications play a very important role in today's society and greatly enrich people's daily lives, such as game applications, shopping applications, reading applications, etc.

[0003] There are many fake and cracked applications on the market, which will result in the legal rights of developers not being protected, and will also infringe on the data security of users and even leak their personal privacy. When developing applications, developers usually reinforce and confuse the code to prevent the application from being cracked, making it more difficult to crack the application. However, this method cannot prevent the cracked application from being used again after it is cracked. Summary of the invention

[0004] In view of this, the present application provides an application operation control method and device, storage medium, and computer equipment. The first digital certificate and first signature information in the root directory of the application installation package are used to perform a first-level verification on the integrity and security of all or part of the application's files. The hash value storage file in the java layer file is used to perform a second-level verification on the integrity and security of the specified files of the java layer of the application. After the main process of the application is started, the security of the application is first verified from two aspects, and the application is run only after the verification is passed. This can prevent the application from running normally after being tampered with, thereby protecting the rights and interests of application developers and the data security of users.

[0005] According to one aspect of the present application, a method for controlling the operation of an application is provided, comprising:

[0006] When it is detected that the main process of the application is started, searching for a target folder from the root directory of the application installation package, and searching for a target object and a hash value storage file from a Java layer file of the application installation package, wherein the target object includes a target file and / or a target code segment;

[0007] Searching for a first certificate file in the target folder, identifying a first digital certificate and first signature information from the first certificate file, and verifying the first signature information using a first public key in the first digital certificate to obtain a first verification result;

[0008] Calculate a first hash value of the target object by using a target hash algorithm, and verify the first hash value by using a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated by using the target hash algorithm when constructing the target object;

[0009] When both the first verification result and the second verification result indicate that the security verification has passed, the main process of the application program continues to be started.

[0010] According to another aspect of the present application, there is provided an application program operation control device, comprising:

[0011] A detection module, configured to search for a target folder from a root directory of an application installation package and search for a target object and a hash value storage file from a Java layer file of the application installation package when detecting that the main process of the application is started, wherein the target object includes a target file and / or a target code segment;

[0012] A first verification module is used to search for a first certificate file in the target folder, identify a first digital certificate and first signature information from the first certificate file, and verify the first signature information using a first public key in the first digital certificate to obtain a first verification result;

[0013] A second verification module is used to calculate a first hash value of the target object by using a target hash algorithm, and verify the first hash value by using a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated by using the target hash algorithm when constructing the target object;

[0014] A startup module is used to continue starting the main process of the application when both the first verification result and the second verification result indicate that the security verification has been passed.

[0015] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the operation control method of the above-mentioned application program is implemented.

[0016] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the operation control method of the above-mentioned application program when executing the program.

[0017] By means of the above technical scheme, the present application provides a method and device for controlling the operation of an application, a storage medium, and a computer device. When it is detected that the main process of the application is started, the target folder can be found from the root directory of the installation package of the application. At the same time, the target object and the hash value storage file can also be found from the java layer file of the application installation package. After finding the target folder, the first certificate file can be further found from the target folder, the first digital certificate and the first signature information can be identified from the first certificate file, and the first public key can be extracted from the first digital certificate. After that, the corresponding part of the application can be hashed using the same hash algorithm as the first signature information to obtain a new hash value. The first signature information is decrypted using the first public key to obtain the original hash value. Then, the newly calculated hash value is compared with the original hash value obtained by decryption to obtain a first verification result. In addition, the target hash algorithm can be used to calculate the current hash value of the target object, which is called the first hash value. After the first hash value is calculated, it is compared with the second hash value in the hash value storage file to obtain a second verification result. If both the first verification result and the second verification result indicate that the security verification has passed, it means that there is no abnormality in the signature information of the application and the first hash value under the Java layer. At this time, the main process of the application can continue to be started to control the normal operation of the application. The embodiment of the present application performs a first-level verification of the integrity and security of all or part of the files of the application through the first digital certificate and the first signature information in the root directory of the application installation package, and performs a second-level verification of the integrity and security of the specified files of the Java layer of the application through the hash value storage file in the Java layer file. After the main process of the application is started, the security of the application is first verified from two aspects, and the application is run only after the verification passes, which can prevent the application from running normally after being tampered with, thereby protecting the rights and interests of application developers and the data security of users.

[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1A schematic diagram of a process flow of a method for controlling the operation of an application program provided in an embodiment of the present application is shown;

[0021] Figure 2 A schematic diagram of the structure of an application program operation control device provided in an embodiment of the present application is shown;

[0022] Figure 3 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0024] In this embodiment, a method for controlling the operation of an application is provided, such as Figure 1 As shown, the method includes:

[0025] Step 101, when it is detected that the main process of the application is started, the target folder is searched from the root directory of the application installation package, and the target object and hash value storage file are searched from the Java layer file of the application installation package, wherein the target object includes the target file and / or the target code segment.

[0026] The embodiment of the present application provides a method for controlling the operation of an application. When the application is started, it can automatically detect whether it has been cracked. Only after checking that it has not been cracked can it run normally. After the user downloads and installs the application, he can start the application first when he wants to use it. When the application is started, the main process is often started first, and then the remaining processes are dynamically started. When the application is installed and started, the application itself can detect its operation. When it is detected that the main process of the application is started, the target folder can be found from the root directory of the installation package of the application. Here, the target folder can be a folder containing a first certificate file. The first certificate file contains the digital certificate and signature information corresponding to all or part of the files under the application installation package, which is called the first digital certificate and the first signature information. At the same time, the target object and the hash value storage file can also be found from the java layer file of the application installation package. Here, the Java layer file refers to the bytecode file compiled from the Java source code. The target object can be a target file or a target code segment. When the target object is a target file, such as a resource file, library file or other binary file, the hash value storage file stores the hash value corresponding to the target file; when the target object is a target code segment, such as a specific Java code or a part of a DEX file, the hash value storage file stores the hash value corresponding to the target code segment.

[0027] Step 102, searching for a first certificate file from the target folder, identifying a first digital certificate and first signature information from the first certificate file, verifying the first signature information using a first public key in the first digital certificate, and obtaining a first verification result.

[0028] In this embodiment, after finding the target folder, the first certificate file can be further found in the target folder, and the first digital certificate and the first signature information can be identified from the first certificate file. Here, the first digital certificate is one or more certificates stored in the first certificate file, and these certificates are used to verify the source and integrity of the application. The digital certificate is usually generated by the issuer (such as a software developer or a trusted third-party organization) and contains information such as the issuer's public key. The first signature information is signature data related to the application, which is the result of performing hash calculation on a part or all of the files of the application and then encrypting it using the issuer's private key. The first signature information is used to verify whether the application has been tampered with after signing. The first public key is the public key information extracted from the first digital certificate. The public key corresponds to the issuer's private key and is used to verify the signature information encrypted using the private key. Specifically, the corresponding part of the application can be hashed using the same hash algorithm as the first signature information to obtain a new hash value. The first signature information is decrypted using the first public key to obtain the original hash value. Then, the newly calculated hash value is compared with the original hash value obtained by decryption to obtain a first verification result. If the first verification result indicates that the two are the same, it means that the application may not have been tampered with since it was signed, that is, it has passed the security verification; if they are different, it means that the application may have been tampered with.

[0029] Step 103: calculate a first hash value of the target object through a target hash algorithm, and verify the first hash value through a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated through the target hash algorithm when constructing the target object.

[0030] In this embodiment, the target hash algorithm is an algorithm for calculating the hash value of data. The hash algorithm can convert data of any length (such as a file or a code segment) into a fixed-length hash value (commonly referred to as a hash code or digest). This process is one-way, meaning that the original data cannot be reversely derived from the hash value. The hash algorithm also has an "avalanche effect", that is, a small change in the original data will result in a significant change in the hash value. When the integrity of the target object needs to be verified, the target hash algorithm can be used to calculate the current hash value of the target object, which is called the first hash value. Specifically, the entire content of the target object can be read, and then the target hash algorithm can be applied to generate a unique hash value. After the first hash value is calculated, it is compared with the second hash value in the hash value storage file to obtain a second verification result. If the second verification result indicates that the two are the same, it means that the target object has not been tampered with since it was built, that is, it has passed the security verification; if they are different, it means that the target object has been modified or damaged. Here, the hash value storage file is a file containing pre-calculated hash values. These hash values ​​are calculated by the same target hash algorithm when the target object is built or distributed. The hash value storage file is used to compare with the hash value calculated in real time during the subsequent verification process.

[0031] Step 104: When both the first verification result and the second verification result indicate that the security verification has been passed, continue to start the main process of the application.

[0032] In this embodiment, if the first verification result and the second verification result both indicate that the security verification has passed, it means that there are no abnormalities in the signature information of the application and the first hash value under the Java layer. At this time, the main process of the application can continue to be started to control the normal operation of the application.

[0033] By applying the technical solution of this embodiment, when it is detected that the main process of the application is started, the target folder can be found from the root directory of the installation package of the application. At the same time, the target object and the hash value storage file can also be found from the java layer file of the application installation package. After finding the target folder, the first certificate file can be further found from the target folder, the first digital certificate and the first signature information can be identified from the first certificate file, and the first public key can be extracted from the first digital certificate. After that, the corresponding part of the application can be hashed using the same hash algorithm as the first signature information to obtain a new hash value. The first signature information is decrypted using the first public key to obtain the original hash value. Then, the newly calculated hash value is compared with the original hash value obtained by decryption to obtain a first verification result. In addition, the target hash algorithm can also be used to calculate the current hash value of the target object, which is called the first hash value. After the first hash value is calculated, it is compared with the second hash value in the hash value storage file to obtain a second verification result. If both the first verification result and the second verification result indicate that the security verification is passed, it means that there is no abnormality in the signature information of the application and the first hash value under the java layer. At this time, the main process of the application can continue to be started to control the normal operation of the application. The embodiment of the present application performs a first-level verification of the integrity and security of all or part of the files of the application through the first digital certificate and the first signature information in the root directory of the application installation package, and performs a second-level verification of the integrity and security of the specified files of the java layer of the application through the hash value storage file in the java layer file. Therefore, after the main process of the application is started, the security of the application is first verified from two aspects, and the application is run only after the verification is passed. This can prevent the application from running normally after being tampered with, thereby protecting the rights and interests of application developers and the data security of users.

[0034] In an embodiment of the present application, optionally, after step 104, the method further includes: when it is detected that other processes of the application are started, searching for a second certificate file from the native layer file of the application installation package, and identifying a second digital certificate and a second signature information from the second certificate file, and verifying the second signature information through a second public key in the second digital certificate to obtain a third verification result; when the third verification result indicates that the security verification has passed, continuing to start the other processes of the application.

[0035] In this embodiment, when a non-main process (which may be an auxiliary service, background task, etc.) in the application attempts to start, the application itself can also trigger a security verification process. Specifically, the second certificate file can be found from the native layer file of the application installation package, and the second certificate file contains data related to the security verification of the non-main process. Generally speaking, the installation package of the application usually contains multiple files and directories, including Java layer files and native layer files (such as compiled C / C++ code libraries), and the "native layer files" mentioned here refer to these files. The second certificate file contains a second digital certificate and a second signature information. Among them, the second digital certificate contains the public key information of the issuer, which is used to verify the authenticity of the second signature information. The second signature information is the result of encrypting the hash value of certain files or data in the native layer file of the application, which is used to verify whether these files or data have been tampered with since the signature. Afterwards, the second signature information is decrypted using the second public key in the second digital certificate, and the corresponding part of the application is hashed using the same hash algorithm as the second signature information to obtain a new hash. Then, the newly calculated hash value is compared with the original hash value obtained by decryption to obtain a third verification result. If the third verification result indicates that the two are the same, then these files or data in the native layer file have not been tampered with since they were signed, and the third verification result passes the security verification; if they are different, then the files or data may have been tampered with. When the application starts the remaining processes, the embodiment of the present application further verifies the security of the application from the native layer, making the security verification of the application more comprehensive.

[0036] In an embodiment of the present application, optionally, after "when it is detected that the main process of the application is started" in step 101, the method also includes: obtaining the installation source of the application, and determining whether the installation source is a secure source; when the result is no, identifying key fields from the application installation package, and based on the user login information of the application, obtaining the user level and permission information of the user from the target server, wherein the key field is used to indicate the user level and permission information of the super user; obtaining a fourth verification result through the user level and permission information of the user, and the user level and permission information indicated by the key field; when the fourth verification result indicates that the security verification has passed, controlling the application to run normally.

[0037] In this embodiment, before the main process of the application is started and starts running, it can be checked where the application is installed from. The installation source may be an application store, an official website, a third-party website, etc. Further evaluate whether the installation source is reliable. Generally speaking, a safe source may include an application store, an official website, etc. If it is determined that the installation source is not a safe source, it means that the installation source is not safe, and the next step of the security verification process can be entered. Specifically, the application installation package usually contains some key fields, which may contain information about the application configuration, user permissions or other security-related information. Therefore, these key fields in the application can be identified, especially those fields indicating the super user user level and permission information. Then, based on the user login information of the application, the user level and permission information of the user can be obtained from the target server (such as the background server or authentication server of the application). This information is usually used to determine which operations the user can perform or which resources the user can access when using the application. After obtaining the user level and permission information indicated by the key fields in the application installation package, as well as the actual user level and permission information of the user obtained from the server, a comparison and verification can be performed to determine whether the user has the super user permissions specified in the installation package, or whether the user's actual permissions are consistent with the permissions declared in the installation package. The result of the verification can be used as the fourth verification result. If the fourth verification result indicates that the security check has not passed, that is, the user's actual permissions do not match the permissions declared in the installation package, or the user does not have the super user permissions specified in the installation package, then measures can be taken to control the application to stop running. The embodiment of the present application further verifies whether the application has potential security risks by verifying the user level and permission information, such as malware exploiting vulnerabilities to elevate permissions or perform unauthorized operations, thereby enhancing the security of the application.

[0038] In an embodiment of the present application, optionally, after "when the fourth verification result indicates that the security verification has been passed", the method also includes: displaying resources according to a preset resource display strategy, recording feedback data corresponding to the displayed resources within a target time period, judging whether the feedback data meets a preset feedback target, obtaining a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, controlling the application to stop running; or, displaying resources according to a preset resource display strategy, and judging whether the feedback data corresponding to the displayed resources is stored in a feedback data receiving address, obtaining a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, controlling the application to stop running; or, judging whether the resource identifier corresponding to the displayed resource and the feedback data receiving address have been tampered with, obtaining a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, controlling the application to stop running.

[0039] In this embodiment, when the fourth verification result indicates that the security verification has been passed, the following measures may be taken to perform further verification.

[0040] The first is that during the operation of the application, various resources, such as advertisements, content recommendations, etc., can be displayed according to a pre-set resource display strategy. These strategies may involve the type, quantity, display frequency, etc. of resources. And the user's feedback data on the displayed resources within a specific time period (such as one day, one week, etc.) can be recorded. These feedback data may include click-through rate, conversion rate, user evaluation, etc. Then, the collected feedback data can be analyzed to determine whether they meet the preset feedback goals. For example, if the preset feedback goal is a click-through rate of 5%, but the actual click-through rate is only 1%, it is considered that the feedback data does not meet the preset goal. Based on whether the feedback data meets the preset goal, the fifth verification result can be obtained. If the feedback data meets the preset goal, the fifth verification result passes the verification; if the feedback data does not meet the preset goal, the fifth verification result fails the verification. When the fifth verification result indicates that the security verification has not passed, measures can be taken to control the application to stop running to prevent potential security risks or improper behavior.

[0041] The second is that during the operation of the application, various resources, such as advertisements, content recommendations, etc., can be displayed according to a pre-set resource display strategy. These strategies may involve the type, quantity, display frequency, etc. of the resource. And it can be checked whether the feedback data related to the display resources is correctly stored in the preset feedback data receiving address, and the fifth verification result can be obtained. If the feedback data is not stored or the storage location is incorrect, it may indicate that there is a security problem or tampering behavior. At this time, the fifth verification result does not pass the security check. When the fifth verification result indicates that the security check has not passed, measures can be taken to control the application to stop running to prevent potential security risks or improper behavior.

[0042] Third, during the operation of the application, it is also possible to check whether the resource identifier (such as advertising ID, content ID, etc.) corresponding to the displayed resource and the feedback data receiving address have been tampered with. The integrity of this information is crucial to ensuring the security of resource display and feedback data. If the system detects that the resource identifier or the feedback data receiving address has been tampered with, it will conclude that the fifth verification result has not passed the security check. At this time, the resources displayed by the application and the feedback data receiving address may have been tampered with to the resources and feedback data receiving address of an illegal person. When the fifth verification result indicates that the security check has not passed, measures can be taken to control the application to stop running to prevent potential security risks or improper behavior.

[0043] The embodiments of the present application further monitor the compliance of resource display, the authenticity and integrity of feedback data, and the non-tampering of resource identifiers and receiving addresses during the normal operation of the application, aiming to ensure the security of the application through multi-level verification.

[0044] In an embodiment of the present application, optionally, the method further includes: when the fourth verification result indicates that the security verification has not passed, sending the installation source to the target server, so that the target server counts the non-secure sources of the application based on the installation source.

[0045] In this embodiment, when it is verified that the fourth verification result fails the security verification, the installation source information of the application (i.e., from which channel or source the application is installed) can be sent to the target server. After receiving the installation source information, the target server can record and count all non-safe sources of the application. Such statistics and analysis help developers, operation and maintenance personnel or security teams understand which installation sources have problems, so as to take targeted measures to improve the security of the application or strengthen the monitoring and prevention of unsafe sources. Here, the target server can be the background server of the application or a dedicated monitoring server for receiving and processing such security-related information. The embodiment of the present application provides important data support for the security and risk management of the application by sending non-safe sources to the target server and performing statistics and analysis on the non-safe sources through the target server.

[0046] In an embodiment of the present application, optionally, the method also includes: during the normal operation of the application, intercepting the acquired user information and identifying the target permission category corresponding to the user information; determining whether the target permission category is consistent with a preset permission category to obtain a sixth verification result; when the sixth verification result indicates that the security verification has passed, controlling the application to run normally.

[0047] In this embodiment, during the normal operation of the application, the user information that the application attempts to access or use may be obtained, such as personal information (such as name, email address, phone number), account information (such as login credentials, password), transaction information (such as payment records, order details), etc. After obtaining the user information, the user information may be analyzed and the target permission categories corresponding to them may be identified. The permission categories may include read, write, modify, delete, etc. For example, the permission to read user personal information is the "personal information read" permission, and the permission to modify user account settings is the "account settings modify" permission. Next, the identified target permission category is compared with the preset permission category. The preset permission category is usually set during the application development or configuration stage, and is used to specify which user information the application can access and which operations it can perform. After the comparison is completed, a sixth verification result may be generated. If the target permission category is completely consistent with the preset permission category, the sixth verification result will indicate that the security verification has been passed; otherwise, it will indicate that the security verification has not been passed. If the sixth verification result indicates that the security verification has been passed, it means that the permission category has not been modified, and thus the application is allowed to continue to operate normally without any restrictions or interference. The embodiment of the present application determines whether the target permission category is consistent with the preset permission category, and controls the application to stop running when they are inconsistent. It can verify whether the application has been tampered with from another aspect, ensure that the application does not exceed its authorized authority scope, prevent criminals from obtaining users' personal information and privacy, and help protect the security of user information.

[0048] In an embodiment of the present application, optionally, the method further includes: storing the verification results in a designated folder; accordingly, the method further includes: when the startup instruction of the application is detected again, reading the verification results of the application from the designated folder, and when any of the verification results indicates that the security check has not passed, controlling the application to stop starting.

[0049] In this embodiment, when the application is security verified, a series of verification results can be generated, such as the first to sixth verification results mentioned above, which are used to indicate whether various aspects of the application have passed the security check. In order to facilitate subsequent management and verification, these verification results can be stored in a designated folder. When the startup instruction of the application is detected again, the application can read the previously stored verification results from the designated folder. After reading the verification results, these verification results can be checked. If there are one or more verification results indicating that the security check has not been passed, the application can be controlled to stop starting. Before the application is started again, the embodiment of the present application first determines from the designated folder whether there is a verification result that failed the security check last time, and when it exists, directly controls the application to stop running, thereby preventing the cracked version of the application from being run.

[0050] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides an application program operation control device, such as Figure 2 As shown, the device comprises:

[0051] A detection module, configured to search for a target folder from a root directory of an application installation package and search for a target object and a hash value storage file from a Java layer file of the application installation package when detecting that the main process of the application is started, wherein the target object includes a target file and / or a target code segment;

[0052] A first verification module is used to search for a first certificate file in the target folder, identify a first digital certificate and first signature information from the first certificate file, and verify the first signature information using a first public key in the first digital certificate to obtain a first verification result;

[0053] A second verification module is used to calculate a first hash value of the target object by using a target hash algorithm, and verify the first hash value by using a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated by using the target hash algorithm when constructing the target object;

[0054] A startup module is used to continue starting the main process of the application when both the first verification result and the second verification result indicate that the security verification has been passed.

[0055] Optionally, the device further comprises:

[0056] A third verification module is used for searching the second certificate file from the native layer file of the application installation package after continuing to start the main process of the application, when detecting that other processes of the application are started, and identifying the second digital certificate and the second signature information from the second certificate file, and verifying the second signature information by using the second public key in the second digital certificate to obtain a third verification result;

[0057] The startup module is used to continue starting the other processes of the application when the third verification result indicates that the security verification has passed.

[0058] Optionally, the device further comprises:

[0059] An installation source acquisition module, used for acquiring the installation source of the application after detecting that the main process of the application is started, and determining whether the installation source is a safe source;

[0060] an identification module, for identifying a key field from the application installation package when the result is no, and obtaining the user level and permission information of the user from the target server based on the user login information of the application, wherein the key field is used to indicate the user level and permission information of the super user;

[0061] A fourth verification module, configured to obtain a fourth verification result through the user level and authority information of the user and the user level and authority information indicated by the key field;

[0062] The operation control module is used to control the application to run normally when the fourth verification result indicates that the security verification has been passed.

[0063] Optionally, the device further comprises:

[0064] A fifth verification module is used for, after the fourth verification result indicates that the security verification has been passed, to display resources according to a preset resource display strategy, record feedback data corresponding to the displayed resources within a target time period, determine whether the feedback data meets the preset feedback target, obtain a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, control the application to stop running; or, to display resources according to a preset resource display strategy, and determine whether the feedback data corresponding to the displayed resources is stored in the feedback data receiving address, obtain a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, control the application to stop running; or, to determine whether the resource identifier corresponding to the displayed resource and the feedback data receiving address have been tampered with, obtain a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, control the application to stop running.

[0065] Optionally, the device further comprises:

[0066] A sending module is used to send the installation source to the target server when the fourth verification result indicates that the security verification has not been passed, so that the target server can count the non-safe sources of the application based on the installation source.

[0067] Optionally, the device further comprises:

[0068] A user information interception module, used to intercept the acquired user information during the normal operation of the application program, and identify the target permission category corresponding to the user information;

[0069] A sixth verification module, used to determine whether the target permission category is consistent with the preset permission category, and obtain a sixth verification result;

[0070] The operation control module is further configured to control the application to run normally when the sixth verification result indicates that the security verification has been passed.

[0071] Optionally, the device further comprises:

[0072] The storage module is used to store the verification results in a specified folder;

[0073] Correspondingly, the operation control module is also used to read the verification result of the application from the designated folder when the startup instruction of the application is detected again, and control the application to stop starting when any of the verification results indicates that the security verification has not passed.

[0074] It should be noted that for other corresponding descriptions of the functional units involved in the application program operation control device provided in the embodiment of the present application, reference can be made to Figure 1 The corresponding description in the method will not be repeated here.

[0075] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 3As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0076] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0077] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0078] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0079] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0080] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0081] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0082] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for controlling the operation of an application program, It is characterized in that include: When it is detected that the main process of the application is started, searching for a target folder from the root directory of the application installation package, and searching for a target object and a hash value storage file from a Java layer file of the application installation package, wherein the target object includes a target file and / or a target code segment; Searching for a first certificate file in the target folder, identifying a first digital certificate and first signature information from the first certificate file, and verifying the first signature information using a first public key in the first digital certificate to obtain a first verification result; Calculate a first hash value of the target object by using a target hash algorithm, and verify the first hash value by using a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated by using the target hash algorithm when constructing the target object; When both the first verification result and the second verification result indicate that the security verification has passed, the main process of the application program continues to be started.

2. The method according to claim 1, It is characterized in that After continuing to start the main process of the application, the method further includes: When it is detected that other processes of the application are started, searching for a second certificate file from a native layer file of the application installation package, identifying a second digital certificate and a second signature information from the second certificate file, and verifying the second signature information using a second public key in the second digital certificate to obtain a third verification result; When the third verification result indicates that the security verification is passed, continue to start the other processes of the application.

3. The method according to claim 1, It is characterized in that After detecting that the main process of the application is started, the method further includes: Obtaining an installation source of the application and determining whether the installation source is a safe source; When the result is no, identifying a key field from the application installation package, and acquiring the user level and permission information of the user from the target server based on the user login information of the application, wherein the key field is used to indicate the user level and permission information of the super user; Obtaining a fourth verification result through the user level and authority information of the user and the user level and authority information indicated by the key field; When the fourth verification result indicates that the security verification is passed, the application is controlled to run normally.

4. The method according to claim 3, It is characterized in that After the fourth verification result indicates that the security verification has been passed, the method further includes: Display resources according to a preset resource display strategy, record feedback data corresponding to the displayed resources within a target time period, determine whether the feedback data meets a preset feedback target, obtain a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, control the application to stop running; or, Display resources according to a preset resource display strategy, and determine whether feedback data corresponding to the displayed resources is stored in the feedback data receiving address, obtain a fifth verification result, and when the fifth verification result indicates that the security verification has not been passed, control the application to stop running; or, It is determined whether the resource identifier corresponding to the display resource and the feedback data receiving address are tampered with to obtain a fifth verification result, and when the fifth verification result indicates that the security verification fails, the application is controlled to stop running.

5. The method according to claim 3, It is characterized in that The method further comprises: When the fourth verification result indicates that the security verification has not been passed, the installation source is sent to the target server, so that the target server counts the non-secure sources of the application based on the installation source.

6. The method according to any one of claims 2 to 5, It is characterized in that The method further comprises: During the normal operation of the application, intercepting the acquired user information and identifying the target permission category corresponding to the user information; Determine whether the target permission category is consistent with the preset permission category, and obtain a sixth verification result; When the sixth verification result indicates that the security verification has been passed, the application is controlled to run normally.

7. The method according to claim 6, It is characterized in that The method further comprises: Store the verification results in the specified folder; Accordingly, the method further comprises: When the startup instruction of the application is detected again, the verification result of the application is read from the designated folder, and when any of the verification results indicates that the security verification has not been passed, the application is controlled to stop starting.

8. A device for controlling the operation of an application program, It is characterized in that include: A detection module, configured to search for a target folder from a root directory of an application installation package and search for a target object and a hash value storage file from a Java layer file of the application installation package when detecting that the main process of the application is started, wherein the target object includes a target file and / or a target code segment; A first verification module is used to search for a first certificate file in the target folder, identify a first digital certificate and first signature information from the first certificate file, and verify the first signature information using a first public key in the first digital certificate to obtain a first verification result; A second verification module is used to calculate a first hash value of the target object by using a target hash algorithm, and verify the first hash value by using a second hash value stored in the hash value storage file to obtain a second verification result, wherein the second hash value is calculated by using the target hash algorithm when constructing the target object; A startup module is used to continue starting the main process of the application when both the first verification result and the second verification result indicate that the security verification has been passed.

9. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Large file access permission release method and file screen projection method

    CN119227139A

  • A method for releasing access rights to large files and a method for projecting files onto screen

    CN119227139B

  • Installation package uploading method, installation package distribution method and installation package verification method

    CN119629159A