A method for obtaining confidentiality of an application program, an application device and a storage medium
By setting up a secret hosting module in the application device and using multiple versions of authentication standards to authenticate the application process, the problem of the application process being unable to securely obtain confidential information is solved, achieving higher security and flexibility.
Patent Information
- Application Number
- CN201910192781.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-02-10
AI Technical Summary
Confidential information stored in application devices in the prior art is easily decompiled or read by hackers, resulting in an inability to guarantee the security of the application process.
Set up a secret hosting module in the application device. By receiving the secret acquisition request of the application process, obtain its current process number and authentication information, and match them according to the preset authentication standards of multiple versions. Only when the authentication information matches a certain The corresponding confidential information is returned only when the version's authentication standards match.
The security of confidential information is enhanced to ensure that only application processes that have passed identity authentication can obtain confidential information, meeting the needs of different versions of application processes.
Smart Images

Figure CN110414209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method for obtaining confidentiality of an application program, an application device and a storage medium. Background Art
[0002] Multiple applications can be run in an application device (such as an application background). After these applications are started, they are called application processes. The application process will use some important information during operation, such as certificate private keys and other information. These confidential information are generally stored in the storage medium of the application device (such as a disk). The application process will read the confidential information stored in the application device and build it into the application process, so that the application process can perform encryption and decryption operations through the built-in confidential information.
[0003] Since these confidential information are important to the application process, if they are stored in the application device, they can be easily obtained by hackers by decompiling the service program or directly read from the storage medium, making the security of the application process impossible to guarantee. Summary of the invention
[0004] The embodiment of the present invention provides a method for obtaining confidentiality of an application program, an application device and a storage medium, which realizes returning confidential information to the application process after the identity authentication of the application process is passed according to the authentication standards of multiple versions of the application.
[0005] A first aspect of an embodiment of the present invention provides a method for obtaining confidentiality of an application program, comprising:
[0006] Receiving a confidentiality acquisition request sent by an application process, wherein the confidentiality acquisition request is used to request to obtain confidential information of the application process;
[0007] According to the secret acquisition request, obtain the current process ID of the application process;
[0008] Acquire authentication information of the application process according to the current process number of the application process;
[0009] If multiple versions of authentication standards corresponding to the application process are preset, the authentication information of the application process is matched with the authentication standard of each version respectively;
[0010] If the authentication information of the application process matches a certain version of the authentication standard, the confidential information of the certain version of the application process is returned to the application process.
[0011] A second aspect of an embodiment of the present invention provides an application device, including a secret hosting module and at least one application process; the secret hosting module includes:
[0012] A request receiving unit, used to receive a confidentiality acquisition request sent by an application process, wherein the confidentiality acquisition request is used to request to obtain confidential information of the application process;
[0013] A process number unit, used to obtain the current process number of the application process according to the secret acquisition request;
[0014] An authentication acquisition unit, used to acquire authentication information of the application process according to the current process number of the application process;
[0015] A matching unit, configured to match the authentication information of the application process with the authentication standard of each version respectively if multiple authentication standards of versions of the application corresponding to the application process are preset;
[0016] The confidentiality returning unit is used to return the confidentiality information of a certain version of the application process to the application process if the authentication information of the application process matches the authentication standard of a certain version.
[0017] A third aspect of an embodiment of the present invention provides a storage medium, which stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method for obtaining confidentiality of an application as described in the first aspect of the embodiment of the present invention.
[0018] A fourth aspect of an embodiment of the present invention provides a server, including a processor and a storage medium, wherein the processor is used to implement various instructions;
[0019] The storage medium is used to store a plurality of instructions, and the instructions are used by a processor to load and execute the method for obtaining secrets of an application program as described in the first aspect of an embodiment of the present invention.
[0020] It can be seen that in this embodiment, a secret trust module is set in the application device. When the secret trust module receives the secret acquisition request of the application process, it will obtain the current process number of the application process according to the secret acquisition request, and then obtain the authentication information of the application process, and match the authentication information of the application process with the preset authentication standards of each version. If the authentication information of the application process matches the authentication standard of a certain version, the confidential information of the application process of that version will be returned to the application process. In this way, the application process cannot directly read the confidential information in the secret trust module. The application process needs to initiate a request, and the secret trust module can only obtain the confidential information after the identity authentication of the application process is passed according to the authentication standard, which enhances the security of obtaining confidential information; and because multiple versions of authentication standards are preset in the secret trust module, the needs of different versions of application processes to obtain confidential information can be met. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 is a schematic diagram of an application device to which a method for obtaining confidentiality of an application program provided by an embodiment of the present invention is applied;
[0023] Figure 2 is a flow chart of a method for obtaining confidentiality of an application program provided by an embodiment of the present invention;
[0024] Figure 3 It is a flow chart of a method for obtaining confidentiality of an application program provided by an application embodiment of the present invention;
[0025] Figure 4 It is a flow chart of another method for obtaining secrets of an application program provided by an application embodiment of the present invention;
[0026] Figure 5 is a structural schematic diagram of an application device provided by an embodiment of the present invention;
[0027] Figure 6 It is a structural diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] The embodiment of the present invention provides a method for obtaining confidentiality of an application program, which can be mainly applied to Figure 1 In an application device, the application device may include a confidentiality trusteeship module and at least one application process (n are used as an example in the figure), wherein the application process corresponds to the application program, and the application program is code information for implementing a certain function, etc., which is static description information. The application device can start an application process to load an application program, so that the application process can implement the corresponding function; the confidentiality trusteeship module is used to manage the authentication standards for authenticating each application process, and manage the confidential information required by each application process.
[0031] In the embodiment of the present invention, the secret trusteeship module can implement secret acquisition of the application process according to the following steps:
[0032] Receive a confidentiality acquisition request sent by an application process, wherein the confidentiality acquisition request is used to request confidential information of the application process; obtain the current process number of the application process according to the confidentiality acquisition request; obtain authentication information of the application process according to the current process number of the application process; if multiple versions of authentication standards corresponding to the application process are preset, match the authentication information of the application process with each version of the authentication standard respectively; if the authentication information of the application process matches a certain version of the authentication standard, return the confidential information of the certain version of the application process to the application process.
[0033] It should be noted that the confidentiality management module in the application device is a module with a higher security level. A user with higher authority (such as the root user) is required to start the confidentiality trusteeship module by operating the application device. The confidential information of each application is stored in the confidentiality trusteeship module; while the general application process can be started by a general user with lower authority by operating the application device. When the confidentiality trusteeship module is started, the application process running in the application device cannot directly read the corresponding confidential information, but needs to obtain the confidential information through the process of this embodiment, that is, to obtain the confidential information by sending a confidentiality acquisition request to the confidentiality trusteeship module. In this way, the security of the confidential information during the acquisition process can be guaranteed.
[0034] Furthermore, the embodiment of the present invention also includes a confidentiality server for sending the authentication standards and confidentiality information of each version of each application to the confidentiality hosting module for storage. And the application device in this embodiment can be an application background, etc.
[0035] In this way, the application process cannot directly read the confidential information in the secret hosting module. The application process needs to initiate a request, and the secret hosting module can only obtain the confidential information after the application process has passed the identity authentication according to the authentication standard, thereby enhancing the security of obtaining confidential information. Moreover, since multiple versions of authentication standards are pre-set in the secret hosting module, the needs of different versions of application processes to obtain confidential information can be met.
[0036] The embodiment of the present invention provides a method for obtaining secrets of an application program, which is mainly a method executed by a secret trustee module in an application device. The flow chart is as follows: Figure 2 As shown, including:
[0037] Step 101: receiving a confidentiality acquisition request sent by an application process, where the confidentiality acquisition request is used to request to acquire confidential information of the application process.
[0038] It can be understood that any application process in the application device can initiate the process of this embodiment when it needs to use confidential information. Specifically, the application process will send a confidentiality acquisition request to the confidentiality hosting module, and the confidentiality acquisition request may include identification information (such as name) of the application corresponding to the application process. Among them, confidential information may include information with a higher security level such as certificates and keys of the application process.
[0039] When the application device starts different application processes, the process number allocated to each application process is different; each time the same application process is started, the process number allocated to the application process is also different.
[0040] Step 102: Obtain the current process ID of the application process according to the confidentiality acquisition request.
[0041] When the secret hosting module receives the secret acquisition request, it will first obtain the current process number assigned by the application device to the application process. Specifically, in one case, when the application process sends the secret acquisition request to the secret hosting module, it will first establish a connection with the secret hosting module, and send the secret acquisition request to the secret hosting module through the connection; in this way, the secret hosting module can directly obtain the current process number of the application process that has established the above connection with the secret hosting module. Specifically, the secret hosting module can obtain the current process number of the application process by calling some system functions.
[0042] Among them, if there are multiple application processes connected to the secret hosting module respectively, and each application process corresponds to a connection, then the secret hosting module can obtain the current process numbers of the multiple application processes, and each current process number corresponds to a connection.
[0043] It can be seen that in the process of obtaining the current process number, the current process number is not directly carried in the information transmitted between the application process and the confidentiality hosting module, which ensures the security of obtaining the current process number.
[0044] In another case, the secret hosting module cannot obtain the current process number of the application process connected to the secret hosting module. When obtaining the current process number, the secret hosting module will first generate a random file based on the secret acquisition request, and send the path of the random file to the application process, so that the application process can open the random file according to the path of the random file; in this way, the secret hosting module can obtain the current process number of the application process that opens the random file. Specifically, the secret hosting module can call some system functions to obtain the current process number of the application process that opens the random file.
[0045] Among them, an application process will not open any file at will, and will only open a random file through the triggering of the confidential hosting module. Among them, the random file can be in any format, such as a word file, etc.; the name of the random file can include any factors, such as numbers, current timestamps, globally unique identifiers (Globally Unique Identifier, GUID), the name of the application process, or hash values of some or all fields in the name of the application process and other random information that cannot be predicted in advance. The path of the random file refers to the search path of the random file in the file system of the application device. In this way, the information of the random file is not easily known by other devices, and it can be ensured that the "open file" command executed by the application process can only be sent by the confidential hosting module, ensuring the security of the confidential hosting module obtaining the current process number of the application process.
[0046] Step 103: Acquire authentication information of the application process according to the current process ID of the application process.
[0047] Here, the authentication information of the application process is information used to authenticate the identity of the application process. Specifically, the secret trusteeship module can obtain at least one of the following information: the absolute path of the application process, the signature information of the executable file of the application process, the system user name that starts the application process, the path of the library file loaded by the application process, the signature information of the library file loaded by the application process, and the command that starts the application process. Among them, the absolute path of the application process refers to the complete path of the executable file of the application process, and the executable file refers to the code file information used to implement the corresponding application function.
[0048] It should be noted that when the secret hosting module obtains the authentication information of the application process, it can directly obtain the information of the above-mentioned multiple parameters; or, it can obtain the authentication information of the application process according to the parameter value in the authentication standard of the application preset in the secret hosting module. For example, if the authentication standard of the application process includes the parameter value of parameter a, then the secret hosting module needs to obtain the information of the application process based on the parameter a.
[0049] Step 104, if the authentication standards of multiple versions of the application corresponding to the above-mentioned application process are preset in the confidentiality hosting module, the authentication information of the above-mentioned application process is matched with the authentication standards of each version respectively. If the authentication information of the application process matches the authentication standards of a certain version respectively, step 105 is executed; if the authentication information of the application process does not match the authentication standards of each version, the confidential information of the application process will not be returned, and the process will be terminated.
[0050] It can be understood that since each application can include multiple versions, for example, a WeChat application running in the background can correspond to a newly released version of the WeChat application and an old version of the WeChat application, etc., then in this embodiment, the confidentiality hosting module can store one or more versions (i.e., at least one version) of authentication standards for an application, and the authentication standards of each version may include the parameter value of at least one parameter.
[0051] Any two versions of the authentication standard may include parameter values of the same or different parameters, for example, the authentication standard of version 1 includes parameter values corresponding to parameter 1 and parameter 2, respectively, while the authentication standard of version 2 only includes the parameter value of parameter 2. It can be understood that the more parameter values included in the authentication standard, the more secure the authentication of the above-mentioned confidential acquisition request.
[0052] During the matching process, the secret hosting module matches the information of each parameter in the authentication information of the application process with the parameter values of the corresponding parameters in each version of the authentication standard. For example, if the authentication information of the application process is the information of parameter a, then during the matching process, it is necessary to match the information of parameter a in the authentication information of the application process with the parameter value of parameter a in each version of the authentication standard.
[0053] The authentication information of the application process and the authentication standard can be matched completely, that is, each field in the information of a parameter in the authentication information of the application process is matched with each field in the information of the parameter in the authentication standard. For example, if the system user name of the application process in the authentication information is 123, the authentication information and the authentication standard can be matched completely only when the system user name of the application process in the authentication standard is 123.
[0054] The match between the authentication information of the application process and the authentication standard may also be an incomplete match, such as a regular expression match. Specifically, the information of a parameter in the authentication information is first processed in a certain manner to obtain the first information, and the information of the parameter in the authentication standard is processed in a certain manner to obtain the second information, and then the first information is matched with the second information. For example, an important field in the absolute path of the application process in the authentication information is intercepted, and the field in the absolute path of the application process in the authentication standard is intercepted, and the two intercepted fields are compared. If the two fields are the same, the authentication information and the authentication standard match. It can be understood that the above-mentioned processing of the parameter information in a certain manner can be intercepting a field or other processing, which is not limited here.
[0055] Step 105: Return the confidential information of a certain version of the application process to the application process.
[0056] For example, the authentication standards for the application corresponding to the application process preset in the secret hosting module are: authentication standards for version 1, authentication standards for version 2, ..., authentication standards for version n. When matching, the secret hosting module will first match the authentication information of the application process with the corresponding parameter values in the authentication standard of version 1. If each authentication information matches the corresponding parameter value in the authentication standard of version 1, the secret hosting module will return the secret information of version 1 of the application process; if a certain authentication information does not match the corresponding parameter value in the authentication standard of version 1, the secret hosting module will continue to match the authentication information of the application process with the corresponding parameter value in the authentication standard of version 2. If a certain authentication information does not match the corresponding parameter value in the authentication standard of version 2, the secret hosting module will continue to match the authentication information of the application process with the corresponding parameter value in the authentication standard of version 3. The operation will be repeated until a certain version of the authentication standard that matches each authentication information is matched, or until all n versions of the authentication standards are matched.
[0057] Furthermore, if the secret hosting module is preset with an authentication standard of a version of the application corresponding to the above-mentioned application process, the secret hosting module will match the authentication information of the application process with the authentication standard of a version. If the authentication information matches the authentication standard of a version, the confidential information of that version will be returned to the application process; if a certain authentication information does not match the authentication standard of a version, the confidential information of that version will not be returned.
[0058] It should be further explained that the authentication standards of each version preset in the secret hosting module are obtained from the secret server. Specifically, the secret hosting module will passively receive the authentication standards and confidential information of each version of the above application sent by the secret server; and store the corresponding relationship between the authentication standards of each version of the application, the confidential information and the identification information of the application, thereby realizing the preset of the authentication standards in the secret hosting module.
[0059] It can be seen that in this embodiment, a secret trust module is set in the application device. When the secret trust module receives the secret acquisition request of the application process, it will obtain the current process number of the application process according to the secret acquisition request, and then obtain the authentication information of the application process, and match the authentication information of the application process with the preset authentication standards of each version. If the authentication information of the application process matches the authentication standard of a certain version, the confidential information of the application process of that version will be returned to the application process. In this way, the application process cannot directly read the confidential information in the secret trust module. The application process needs to initiate a request, and the secret trust module can only obtain the confidential information after the identity authentication of the application process is passed according to the authentication standard, which enhances the security of obtaining confidential information; and because multiple versions of authentication standards are preset in the secret trust module, the needs of different versions of application processes to obtain confidential information can be met.
[0060] The following is a specific application example to illustrate the confidentiality acquisition method of the application program in the present invention. The method of this embodiment can be applied as follows: Figure 1 In the application device shown, specifically, Figure 3 and Figure 4 As shown, the method of this embodiment includes the following steps:
[0061] In step 201, a user (such as a root user) who obtains permission to the secret hosting module starts the secret hosting module by operating the application device. In this way, each application process running on the application device can send a secret acquisition request to the secret hosting module when confidential information is needed. The secret acquisition request can include information such as the name of the application corresponding to the application process.
[0062] Step 202: After receiving the secret acquisition request, the secret trusteeship module acquires the current process ID (Process Identity, PID) of the application process according to the secret acquisition request.
[0063] refer to Figure 3As shown, in one case, for example, when the operating system of the application device is a Linux system, the secret hosting module can establish a Linux domain socket (UNIX Domain Socket) service, so that the application process can connect to the Linux domain socket service of the secret hosting module, and through the connection with the Linux domain socket service, send a secret acquisition request to the secret hosting module, and the secret acquisition request can include information such as the name of the application.
[0064] In this way, after receiving the secret acquisition request, the secret hosting module can directly obtain the current process number of the application process that establishes the above connection. Specifically, the secret hosting module can obtain the current PID of the application process by calling the getsockopt function.
[0065] refer to Figure 4 As shown, in another case, for example, when the operating system of the application device is a non-Unix system, the secret hosting module will only establish a normal socket service, so that the application process can connect to the normal socket service of the secret hosting module, and the name of the application can be included in the secret acquisition request initiated to the secret hosting module; in this way, the secret hosting module will generate a random file according to the secret acquisition request, and send the path of the random file to the application process, which is called a "file challenge"; after receiving the path of the random file, the application process will accept the "file challenge" and open the random file according to the path of the random file, and then return the information that the "file challenge" has been completed to the secret hosting module; and the secret hosting module will check the application process that is currently accessing the random file, and obtain the current PID of the application process that is accessing the random file. Specifically, certain system functions can be called to obtain the current PID of the application process.
[0066] Step 203: The confidentiality trusteeship module obtains authentication information of the application process according to the current PID of the application process, which may specifically include but is not limited to at least one of the following information:
[0067] The absolute path of the application process, the signature information of the executable file of the application process, the system username that starts the application process, the path of the library file loaded by the application process, the signature information of the library file loaded by the application process, and the command that starts the application process.
[0068] The absolute path of the application process can be obtained by opening the / proc / [pid] / exe file and then finding the complete path of the executable file of the application process by reading the link (readlink).
[0069] The signature information of the executable file of the application process may be a message digest algorithm (Message-Digest Algorithm, MD5) of the executable file or a hash value of the executable file.
[0070] The system user name that starts the application process can be obtained by opening the / proc / [pid] / status file and then using the getpwuid method.
[0071] The path of the library files (part or all of the library files) recorded by the application process can be obtained by opening the / proc / [pid] / numa_maps file and reading from the opened file to obtain the complete path of all library files.
[0072] The command to start the application process can be obtained by opening / proc / [pid] / cmdline.
[0073] Step 204: The secret hosting module may search for the authentication standards of each version corresponding to the application in the secret hosting module according to the name of the application in the secret acquisition request. The authentication standards of each version may include, but are not limited to, the parameter value of at least one of the following parameters:
[0074] The absolute path of the application process, the signature information of the executable file of the application process, the system user name that starts the application process, the path of the library file loaded by the application process, the signature information of the library file loaded by the application process, and the command that starts the application process, etc.
[0075] In step 205, the confidentiality trust module will match the information of each parameter in the above authentication information with the corresponding parameter values in each version of the authentication standard. If the information of each parameter in the authentication information matches the corresponding parameter values in a certain version of the authentication standard, the confidentiality information of that version will be returned to the application process.
[0076] The present invention also provides an application device, the structural diagram of which is shown in FIG. Figure 5 As shown, it may specifically include: a confidentiality trust module 100 and at least one application process 110 ( Figure 5 The confidentiality trust module 100 includes:
[0077] The request receiving unit 10 is used to receive a confidentiality acquisition request sent by the application process 110 , where the confidentiality acquisition request is used to request to obtain confidential information of the application process 110 .
[0078] The process number unit 11 is used to obtain the current process number of the application process 110 according to the confidentiality acquisition request received by the request receiving unit 10.
[0079] The process number unit 11 is specifically used to generate a random file according to the confidentiality acquisition request; send the path of the random file to the application process so that the application process 110 opens the random file according to the path of the random file; and obtain the current process number of the application process 110 that opens the random file.
[0080] Alternatively, the process number unit 11 is specifically used to directly obtain the current process number of the application process that establishes the connection if the request receiving unit 10 first establishes a connection with the application process when receiving a confidentiality acquisition request, and receives the confidentiality acquisition request sent by the application process through the connection.
[0081] The authentication acquisition unit 12 is used to acquire authentication information of the application process 110 according to the current process number of the application process 110 acquired by the process number unit 11 .
[0082] The authentication information of the application process 110 includes but is not limited to at least one of the following information: the full path of the application process, the signature information of the executable file of the application process, the system user name that starts the application process, the path of the library file loaded by the application process, the signature information of the library file loaded by the application process, and the command that starts the application process, etc.
[0083] A matching unit 13 is used to match the authentication information of the application process obtained by the authentication obtaining unit 12 with the authentication standard of each version respectively if multiple versions of authentication standards corresponding to the application process are preset;
[0084] The confidentiality returning unit 14 is configured to return the confidentiality information of a certain version of the application process to the application process if the authentication information of the application process matched by the matching unit 13 matches an authentication standard of a certain version.
[0085] Furthermore, the matching unit 13 is also used to match the authentication information of the application process with the authentication standard of a version of the application corresponding to the application process if an authentication standard of the version is preset; and the confidential return unit 14 is also used to return the confidential information of the version to the application process if the authentication information matches the authentication standard of the version.
[0086] Furthermore, the secret trusteeship module 100 may also include: a presetting unit 15, which is used to receive the authentication standards and secret information of each version of the application sent by the secret server; and store the corresponding relationship between the authentication standards and secret information of each version of the application and the identification information of the application. In this way, the matching unit 13 will match the authentication standards preset in the presetting unit 15 with the authentication information; and the secret return unit 14 will return the secret information preset in the presetting unit 15 to the application process.
[0087] It can be seen that a secret trusteeship module 100 is set in the application device of this embodiment. When the request receiving unit 10 in the secret trusteeship module 100 receives the secret acquisition request of the application process 110, the process number unit 11 obtains the current process number of the application process according to the secret acquisition request, and then the authentication acquisition unit 12 obtains the authentication information of the application process, and the matching unit 13 matches the authentication information of the application process with the preset authentication standards of each version. If the authentication information of the application process matches the authentication standard of a certain version, the secret return unit 14 returns the secret information of the application process of this version to the application process. In this way, the application process cannot directly read the confidential information in the secret trusteeship module. The application process needs to initiate a request, and the secret trusteeship module can only obtain the confidential information after the identity authentication of the application process is passed according to the authentication standard, which enhances the security of obtaining confidential information; and because multiple versions of authentication standards are preset in the secret trusteeship module, the needs of different versions of application processes to obtain confidential information can be met.
[0088] The embodiment of the present invention further provides a server, the structural diagram of which is shown in Figure 6 As shown, the server may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 20 (for example, one or more processors) and memory 21, and one or more storage media 22 (for example, one or more mass storage devices) storing application programs 221 or data 222. Among them, the memory 21 and the storage medium 22 can be short-term storage or permanent storage. The program stored in the storage medium 22 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 20 can be configured to communicate with the storage medium 22 and execute a series of instruction operations in the storage medium 22 on the server.
[0089] Specifically, the application 221 stored in the storage medium 22 includes a secret acquisition application, and the program may include the request receiving unit 10, the process number unit 11, the authentication acquisition unit 12, the matching unit 13, the secret return unit 14 and the preset unit 15 in the secret hosting module 100 of the above-mentioned application device, which will not be repeated here. Furthermore, the central processor 20 can be configured to communicate with the storage medium 22 and execute a series of operations corresponding to the secret acquisition application stored in the storage medium 22 on the terminal device. And the central processor 20 in the server can realize the function of the application 221 by starting an application process, and the application process can interact with the application process corresponding to the secret acquisition application to obtain the corresponding confidential information.
[0090] The server may also include one or more power supplies 23, one or more wired or wireless network interfaces 24, and / or one or more operating systems 223, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0091] The steps performed by the confidentiality trust module in the application device in the above method embodiment can be based on the Figure 6 The structure of the server is shown.
[0092] An embodiment of the present invention further provides a storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing a method for obtaining secrets of an application program executed by a secret hosting module in the above-mentioned application device.
[0093] An embodiment of the present invention also provides a server, including a processor and a storage medium, wherein the processor is used to implement various instructions; the storage medium is used to store multiple instructions, and the instructions are used by the processor to load and execute a method for obtaining secrets of an application program executed by a secret hosting module in the above-mentioned application device.
[0094] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0095] The above is a detailed introduction to the confidentiality acquisition method, application device and storage medium of the application provided in the embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for obtaining confidentiality of an application, characterized in that: include: Starting a secret trusteeship module, the secret trusteeship module receives a secret acquisition request sent by an application process, the secret acquisition request is used to request to obtain the secret information of the application process; The confidential information is the confidential information required when the application process is running; Generate a random file according to the confidentiality acquisition request; The confidentiality trusteeship module sends the path of the random file to the application process, so as to trigger the application process to open the random file according to the path of the random file; Obtain the current process ID of the application process that opens the random file; Acquire authentication information of the application process according to the current process number of the application process; The secret trust module stores the authentication standards and secret information of each version of the application corresponding to the application process, and if multiple authentication standards of the application corresponding to the application process are preset, matches the authentication information of the application process with the authentication standard of each version respectively; If the authentication information of the application process matches a certain version of the authentication standard, the confidential information of the certain version of the application process is returned to the application process.
2. The method according to claim 1, characterized in that The receiving the secret acquisition request sent by the application process specifically includes: establishing a connection with the application process, and receiving the secret acquisition request sent by the application process through the connection; The obtaining of the current process number of the application process according to the confidentiality obtaining request specifically includes: obtaining the current process number of the application process that establishes the connection.
3. The method according to any one of claims 1 to 2, characterized in that: The authentication information of the application process includes at least one of the following information: The absolute path of the application process, the signature information of the executable file of the application process, the system username that starts the application process, the path of the library file loaded by the application process, the signature information of the library file loaded by the application process, and the command that starts the application process.
4. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: If a certification standard of a version of the application corresponding to the application process is preset, matching the certification information of the application process with the certification standard of the version; If the authentication information matches the authentication criteria of the one version, the confidential information of the version is returned to the application process.
5. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: receiving authentication standards and confidential information of each version of the application sent by a confidentiality server; The authentication standards and confidential information of each version of the application are stored, and the corresponding relationship with the identification information of the application.
6. An application device, characterized in that: including a confidentiality hosting module and at least one application process; The confidentiality trust module includes: A request receiving unit, used to receive a confidentiality acquisition request sent by an application process, wherein the confidentiality acquisition request is used to request to obtain confidential information of the application process; the confidential information is confidential information required when the application process is running; The process number unit is used to generate a random file according to the secret acquisition request; the secret hosting module sends the path of the random file to the application process so as to trigger the application process to open the random file according to the path of the random file; and obtain the current process number of the application process that opens the random file; An authentication acquisition unit, used to acquire authentication information of the application process according to the current process number of the application process; A matching unit, configured to store the authentication standards and confidential information of each version of the application corresponding to the application process in the confidential hosting module, and if authentication standards of multiple versions of the application corresponding to the application process are preset, to match the authentication information of the application process with the authentication standards of each version respectively; The confidentiality returning unit is used to return the confidentiality information of a certain version of the application process to the application process if the authentication information of the application process matches the authentication standard of a certain version.
7. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method for obtaining secrets of an application program as described in any one of claims 1 to 5.
8. A server, characterized in that: It includes a processor and a storage medium, wherein the processor is used to implement various instructions; The storage medium is used to store a plurality of instructions, and the instructions are used to be loaded by a processor and execute the method for obtaining secrets of an application program as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Confidential file protection method
CN101273366A
