Safe operation method and device of application program, equipment and storage medium
By parsing the metadata of user instructions and performing permission verification based on security configuration files, the problem of difficult to achieve fine-grained permission control in traditional Linux environments is solved, and the security and flexibility of the application are improved.
Patent Information
- Application Number
- CN202411792416.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-07
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-07
AI Technical Summary
In traditional Linux environments, polymorphic binary technology makes it difficult to achieve fine-grained permission control for individual commands, limiting security and flexibility.
By obtaining and parsing the metadata of user instructions, determining the instruction type, and performing permission verification based on the corresponding security profile, ensuring that instructions are executed only if they comply with preset security policies.
It realizes fine-grained permission control for applications, improves security and flexibility, and enables dynamic adjustment of permission settings to adapt to changing business and security needs.
Smart Images

Figure CN119646770A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer security operation, and in particular to a method, apparatus, device, storage medium and computer program product for the secure operation of an application program. Background Art
[0002] The Linux operating system is an open source operating system that is widely used in various devices due to its stability, security and efficiency. In the Linux operating system, the command processing system is its core part, which is responsible for receiving user input, performing corresponding operations, and returning results.
[0003] In traditional Linux environments, polymorphic binary technology is often used to reduce the space occupied by the file system and to perform multiple functions through one executable binary file. For example, BusyBox is a widely used polymorphic binary application that integrates a large number of commonly used UNIX commands and tools.
[0004] However, this integration method usually limits the fine-grained permission control of individual commands. Each command can only run with the same permission, and the permission settings cannot be adjusted according to different usage scenarios. It has many limitations such as poor security and poor flexibility when executing commands. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, equipment, storage medium and computer program product for the safe operation of applications with high security and high configuration flexibility in order to address the above technical problems.
[0006] In a first aspect, the present application provides a method for securely running an application program, the method comprising:
[0007] Acquire a current user instruction for a current application, parse the current user instruction, and obtain first metadata of the current user instruction;
[0008] determining the instruction type of the current user instruction according to the first metadata;
[0009] When the instruction type is a main instruction type, performing security verification on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result;
[0010] When the first security verification result is verification passed, obtaining a lower-level sub-instruction of the current user instruction from the first metadata;
[0011] When it is determined that the lower-level sub-instruction is an executable instruction, a second execution permission of the lower-level sub-instruction is security verified based on a second security configuration file to obtain a second security verification result;
[0012] When the second security verification result is verification passed, the lower-level sub-instruction is executed to obtain the execution result of the current user instruction.
[0013] In one embodiment, the performing security verification on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result includes:
[0014] Acquire a first security configuration file corresponding to the current user instruction; the first security configuration file is obtained by configuring a first execution permission of a main instruction type of the current application program;
[0015] The first execution permission of the current user instruction is verified according to the first security configuration file to obtain a first security verification result.
[0016] In one embodiment, before obtaining the first security configuration file corresponding to the current user instruction, the method further includes:
[0017] Obtaining a first user list of the current application and a first execution permission of each of the first user accounts in the first user list corresponding to a main instruction type; the first execution permission includes at least one of a first execution trigger permission, a first execution time window permission, a first execution frequency permission, and a first concurrent execution permission for the first user account for instructions belonging to the main instruction type;
[0018] Based on the first execution permissions of each of the first user accounts, a first security configuration file corresponding to the first user account is configured.
[0019] In one embodiment, the performing security verification on the second execution permission of the subordinate sub-instruction based on the second security configuration file to obtain a second security verification result includes:
[0020] Acquire a second security configuration file corresponding to the lower-level sub-instruction; the second security configuration file is obtained by configuring a second execution permission of the sub-instruction type of the current application;
[0021] The second execution permission of the subordinate sub-instruction is verified according to the second security configuration file to obtain a second security verification result.
[0022] In one of the embodiments, before obtaining the second security configuration file corresponding to the lower-level sub-instruction, the method further includes:
[0023] Obtaining a second user list of the current application and a second execution permission of each sub-instruction type corresponding to each second user account in the second user list; the second execution permission includes at least one of a second execution trigger permission, a second execution time window permission, a second execution frequency permission, and a second concurrent execution permission for the second user account for instructions belonging to the sub-instruction type;
[0024] Based on the second execution permission of each of the second user accounts, a second security configuration file corresponding to the second user account is configured.
[0025] In one embodiment, the method further comprises at least one of the following:
[0026] When the first security verification result is verification failure, refusing execution of the current user instruction and recording a first exception log;
[0027] When the second security verification result is verification failure, the execution of the lower-level sub-instruction is rejected and a second exception log is recorded.
[0028] In one embodiment, the method further comprises at least one of the following:
[0029] When the instruction type is a sub-instruction type and the current user instruction belongs to the executable instruction, performing security verification on the second execution permission of the current user instruction based on the second security configuration file to obtain a third security verification result; when the third security verification result is verification passed, executing the current user instruction to obtain an execution result of the current user instruction;
[0030] When the instruction type is a sub-instruction type and the current user instruction does not belong to the executable instruction, or the lower-level sub-instruction does not belong to the executable instruction, an alarm is issued for the current user instruction and a third abnormal log is recorded.
[0031] In a second aspect, the present application further provides a device for securely running an application program, the device comprising:
[0032] An instruction parsing module, used to obtain a current user instruction for a current application, parse the current user instruction, and obtain first metadata of the current user instruction;
[0033] An instruction type determination module, configured to determine the instruction type of the current user instruction according to the first metadata;
[0034] A first verification module, configured to perform security verification on a first execution permission of the current user instruction based on a first security configuration file to obtain a first security verification result when the instruction type is a main instruction type;
[0035] A lower-level instruction acquisition module, used for acquiring the lower-level sub-instructions of the current user instruction from the first metadata when the first security verification result is verification passed;
[0036] A second verification module, configured to, when it is determined that the lower-level sub-instruction is an executable instruction, perform security verification on the second execution permission of the lower-level sub-instruction based on a second security configuration file to obtain a second security verification result;
[0037] The instruction execution module is used to execute the lower-level sub-instruction and obtain the execution result of the current user instruction when the second security verification result is verification passed.
[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method when executing the computer program.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described above are implemented.
[0040] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method described above when executed by a processor.
[0041] The above-mentioned method, apparatus, device, storage medium and computer program product for the safe operation of the application program, when the client initiates a user request for the current application program, the server parses the current user instruction from the user request, obtains the current user instruction for the current application program, parses the current user instruction, obtains the first metadata of the current user instruction, and can determine the instruction type of the current user instruction from the first metadata. When the server determines that the instruction type of the current user instruction is the main instruction type, the first execution permission of the current user instruction is security verified based on the first security configuration file to obtain a first security verification result to ensure that the execution of the current user instruction complies with the safe operation policy. Subsequently, when the first security verification result is that the verification is passed, the server The lower-level sub-instructions of the current user instruction are obtained from the first metadata. When the server determines that the lower-level sub-instruction is an executable instruction, the second execution permission of the lower-level sub-instruction is security verified based on the second security configuration file to obtain a second security verification result to ensure that the execution of the lower-level sub-instruction complies with the security operation policy. When the second security verification result is that the verification is passed, the lower-level sub-instruction is executed to obtain the execution result of the current user instruction. The security verification of the execution permission is performed for different types and different user instructions using the corresponding security configuration files, which can achieve more fine-grained permission control. In addition, the permission settings of different instructions can be dynamically adjusted using the security configuration files, which can quickly adapt to changing business and security needs, thereby effectively preventing unauthorized access and operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 An application environment diagram of a method for securely running an application program in one embodiment;
[0044] Figure 2 A schematic diagram of a flow chart of a method for safely running an application program in one embodiment;
[0045] Figure 3 A system block diagram of a method for executing a secure operation of an application program in an application instance;
[0046] Figure 4 A control flow chart for the safe execution of commands in an application instance;
[0047] Figure 5 It is the overall flow chart of an application example;
[0048] Figure 6 A structural block diagram of a device for safely running an application program in an embodiment;
[0049] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] The method for safely running an application provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can obtain the first metadata in the current user instruction by acquiring and parsing the current user instruction for the current application sent by the terminal 102, so as to determine the instruction type of the current user instruction through the first metadata, and select the first security configuration file to perform security verification on the current user instruction according to the instruction type of the current user instruction. After the security verification is passed, the lower-level sub-instructions of the current user instruction are extracted from the first metadata, and it is determined whether the lower-level sub-instructions are executable instructions. If so, the second security configuration file is selected to perform security verification on the lower-level sub-instructions. After the security verification is passed, the lower-level sub-instructions are executed, so that each instruction can only be executed under the condition of meeting the preset security policy, so as to improve the security of the current application operation.
[0052] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable devices may be smart watches, smart bracelets, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0053] In an exemplary embodiment, Figure 2 As shown, a method for safely running an application is provided, and the method is applied to Figure 1 The server 104 in the example is used for explanation; it is understandable that the method can also be applied to Figure 1The terminal 102 in the embodiment may also be applied to a system including a server 104 and a terminal 102, and implemented through interaction between the server 104 and the terminal 102. The method of this embodiment includes:
[0054] Step S201: obtain a current user instruction for a current application, parse the current user instruction, and obtain first metadata of the current user instruction.
[0055] The current application refers to a software program or system currently running on the server, which is used to implement the interaction between the client and the server. The client here can be a device or other application that can trigger instructions. In an optional embodiment, the current application further refers to an application based on a polymorphic binary with business completion.
[0056] The current user instruction refers to the instruction being processed by the current application. The instruction can be a button clicked on the current application, a command entered, an option selected, etc., which is used to instruct the current application to perform a specific operation or function. The current user instruction is usually included in the user request. The server can identify the specific operation that the user wants to perform by monitoring, reading and parsing the data in the user request to extract the current user instruction.
[0057] Among them, parsing the current user instruction refers to the process in which the server decomposes the current user instruction on the current application to obtain more basic elements carried in the current user instruction, such as instruction identifiers, parameters, etc., so that the server can identify the specific operation the user wants to perform.
[0058] Among them, the first metadata refers to data associated with the current user instruction, and the first metadata includes but is not limited to the instruction identifier, instruction type, priority, operation object, operation parameters and other information of the current user instruction, so that the server can process and understand the current user instruction.
[0059] Exemplarily, the server monitors user requests from the current application in real time. When receiving a user request, the server reads and parses various data carried in the user request to extract the current user instruction from the data; then, the server parses the current user instruction according to a predefined format or protocol, and identifies and extracts information related to the first metadata such as the instruction identifier, instruction type, priority, operation object, operation parameters, etc. in the current user instruction.
[0060] During parsing, the server may parse the current user instruction using a predefined format or protocol. The predefined formats include, but are not limited to, XML (eXtensible Markup Language), JSON (JavaScript Object Notation), CSV (Comma-Separated Values), etc. The parsed protocols include, but are not limited to, HTTP (HyperText Transfer Protocol), TCP / IP (Transmission Control Protocol / Internet Protocol), etc.
[0061] Step S202: determining the instruction type of the current user instruction according to the first metadata.
[0062] Among them, the instruction type refers to the category or classification of the current user instruction, and different instruction types correspond to different processing logics and permission requirements. In this embodiment, the instruction type mainly includes a main instruction type and a sub-instruction type. The main instruction type corresponds to the main instruction. The main instruction can be used to call a function, perform a specific task, or start or specify an operation or function, etc. The sub-instruction type corresponds to the sub-instruction. The sub-instruction is attached to the main instruction to provide more detailed or more specific operations. The sub-instruction can usually be used to modify the behavior or parameters of the main instruction, or to perform additional tasks related to the main instruction. A main instruction can have one or more sub-instructions to refine or expand the function of the main instruction.
[0063] Exemplarily, the server determines the instruction type of the current user instruction according to at least one of the instruction identifier, instruction type, priority, operation object, and operation parameter of the current user instruction contained in the first metadata.
[0064] Step S203: When the instruction type is a primary instruction type, security verification is performed on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result.
[0065] The main instruction type refers to an instruction type with a higher priority or more importance during the running of the current application program.
[0066] Among them, the first security profile refers to a security profile for verifying the first execution permission of the current user's instructions; the first security profile limits the information that different clients have the permission to execute specific types of instructions, as well as the specific operations that these instructions can perform. The first execution permission refers to the permission of different clients to execute the current user's instructions. The first security verification result refers to the result obtained after verifying the first execution permission of the current user's instructions according to the first security profile. The first security verification result can be used to indicate whether the security verification of the current user's instructions has passed. If passed, it means that the client has the permission to execute the current user's instructions. If not passed, it means that the client does not have the permission to execute the current user's instructions.
[0067] Exemplarily, when it is determined that the instruction type of the current user instruction is the main instruction type, the server performs a security verification on the first execution permission of the current user instruction based on the first security configuration file to determine whether the client has execution permission for the current user instruction of the current application, thereby obtaining a first security verification result.
[0068] In addition, when performing security verification on the first execution authority, the server may also log the verification process to facilitate tracking and recording of the verification status of the instruction and to facilitate subsequent analysis of the verification status.
[0069] Step S204: when the first security verification result is verification passed, the lower-level sub-instructions of the current user instruction are obtained from the first metadata.
[0070] The lower-level sub-instruction refers to an instruction of a lower level or having more detailed operations contained in or related to the current user instruction, and the lower-level sub-instruction is carried in the first metadata as a component of the current instruction.
[0071] Exemplarily, when a first security verification result of performing security verification on the first execution permission of the current user instruction is verification passed, the server obtains the subordinate sub-instructions of the current user instruction from the first metadata.
[0072] Step S205: When it is determined that the lower-level sub-instruction is an executable instruction, a second execution permission of the lower-level sub-instruction is security verified based on the second security configuration file to obtain a second security verification result.
[0073] The executable instructions refer to instructions that have been recognized by the server as valid and executable.
[0074] Among them, the second security profile refers to a security profile used to verify the second execution permission of the subordinate sub-instruction; the second security profile is similar to the first security profile, and the second security profile limits the information that different clients are authorized to execute characteristic type instructions, as well as the specific operations that these instructions can perform. The second execution permission refers to the permission of different clients to execute subordinate sub-instructions. The second security verification result refers to the result obtained after verifying the second execution permission of the subordinate sub-instruction according to the second security profile. The second security verification result can be used to indicate whether the security verification of the subordinate sub-instruction has passed. Passing means that the client has the permission to execute the subordinate sub-instruction, and failing means that the client does not have the permission to execute the subordinate sub-instruction.
[0075] Exemplarily, when it is determined that the subordinate sub-instruction is an executable instruction, the server performs security verification on the second execution permission of the subordinate sub-instruction based on the second security configuration file to determine whether the client has execution permission for the subordinate sub-instruction of the current application, thereby obtaining a second security verification result.
[0076] In addition, when performing security verification on the second execution authority, the server may also log the verification process to facilitate tracking and recording of the verification status of the instruction and to facilitate subsequent analysis of the verification status.
[0077] Step S206, when the second security verification result is verification passed, execute the lower-level sub-instruction to obtain the execution result of the current user instruction.
[0078] The execution of the lower-level sub-command refers to the process in which the server executes the lower-level sub-command to run the current application after the command passes the necessary authority verification. The execution result of the current user command refers to the result obtained after executing the lower-level sub-command, that is, the running result of the current application.
[0079] Exemplarily, when the second security verification result of the second execution permission of the subordinate sub-instruction is passed, the server executes the subordinate sub-instruction to obtain the execution result of the current user instruction, thereby enabling the current application to run safely under the action of the current user instruction and its subordinate sub-instructions.
[0080] When executing a lower-level sub-instruction, the server may include but is not limited to calling and parsing the lower-level sub-instruction from the instruction entry of the lower-level sub-instruction to obtain the second metadata of the lower-level sub-instruction, and then execute the lower-level sub-instruction based on the second metadata.
[0081] In addition, after the server executes a lower-level sub-instruction, it can also log the execution information of the lower-level sub-instruction. The execution information includes the execution time, specific operations executed, execution results, etc., to facilitate tracking and recording of the system's operation status and subsequent analysis of the execution status.
[0082] In the above-mentioned method for the safe operation of the application, when the client initiates a user request for the current application, the server parses the current user instruction from the user request, obtains the current user instruction for the current application, parses the current user instruction, obtains the first metadata of the current user instruction, and can determine the instruction type of the current user instruction from the first metadata. When the server determines that the instruction type of the current user instruction is the main instruction type, the first execution permission of the current user instruction is security verified based on the first security configuration file to obtain a first security verification result to ensure that the execution of the current user instruction complies with the safe operation policy. Subsequently, when the first security verification result is that the verification is passed, the server obtains the current instruction from the first metadata. The server determines that the subordinate sub-instruction is an executable instruction, and performs security verification on the second execution permission of the subordinate sub-instruction based on the second security configuration file to obtain a second security verification result to ensure that the execution of the subordinate sub-instruction complies with the security operation strategy. When the second security verification result is that the verification is passed, the subordinate sub-instruction is executed to obtain the execution result of the current user instruction. The corresponding security configuration files are used to perform security verification of execution permissions for different types and different user instructions, which can achieve more fine-grained permission control. In addition, the permission settings of different instructions can be dynamically adjusted using security configuration files, which can quickly adapt to changing business and security needs, thereby effectively preventing unauthorized access and operations.
[0083] In one embodiment, security verification is performed on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result, including:
[0084] A first security configuration file corresponding to the current user instruction is obtained; and a first execution permission of the current user instruction is verified according to the first security configuration file to obtain a first security verification result.
[0085] The first security configuration file is obtained by configuring the first execution permission of the main instruction type of the current application. Specifically, the first security configuration file is pre-generated and stored in the data storage system of the server. The first security configuration file defines in detail the various permissions of the instructions corresponding to the main instruction type when executing, and is used to determine whether the execution of the instructions corresponding to the main instruction type complies with the preset security policy.
[0086] Exemplarily, the server obtains a first security configuration file corresponding to the current user instruction from the data storage system; and performs detailed verification on the first execution permission of the current user instruction according to the first security configuration file to obtain a first security verification result.
[0087] In this embodiment, the server obtains the first security configuration file corresponding to the current user instruction and verifies the first execution permission of the current user instruction according to the first security configuration file, so as to obtain the first security verification result corresponding to the first execution permission, so as to match and verify the current user instruction before the current user instruction is executed, thereby ensuring that the execution of all current user instructions complies with the preset security policy, thereby achieving the purpose of improving the security of system operation.
[0088] In one embodiment, before obtaining the first security configuration file corresponding to the current user instruction, the method further includes:
[0089] Obtain a first user list of the current application and first execution permissions of the main instruction type corresponding to each first user account in the first user list; and configure a first security configuration file corresponding to the first user account based on the first execution permissions of each first user account.
[0090] The first user list refers to a list of user information that has been registered or authorized in the current application. The first user list includes the first user account of each user and the first execution permission of each user account corresponding to the main instruction type. The first user account is the unique identifier of the user. The first user account can be a user name, user ID, or other information that can distinguish different user identities. The first user list can be pre-stored in the data storage system, or can be input from an external device during configuration.
[0091] Among them, the first execution permission includes at least one of the first execution trigger permission, the first execution time window permission, the first execution frequency permission, and the first concurrent execution permission of the first user account for instructions belonging to the main instruction type.
[0092] Among them, the first execution trigger permission refers to whether the first user account has the permission to trigger the execution of a specific instruction. The first execution time window permission refers to the time period in which the first user account can execute instructions. The first execution frequency permission refers to the number of times the first user account can execute instructions within a specific time window. The first concurrent execution permission refers to the number of instructions that the first user account can execute simultaneously.
[0093] Exemplarily, the server obtains the first user list of the current application and the first execution permission of the main instruction type corresponding to each first user account in the first user list from the data storage system; and configures the first security profile corresponding to the first user account based on at least one of the first execution trigger permission, the first execution time window permission, the first execution frequency permission, and the first concurrent execution permission of each first user account.
[0094] In this embodiment, by obtaining the first user list of the current application and the first execution permissions of the main instruction type corresponding to each of the first user accounts in the first user list, and then configuring the first security profile corresponding to the first user account based on the first execution permissions of each of the first user accounts, different execution trigger permissions, execution time window permissions, execution frequency permissions and concurrent execution permissions are defined for different user accounts to perform detailed verification of the execution of the current user's instructions, and the first security profile can be dynamically adjusted according to changes in permissions of the user account, can quickly respond to business changes, and has high flexibility. At the same time, by configuring concurrent execution permissions, the efficiency of system resource utilization can be effectively improved and the utilization of system resources can be optimized.
[0095] In one embodiment, security verification is performed on the second execution permission of the subordinate sub-instruction based on the second security configuration file to obtain a second security verification result, including:
[0096] A second security configuration file corresponding to the lower-level sub-instruction is obtained; and a second execution permission of the lower-level sub-instruction is verified according to the second security configuration file to obtain a second security verification result.
[0097] The second security profile is obtained by configuring the second execution permission of the sub-instruction type of the current application. Specifically, the second security profile is similar to the first security profile, and is also pre-generated and stored in the data storage system of the server. The second security profile defines in detail the various permissions of the instructions corresponding to the sub-instruction type when executing, and is used to determine whether the execution of the instructions corresponding to the sub-instruction type complies with the preset security policy.
[0098] Exemplarily, the server obtains a second security configuration file corresponding to the lower-level sub-instruction from the data storage system; and performs detailed verification on the second execution permission of the lower-level sub-instruction according to the second security configuration file to obtain a second security verification result.
[0099] In this embodiment, the server obtains a second security configuration file corresponding to the lower-level sub-instruction and verifies the second execution permission of the lower-level sub-instruction according to the second security configuration file. It can obtain a second security verification result corresponding to the second execution permission, so as to match and verify the lower-level sub-instruction before the execution of the lower-level sub-instruction, thereby ensuring that the execution of all lower-level sub-instructions complies with the preset security policy, thereby achieving the purpose of improving the security of system operation.
[0100] In one embodiment, before obtaining the second security configuration file corresponding to the lower-level sub-instruction, the method further includes:
[0101] Obtain a second user list of the current application and second execution permissions of the sub-instruction types corresponding to the second user accounts in the second user list; and configure a second security configuration file corresponding to the second user account based on the second execution permissions of the second user accounts.
[0102] The second user list refers to a list of user information that has been registered or authorized in the current application. The second user list includes the second user account of each user and the second execution permission of each user account corresponding to the sub-instruction type. The second user account is the unique identifier of the user. The second user account can be a user name, user ID or other information that can distinguish different user identities. The second user list is the same or similar to the first user list. Since the sub-instruction is subordinate to the main instruction, the second user account in the second user list belongs to the first user account in the first user list, that is, the first user account includes all the second user accounts. In addition, the second user list can also be based on the first user list. The second user account adds the corresponding second execution permission to the second user account therein to reduce the occupation of system storage resources. The second user list can be pre-stored in the data storage system, or it can be input from an external device during configuration.
[0103] Among them, the second execution permission includes at least one of the second execution trigger permission, the second execution time window permission, the second execution frequency permission, and the second concurrent execution permission of the second user account for the instruction belonging to the sub-instruction type. The second execution trigger permission, the second execution time window permission, the second execution frequency permission, and the second concurrent execution permission are similar to the first execution trigger permission, the first execution time window permission, the first execution frequency permission, and the first concurrent execution permission in the above embodiment except for the instruction type. For details, please refer to the records of the above embodiment, and this embodiment will not be repeated.
[0104] Exemplarily, the server obtains from the data storage system the second user list of the current application and the second execution permissions of the sub-instruction types corresponding to each second user account in the second user list; and configures a second security profile corresponding to the second user account based on at least one of the second execution trigger permissions, second execution time window permissions, second execution frequency permissions, and second concurrent execution permissions of each second user account.
[0105] In this embodiment, by obtaining the second user list of the current application and the second execution permissions of the sub-instruction types corresponding to the second user accounts in the second user list, and then configuring the second security profile corresponding to the second user account based on the second execution permissions of the second user accounts, similarly, different execution trigger permissions, execution time window permissions, execution frequency permissions and concurrent execution permissions are defined for different user accounts to verify the execution of lower-level sub-instructions in detail, and the second security profile can be dynamically adjusted according to changes in permissions of the user account, can quickly respond to business changes, and has high flexibility. At the same time, by configuring concurrent execution permissions, the efficiency of system resource utilization can be effectively improved and the utilization of system resources can be optimized.
[0106] In one embodiment, the method for safely running the application further includes at least one of the following:
[0107] When the first security verification result is verification failure, the execution of the current user instruction is rejected and a first exception log is recorded.
[0108] Among them, the first exception log refers to a log file used to record the event of verification failure and current user instruction being refused to execute and related information when the first security verification result is verification failure and the current user instruction is refused to execute. The relevant information includes but is not limited to the time of occurrence, user account, instruction content of the current user instruction, reason for verification failure, etc.
[0109] Exemplarily, when the first security verification result is verification failure, the server refuses to execute the current user instruction and records a first exception log.
[0110] When the second security verification result is verification failure, the execution of the lower-level sub-instruction is rejected and a second abnormal log is recorded.
[0111] Among them, the second exception log refers to a log file used to record the event of verification failure and the refusal of execution of the lower-level sub-instruction and its related information when the second security verification result is verification failure and the lower-level sub-instruction is refused to execute. The relevant information also includes but is not limited to the time of occurrence, user account, instruction content of the current user instruction, reason for verification failure, etc.
[0112] Exemplarily, when the second security verification result is verification failure, the server refuses execution of the lower-level sub-instruction and records a second exception log.
[0113] In this embodiment, by logging the verification of the current user instructions and lower-level sub-instructions, detailed tracking information and records of the instruction verification operation can be provided to support compliance reviews and investigations of security incidents, and is conducive to a comprehensive post-analysis of the operation of the current application.
[0114] In one embodiment, the method for safely running the application further includes at least one of the following:
[0115] When the instruction type is a sub-instruction type and the current user instruction is an executable instruction, a second execution permission of the current user instruction is security verified based on the second security configuration file to obtain a third security verification result; when the third security verification result is that the verification is passed, the current user instruction is executed to obtain the execution result of the current user instruction.
[0116] Among them, the third verification result refers to the result obtained after verifying the second execution permission of the current user instruction according to the second security configuration file. The third security verification result can be used to indicate whether the security verification of the current user instruction has passed. If passed, it means that the client has the authority to execute the current user instruction. If not passed, it means that the client does not have the authority to execute the current user instruction.
[0117] Exemplarily, when the instruction type of the acquired current user instruction is a sub-instruction type and the current user instruction is an executable instruction, the server performs a security verification on the second execution permission of the current user instruction based on the second security configuration file to determine whether the client has execution permission for the current application, and thereby obtains a third security verification result; when the third security verification result of the security verification of the second execution permission of the current user instruction is that the verification is passed, the server executes the current user instruction to obtain the execution result of the current user instruction, and thereby enables the current application to run safely under the action of the current user instruction.
[0118] When the instruction type is a sub-instruction type and the current user instruction is not an executable instruction, or the lower-level sub-instruction is not an executable instruction, an alarm is issued for the current user instruction and a third abnormal log is recorded.
[0119] The non-executable instructions refer to the current user instructions or subordinate sub-instructions not being instructions executable by the current application.
[0120] Among them, the third exception log means that when the current user instruction or the subordinate sub-instruction belonging to the sub-instruction type does not belong to the executable instruction of the current application, the current user instruction or the subordinate sub-instruction will not be executed and an alarm will be issued for the current user instruction. The third exception log is used for relevant information that the current user instruction or the subordinate sub-instruction will not be executed and relevant information for the alarm for the current user instruction.
[0121] Exemplarily, when the instruction type of the current user instruction obtained by the server is a sub-instruction type and the current user instruction is not an executable instruction, the current user instruction will not be executed, the server will alarm the current user instruction, and record the information that the current user instruction has not been executed and the alarm information in the third exception log, or, when the lower-level sub-instruction is not an executable instruction, the lower-level sub-instruction will not be executed, the server will alarm the current user instruction corresponding to the lower-level sub-instruction, and record the information that the lower-level sub-instruction has not been executed and the alarm information in the third exception log.
[0122] In this embodiment, by logging the running process of the current user instructions and lower-level sub-instructions, detailed tracking information and records can be provided for the running process of the response instructions of the current application to support compliance reviews and investigations of security incidents, and is conducive to comprehensive post-analysis of the running status of the current application.
[0123] In an application example, a method for secure operation of an application is provided, which is mainly used in a multi-user operating system environment, such as a server, cloud computing infrastructure, and a large multi-tasking system. In the aforementioned environment, the system runs multiple applications, each of which may be triggered by a different user or service account. In order to improve security and the rational allocation of system resources, it is necessary to precisely control the permissions, time windows, frequency, and number of concurrent commands executed by the application. The following takes the application as a polymorphic two-level application as an example, where:
[0124] Multicall Binary: Polymorphic binary is a programming method in which a binary file can simulate and execute multiple programs, deciding which function to execute based on the name of the call itself or the parameters passed.
[0125] Permission Verification: In software and computer systems, permission verification refers to the process of checking whether a user or program has the right to perform an operation or access certain data.
[0126] Time Window Verification: Time Window Verification is the process of checking that an operation request is within a specific time range within which certain operations are allowed to be performed.
[0127] Frequency Control: Frequency control is the process of limiting the number of times a specific operation is performed within a given period of time.
[0128] Concurrency Control: Ensure the number of programs running at the same time.
[0129] Resource Management: Resource management refers to the process of allocating, optimizing and monitoring resources such as CPU, memory and storage in a computer system.
[0130] BusyBox: A software that integrates multiple UNIX (Uniplexed Information and Computering System, UNIX operating system) system tools. It is usually used in embedded operating systems. It provides a set of streamlined UNIX command line tools packaged in a single executable file.
[0131] Executable binary file: A special type of binary file that contains machine code that can be directly parsed and executed by a computer. Executable binary files undergo a compilation process that converts source code written in a high-level programming language into instructions that can be directly understood and executed by the computer's central processing unit.
[0132] Binary application: refers to a program that has been compiled from source code into machine language. Binary applications are packaged into binary format files and can be run directly on the computer's operating system. Binary applications directly contain instruction sets that can be directly interpreted and executed by the computer processor.
[0133] Artificial Intelligence (AI): Artificial Intelligence (AI) is a branch of computer science that focuses on creating machines and software systems that can perform tasks that normally require human intelligence.
[0134] Service Level Agreement (SLA): A service level agreement (SLA) is a formal agreement between a service provider and a customer that clearly outlines specific expectations and standards for the service.
[0135] Based on the above, the steps of this example are as follows:
[0136] Step 1: Design an application based on a polymorphic binary with business completion.
[0137] In this step, for example, a command similar to Busybox, syskits (example polymorphic binary name), is designed, which integrates more than 100 commonly used command lines of Busybox, such as cp, ls, rsync, cat, etc., into a polymorphic binary named syskits. It can use syskits ls [options] to execute the ls command, or use ls to soft-link to syskits and directly use ls [options] to execute the ls command. In this embodiment, each tool (such as ls, cp, etc.) involves an independent module, which constitutes the command implementation body of the system. Each module is independently responsible for the logical processing of a specific command. For the specific design framework, please refer to Figure 3 , the main structure includes:
[0138] The command parsing module is responsible for parsing the commands submitted by the user or the system, determining the command type and parameters, and providing the necessary information for subsequent permission verification and execution.
[0139] The permission verification module is used to verify whether the user or service that initiates the command has sufficient permissions to execute the command to ensure system security.
[0140] The runtime window check module is used to check whether the command is within the configured time window allowed for execution, such as nighttime or off-peak hours, to reduce the impact on system performance.
[0141] The command running frequency check module is used to manage the execution frequency of commands to prevent a single command from running too fast and causing system overload. For example, it limits the execution frequency of certain important commands to ensure system stability.
[0142] The command concurrency check module is used to control the number of subcommands that can be executed at the same time to avoid performance problems caused by resource contention.
[0143] Command routing module, used to quickly find sub-commands.
[0144] A general command line framework that provides parsing and metadata storage interfaces for main commands and subcommands.
[0145] Error handling module, used to handle various abnormal conditions
[0146] The logging module is used to record the execution details of all commands for auditing, monitoring, and troubleshooting.
[0147] Step 2: Deploy the polymorphic binary program to the corresponding environment.
[0148] Step 3: Create a security execution control configuration. The security execution control configuration is a configuration file that defines the execution permissions, time windows, frequency, and number of concurrent commands for each command in detail.
[0149] Configuration template:
[0150] {
[0151] "User 1": [
[0152] {
[0153] "cmd": "Subcommand 1",
[0154] "time_window": "Time Window 1",
[0155] "frequency": "Frequency 1",
[0156] "max_concurrency": concurrency 1
[0157] },
[0158] {
[0159] "cmd": "Subcommand 2",
[0160] "time_window": "Time Window 2",
[0161] "frequency": "Frequency 2",
[0162] "max_concurrency": concurrency 2
[0163] }
[0164] ],
[0165] "User 2": [
[0166] {
[0167] "cmd": "Subcommand 3",
[0168] "time_window": "Time Window 3",
[0169] "frequency": "Frequency 3",
[0170] "max_concurrency": concurrency 3
[0171] },
[0172] {
[0173] "cmd": "Subcommand 4",
[0174] "time_window": "Time Window 4",
[0175] "frequency": "Frequency 4",
[0176] "max_concurrency": concurrency 4
[0177] } ]
[0179] }
[0180] The specific configuration information is explained as follows:
[0181] User: Align with system user. If not set, default is unlimited.
[0182] cmd: business commands configured for secure execution control. For example, there is currently a command similar to Busybox, syskits, which integrates more than 100 commonly used command lines of Busybox, such as cp, ls, rsync, and cat, into a polymorphic binary syskits. It can use syskits ls [options] to execute the ls command, or use ls to softly connect to syskits and directly use ls [options] to execute the ls command.
[0183] time_window: Run time window.
[0184] frequency: operating frequency setting.
[0185] max_concurrency: Concurrency setting.
[0186] Example scenario: In a data center environment, a server needs to perform multiple data backup tasks, which have strict requirements on execution time and resource usage.
[0187] Configuration example: Generate a configuration file named syskits.conf in / etc / on the Linux system to restrict the subcommand permissions of the polymorphic binary syskits.
[0188] {
[0189] "root": [
[0190] {
[0191] "cmd": "rsync",
[0192] "time_window": "00:00-03:00",
[0193] "frequency": "1 / day",
[0194] "max_concurrency": 2
[0195] },
[0196] {
[0197] "cmd": "cp",
[0198] "time_window": "00:00-03:00",
[0199] "frequency": "1 / day",
[0200] "max_concurrency": 10
[0201] } ]
[0203] }
[0204] Step 4: Dynamically check permissions and execute command security control flow as follows Figure 4 shown.
[0205] Before each command is executed, the system dynamically checks whether the current user and system time meet the permissions and conditions set in the configuration file, ensuring that the command execution complies with the preset security policy.
[0206] Step 5: Command execution and security monitoring. The overall process is as follows: Figure 5 shown.
[0207] If the check passes, the command is executed; otherwise, the execution is rejected and the relevant events are recorded. This ensures that the command is executed only under authorized conditions, improving system security and resource utilization efficiency.
[0208] In addition, this example can also be applied in a cloud service provider environment by dynamically adjusting the command execution strategy according to customer needs to adapt to different service level agreements (SLAs).
[0209] For example, the integration of SLA parameters, such as maximum response time and availability requirements, is integrated into the configuration file, so that the command execution strategy can be dynamically adjusted according to the SLAs of different customers.
[0210] For example, AI-based command scheduling optimization uses AI algorithms to analyze historical execution data, optimize command scheduling and resource allocation, so as to improve command execution efficiency, optimize resource utilization, and meet higher service standards.
[0211] Therefore, this example has the following beneficial effects:
[0212] 1. Dynamic permission management
[0213] Dynamic permission management provides higher security and flexibility. It dynamically specifies which user roles can execute specific commands at specific times through configuration files. It can adapt to changing business and security needs, thereby more effectively preventing unauthorized access.
[0214] 2. Time window control
[0215] By limiting the time window for command execution (such as only allowing certain operations to be performed at night or during off-peak hours), the security and performance of the system are significantly improved, the exposure to possible security vulnerabilities during critical periods is reduced, and the use of system resources is optimized.
[0216] 3. Execution frequency and concurrent number limits
[0217] Limiting the number of concurrent command executions prevents overuse of system resources and potential denial of service (DoS) attacks. By limiting the number of concurrent command executions or the frequency of command executions, such as the number of executions per hour or per day, the system can handle requests more smoothly and avoid exhausting resources in a short period of time.
[0218] 4. Parsing and application of configuration files
[0219] Through efficient configuration file parsing and application, fast permission updates and command control are achieved, which greatly reduces the complexity of system maintenance and the possibility of errors, and enables rapid response to changes in permissions and policies.
[0220] 5. Auditing and logging
[0221] Comprehensive auditing and logging capabilities provide detailed tracking and recording of system operations, supporting compliance reviews and security incident investigations.
[0222] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0223] Based on the same inventive concept, the embodiment of the present application also provides a safe operation device for an application program for implementing the safe operation method of the application program involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the safe operation device for one or more applications provided below can refer to the limitations of the safe operation method for the application program above, and will not be repeated here.
[0224] In an exemplary embodiment, Figure 6 As shown, a device for secure operation of an application is provided, comprising: an instruction parsing module 601, an instruction type determination module 602, a first verification module 603, a lower-level instruction acquisition module 604, a second verification module 605 and an instruction execution module 606. Among them:
[0225] The instruction parsing module 601 is used to obtain the current user instruction for the current application, parse the current user instruction, and obtain the first metadata of the current user instruction.
[0226] The instruction type determination module 602 is used to determine the instruction type of the current user instruction according to the first metadata.
[0227] The first verification module 603 is used to perform security verification on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result when the instruction type is a main instruction type.
[0228] The lower-level instruction acquisition module 604 is used to acquire the lower-level sub-instructions of the current user instruction from the first metadata when the first security verification result is verification passed.
[0229] The second verification module 605 is used to perform security verification on the second execution permission of the subordinate sub-instruction based on the second security configuration file to obtain a second security verification result when it is determined that the subordinate sub-instruction is an executable instruction.
[0230] The instruction execution module 606 is used to execute the lower-level sub-instructions to obtain the execution result of the current user instruction when the second security verification result is verification passed.
[0231] In an optional embodiment, the first verification module 603 is also used to obtain a first security configuration file corresponding to the current user instruction; the first security configuration file is configured for the first execution permission of the main instruction type of the current application; the first execution permission of the current user instruction is verified according to the first security configuration file to obtain a first security verification result.
[0232] In an optional embodiment, the first verification module 603 is also used to obtain the first user list of the current application and the first execution permission of the main instruction type corresponding to each first user account in the first user list; the first execution permission includes at least one of the first execution trigger permission, the first execution time window permission, the first execution frequency permission, and the first concurrent execution permission of the first user account for instructions belonging to the main instruction type; based on the first execution permission of each first user account, the first security profile corresponding to the first user account is configured.
[0233] In an optional embodiment, the second verification module 605 is also used to obtain a second security configuration file corresponding to the lower-level sub-instruction; the second security configuration file is configured for the second execution permission of the sub-instruction type of the current application; the second execution permission of the lower-level sub-instruction is verified according to the second security configuration file to obtain a second security verification result.
[0234] In an optional embodiment, the second verification module 605 is also used to obtain the second user list of the current application and the second execution permissions of the sub-instruction type corresponding to each second user account in the second user list; the second execution permissions include at least one of the second execution trigger permissions, second execution time window permissions, second execution frequency permissions, and second concurrent execution permissions of the second user account for instructions belonging to the sub-instruction type; based on the second execution permissions of each second user account, a second security profile corresponding to the second user account is configured.
[0235] In an optional embodiment, the secure operation device of the above-mentioned application also includes a third verification module, which is used to perform security verification on the second execution permission of the current user instruction based on the second security configuration file when the instruction type is a sub-instruction type and the current user instruction is an executable instruction, and obtain a third security verification result; when the third security verification result is that the verification is passed, execute the current user instruction to obtain the execution result of the current user instruction.
[0236] In an optional embodiment, the secure operation device of the above application further includes a first log recording module, which is used to reject the execution of the current user instruction and record a first exception log when the first security verification result is verification failure.
[0237] In an optional embodiment, the safe operation device of the above application further includes a second log recording module, which is used to reject the execution of the lower-level sub-instruction and record a second abnormal log when the second security verification result is verification failure.
[0238] In an optional embodiment, the safe operation device of the above-mentioned application also includes a third log recording module, which is used to alarm the current user instruction and record a third exception log when the instruction type is a sub-instruction type and the current user instruction does not belong to an executable instruction, or the subordinate sub-instruction does not belong to an executable instruction.
[0239] Each module in the above-mentioned application's secure operation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0240] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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 a first security profile, a second security profile, a first user list and a first execution permission of the first user account, a second user list and a second execution permission data of the second user account, various types of log information, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication 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, a method for secure operation of an application is implemented.
[0241] Those skilled in the art will understand that Figure 7 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.
[0242] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method for securely running an application program of the above embodiment is implemented.
[0243] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for securely running the application program of the above embodiment is implemented.
[0244] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for securely running an application program of the above embodiment.
[0245] 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, and the collection, use and processing of relevant data must comply with relevant regulations.
[0246] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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 memory 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), magnetic 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, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0247] 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 application.
[0248] 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 securely running an application, characterized in that: The method comprises: Acquire a current user instruction for a current application, parse the current user instruction, and obtain first metadata of the current user instruction; determining the instruction type of the current user instruction according to the first metadata; When the instruction type is a main instruction type, performing security verification on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result; When the first security verification result is verification passed, obtaining a lower-level sub-instruction of the current user instruction from the first metadata; When it is determined that the lower-level sub-instruction is an executable instruction, a second execution permission of the lower-level sub-instruction is security verified based on a second security configuration file to obtain a second security verification result; When the second security verification result is verification passed, the lower-level sub-instruction is executed to obtain the execution result of the current user instruction.
2. The method according to claim 1, characterized in that: The performing security verification on the first execution permission of the current user instruction based on the first security configuration file to obtain a first security verification result includes: Acquire a first security configuration file corresponding to the current user instruction; the first security configuration file is obtained by configuring a first execution permission of a main instruction type of the current application program; The first execution permission of the current user instruction is verified according to the first security configuration file to obtain a first security verification result.
3. The method according to claim 2, characterized in that Before obtaining the first security configuration file corresponding to the current user instruction, the method further includes: Obtaining a first user list of the current application and a first execution permission of each of the first user accounts in the first user list corresponding to a main instruction type; the first execution permission includes at least one of a first execution trigger permission, a first execution time window permission, a first execution frequency permission, and a first concurrent execution permission for the first user account for instructions belonging to the main instruction type; Based on the first execution permissions of each of the first user accounts, a first security configuration file corresponding to the first user account is configured.
4. The method according to claim 1, characterized in that The performing security verification on the second execution permission of the subordinate sub-instruction based on the second security configuration file to obtain a second security verification result includes: Acquire a second security configuration file corresponding to the lower-level sub-instruction; the second security configuration file is obtained by configuring a second execution permission of the sub-instruction type of the current application; The second execution permission of the subordinate sub-instruction is verified according to the second security configuration file to obtain a second security verification result.
5. The method according to claim 4, characterized in that Before obtaining the second security configuration file corresponding to the lower-level sub-instruction, the method further includes: Obtaining a second user list of the current application and a second execution permission of each sub-instruction type corresponding to each second user account in the second user list; the second execution permission includes at least one of a second execution trigger permission, a second execution time window permission, a second execution frequency permission, and a second concurrent execution permission for the second user account for instructions belonging to the sub-instruction type; Based on the second execution permission of each of the second user accounts, a second security configuration file corresponding to the second user account is configured.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises at least one of the following: When the first security verification result is verification failure, refusing execution of the current user instruction and recording a first exception log; When the second security verification result is verification failure, the execution of the lower-level sub-instruction is rejected and a second exception log is recorded.
7. The method according to any one of claims 1 to 5, further comprising at least one of the following: When the instruction type is a sub-instruction type and the current user instruction belongs to the executable instruction, performing security verification on the second execution permission of the current user instruction based on the second security configuration file to obtain a third security verification result; When the third security verification result is verification passed, executing the current user instruction to obtain the execution result of the current user instruction; When the instruction type is a sub-instruction type and the current user instruction does not belong to the executable instruction, or the lower-level sub-instruction does not belong to the executable instruction, an alarm is issued for the current user instruction and a third abnormal log is recorded.
8. A device for safely running an application program, characterized in that: The device comprises: An instruction parsing module, used to obtain a current user instruction for a current application, parse the current user instruction, and obtain first metadata of the current user instruction; An instruction type determination module, configured to determine the instruction type of the current user instruction according to the first metadata; A first verification module, configured to perform security verification on a first execution permission of the current user instruction based on a first security configuration file to obtain a first security verification result when the instruction type is a main instruction type; A lower-level instruction acquisition module, used for acquiring the lower-level sub-instructions of the current user instruction from the first metadata when the first security verification result is verification passed; A second verification module, configured to, when it is determined that the lower-level sub-instruction is an executable instruction, perform security verification on the second execution permission of the lower-level sub-instruction based on a second security configuration file to obtain a second security verification result; The instruction execution module is used to execute the lower-level sub-instruction and obtain the execution result of the current user instruction when the second security verification result is verification passed.
9. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Robot control method and device, robot device and storage medium
CN108737360A
Permission control method and device, computer equipment and storage medium
CN111259412A
Instruction verification method and device, electronic equipment and storage medium
CN118626324A
System Utilizing a Secure Element
US20130145429A1
Identification and Verification for Provisioning Mobile Application
US20150356560A1
Cited By
Secure running method and apparatus for application program, device, and storage medium
WO2026118843A1