A confidentiality conflict detection method based on path conversion

Through the confidentiality conflict detection method based on path conversion, the access relationship of the subject and object types in the SELinux system is detected, which solves the problem of insufficient attention to confidentiality model abstraction and policy conversion rules in the existing technology, and realizes the confidentiality conflict in the system. Improved flexibility in detection and security policies.

CN115081013BActive Publication Date: 2024-09-20HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210594243.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-09-20
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

The confidentiality model in the existing SELinux system is too abstract, unable to detect specific confidentiality conflict rules, and pays little attention to the policy conversion rules within the system. As a result, untrusted subjects may access confidential files through type conversion, reducing system security.

Method used

A confidentiality conflict detection method based on path conversion is adopted to detect conflicts between subject and object types in the system through system policy information extraction, type direct conversion set construction, type conversion path set construction, type access control space construction and confidentiality conflict detection steps. Access relationships and identify rules that may violate confidentiality.

Benefits of technology

It provides a semi-automatic confidentiality conflict rule detection method, improves the system's security policy readability and confidentiality detection efficiency, enhances the system's flexibility and security, and prevents information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081013B
    Figure CN115081013B
Patent Text Reader

Abstract

The present invention discloses a confidentiality conflict detection method based on path conversion. The present invention mainly focuses on the realization of the two characteristics of "rule detection" and "confidentiality conflict detection", and is designed from two aspects: policy information extraction in the system and confidentiality detection based on path conversion. Policy information extraction mainly summarizes and organizes the relevant information in the system according to the definition of relevant elements in the system in the security policy source file in SELinux, and gives the relationship between various information elements in the system. Path-based confidentiality detection mainly detects the type_transition rule in the TE rule in the system, obtains different types of conversion methods in the system, and then combines the allow and other rules in the system, according to the basic security idea of ​​no up-read and no down-write proposed by the BLP model, determines the relevant rules in the system that may destroy the confidentiality of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of SELinux system security, and in particular relates to a confidentiality conflict detection method based on path conversion. Background Art

[0002] As the manager of various resources in the computer system, the operating system directly determines whether the information in the system is safe. Only when the operating system can run safely can the security of various information and other resources in the system be guaranteed. SELinux is a security-enhanced Linux operating system that changes the security policy of autonomous access control in the Linux system, strengthens the restrictions on access control in the system, and proposes a mandatory access control policy.

[0003] In the past information security field, the research on operating system security mainly focused on multi-level security. Multi-level security limits the access between entities by assigning different security levels to entities within the system, thereby ensuring the security of the operating system. Currently, the research on multi-level security is mainly divided into two directions, confidentiality and integrity. At present, domestic and foreign scholars' research on computer system confidentiality mainly focuses on the following aspects:

[0004] (1) Realize the combination of confidentiality model and integrity model in the multi-level security model. The confidentiality model is used to protect the information in the system from being leaked, such as the BLP (Bell-Lapadula) model, and the integrity model is used to protect the information in the system from being polluted by external information, such as the Biba model. The basic ideas of these two models are diametrically opposed. If the two access control models are simply combined, the availability of the operating system will be greatly reduced and cannot be used in real systems.

[0005] (2) Reduce the restrictions of the security policy of "no read-up and no write-down". In actual systems, if the security policy of the BLP model is strictly followed, the information in the system can only flow from low-level to high-level, which will also reduce the practicality of the system. Bell later introduced the concept of trusted subjects. For a trusted subject, when the system is under necessary conditions, it can not comply with the security policy of "no read-up and no write-down" to a certain extent. However, these trusted subjects are not subject to access control constraints when they are set, resulting in their access rights being out of control, which is very likely to lead to the risk of information leakage. However, the article does not provide a corresponding solution to this problem.

[0006] (3) Dynamically adjust the security level of the BLP model. The BLP model's calm principle stipulates that the subject and object in the system must maintain a static and unchangeable sensitive label during their operation cycle. However, in actual systems, as the system runs, the security level of most information resources will be reduced to a certain extent. In this way, when some subjects in the system access objects with a reduced security level, the system may deny the access, but in fact the security level of the object no longer needs to be maintained at the original level. Therefore, if the security level of the subject and object in the system is simply defined without dynamic adjustment, the flexibility of the system will be greatly reduced.

[0007] It can be seen that the current confidentiality model mainly faces the following problems:

[0008] (1) The model is too abstract and cannot detect specific confidentiality conflict rules in the SELinux system

[0009] (2) Currently, most models focus on the direct access relationship between subjects and objects in the system, and pay less attention to the policy conversion rules in the system. This leads to untrusted subjects accessing confidential files in the system through type conversion. Summary of the invention

[0010] The purpose of the present invention is to provide a confidentiality conflict detection method based on path conversion.

[0011] The purpose of the present invention is achieved through the following technical solutions:

[0012] A confidentiality conflict detection method based on path conversion comprises the following steps:

[0013] Step 1: Extract system policy information;

[0014] Step 2: Based on step 1, confidentiality detection based on path conversion;

[0015] Step 2.1: Construction of type direct conversion collection;

[0016] Step 2.2: Construction of type conversion collection;

[0017] Step 2.3: Construction of type conversion path set;

[0018] Step 2.4: Construction of type access control space;

[0019] Step 2.5: Confidentiality violation detection.

[0020] Furthermore, step 1 is to traverse the rules related to defining users, roles, types, and attributes in the system, and then add the information elements in the system to the corresponding set according to the type of the attribute.

[0021] Furthermore, the specific steps of step 2 are as follows:

[0022] Step 2.1: Construction of type direct conversion collection

[0023] Set T is the set of all types of elements in the system. First, read the elements in set T one by one, and then obtain the direct conversion type space of different types according to the type conversion rules in the system;

[0024] Detect the type conversion rules related to type t0 in the system, and according to these rules, obtain the types that t0 can be directly converted to, forming a set T of direct conversion types of t0 d (t0); for types t1, t2, ..., t n Perform the same operation to obtain the corresponding direct conversion type set T d (t1), T d (t2),......,T d (t n ); These direct conversion type sets constitute the direct conversion type space in the current system;

[0025] Step 2.2: Construction of type conversion collection

[0026] Use the form of a list to count the types that t0 can convert. First, obtain the set T d The first element t1 in (t0) is placed at the first item of the list. The type conversion rules related to t1 in the system are traversed. According to these rules, the types directly converted from t1 are obtained. These types are compared with the elements in the original list one by one. If they are the same, they are deleted. If they are different, the type is added to the bottom of the list. This continues until no new elements are added to the current list and the list is traversed. All elements in the list constitute the type conversion set T of type t0. a (t0); Perform the same operation on all elements in the direct conversion type space Td to obtain the type conversion space T of all types in the current system a ;

[0027] Step 2.3: Constructing the type conversion path collection

[0028] First obtain the set T d The first element t1 in (t0) is placed at the first item of the list, and the direct type transfer set T of type t0 is traversed d (t0), respectively transfer type t0 and its direct type set T d All the paths in (t0) constitute direct conversion paths. These transfer paths are added to the access path set D of type t0. t(t0), then traverse the type conversion rules related to t1 in the system, and according to these rules, obtain the types directly converted from t1, and compare these types with the elements in the original list one by one. If they are the same, delete them, and if they are different, add the type to the bottom of the list; continue the cycle, and when all the elements in the list have been checked, get the access path set D of type t0 t (t0); After the traversal of the elements in the type set T in the current system is completed, the access path space of all types in the current system is obtained; each access path node is a type, and the conversion path is restricted by restricting the intermediate nodes, thereby restricting the subject's access method to the object;

[0029] Step 2.4: Construction of type access control space

[0030] After traversing all allow rules and auditallow rules in the system, the relevant object types, object categories and permissions recorded in these rules are added to the type access control set M(t0) of type t0. Then, all neverallow rules and dontaudit rules in the current system are traversed, and the relevant object types, object categories and permissions recorded in these rules are deleted from the type access control set M(t0) of type t0. When the type access control set T of type t0 is a After all elements in (t0) are traversed, the access control set of the determined type t0 can be obtained; after traversing the elements in the type access control space in the current system, the type access control space M is obtained;

[0031] Step 2.5: Confidentiality Violation Detection

[0032] First, take any type t0 in T, construct the access control set M(t0) of type t0, and judge the access relationship between the subject and object types, which are the following three types:

[0033] (1) Type t0 is a trusted type, and there is an object type in the access control set of type t0 that is an untrusted type, and the access of type t0 to the object type is a write-related operation;

[0034] (2) Type t0 is an untrusted type. In the access control set of type t0, there is an object type that is a trusted type, and type t0's access to the object type is a read-related operation. In this case, the allow rule or auditallow rule that allows this access right needs to be added to the violation set B.

[0035] (3) If the access relationships between all subject and object types in the system do not belong to (1) and (2), there is no confidentiality conflict in the current system and the current system is in a secure state.

[0036] The beneficial effects of the present invention are:

[0037] The purpose of the present invention is to solve the problem of poor readability of security policies in existing SELinux systems, provide semi-automatic detection of confidentiality conflict rules, and provide a convenient and fast detection method for further strengthening system confidentiality. Mainly focusing on the realization of the two characteristics of "rule detection" and "confidentiality conflict detection", the design is carried out from two aspects: policy information extraction in the system and confidentiality detection based on path conversion. Policy information extraction is mainly based on the definition of relevant elements in the system by the security policy source file in SELinux, and the relevant information in the system is summarized and sorted, and the relationship between various information elements in the system is given. Path-based confidentiality detection is mainly carried out by detecting the type_transition rule in the TE rule in the system, obtaining different types of conversion methods in the system, and then combining the allow and other rules in the system, according to the basic security idea of ​​no read-up and no write-down proposed by the BLP model, determining the relevant rules in the system that may destroy the confidentiality of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A data flow framework diagram in the confidentiality detection model based on path conversion of the present invention;

[0039] Figure 2 All rules related to user definitions in the system of the present invention;

[0040] Figure 3 The confidentiality detection model based on path conversion of the present invention detects the user in the system;

[0041] Figure 4 The detection result of the relationship between users and roles in the system of the present invention;

[0042] Figure 5 The detection result of the user in the system of the present invention;

[0043] Figure 6 Rules related to the type smzy_bmd_t in the system of the present invention;

[0044] Figure 7 The type conversion path query result of the present invention;

[0045] Figure 8 The confidentiality detection model based on path conversion of the present invention queries the conversion path in the system;

[0046] Fig. 9 This is the confidentiality detection result of the security policy source file policy.29 of the present invention. DETAILED DESCRIPTION

[0047] The present invention is further described below in conjunction with the accompanying drawings.

[0048] The confidentiality conflict detection method based on path conversion of the present invention and the confidentiality conflict detection model based on path conversion are designed. When detecting the system, the changes of relevant information in the system and the relevant rules in the system that may cause the confidentiality to be destroyed can be detected.

[0049] In this embodiment, the following events are simulated in combination with actual scenarios:

[0050] 1. The detection results of the model after the relevant information elements are changed;

[0051] 2. Detection of conversion paths within the system;

[0052] 3. Detection of confidentiality conflict rules.

[0053] In this embodiment, the SELinux security policy source file policy.29 is taken as an example, which will be described below.

[0054] 1. The detection results of the model after the relevant information elements are changed

[0055] Take the user-defined rules in the system as an example. When the rules related to user-defined rules in the system are modified, compare whether the model can detect this modification;

[0056] 2. Detection of conversion paths within the system

[0057] Take smzy_bmd_t, a high-security type in the system, as an example to compare the detection results of the access path with and without adding type conversion rules;

[0058] 3. Detection of confidentiality violations

[0059] Detect rules within the system that may compromise the confidentiality of the system.

[0060] The results and analysis of this embodiment are as follows:

[0061] 1. The detection results of the model after the relevant information elements are changed

[0062] Take the user-defined rules in the system as an example. Figure 2 Define all rules related to users in the system. The user detection results in the system are as follows Figure 3 As shown in the figure, the relationship between users and roles in the system is detected as follows Figure 4 As shown;

[0063] If the rule user auditadm_u roles object_r auditadm_r is deleted from the policy file, when the analysis module is run again, the user detection results in the system are as follows Figure 5 As shown;

[0064] 2. Detection of conversion paths within the system

[0065] Take smzy_bmd_t, a high-security type in the system, as an example. The rules related to this type in the system are as follows: Figure 6 As shown;

[0066] When the type conversion rules in the system are not considered, the query results for the type conversion path are as follows Figure 7 As shown in the figure; the query result of the model on the conversion path in the system is as follows Figure 8 As shown;

[0067] 3. Detection of confidentiality violations

[0068] The confidentiality test results of the security policy source file policy.29 are as follows: Fig. 9 shown.

[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A confidentiality conflict detection method based on path conversion, characterized in that: The following steps are involved: Step 1: Extract system policy information; Traverse the rules related to defining users, roles, types, and attributes in the system, and then add the information elements in the system to the corresponding collection according to the type of attribute; Step 2: Based on step 1, confidentiality detection based on path conversion; Step 2.1: Construction of type direct conversion collection Set T is the set of all types of elements in the system. First, read the elements in set T one by one, and then obtain the direct conversion type space of different types according to the type conversion rules in the system; Detect the type conversion rules related to type t0 in the system, and according to these rules, obtain the types that t0 can be directly converted to, forming a set of directly converted types T of t0 d (t0); for types t1, t2, ..., t n Perform the same operation to obtain the corresponding direct conversion type set T d (t1), T d (t2),......,T d (t n ); These direct conversion type sets constitute the direct conversion type space in the current system; Step 2.2: Construction of type conversion collection Use the form of a list to count the types that t0 can convert. First, obtain the set T d The first element t1 in (t0) is placed at the first item of the list. The type conversion rules related to t1 in the system are traversed. According to these rules, the types directly converted from t1 are obtained. These types are compared with the elements in the original list one by one. If they are the same, they are deleted. If they are different, the type is added to the bottom of the list. This continues until no new elements are added to the current list and the list is traversed. All elements in the list constitute the type conversion set T of type t0. a (t0); Perform the same operation on all elements in the direct conversion type space Td to obtain the type conversion space T of all types in the current system a ; Step 2.3: Constructing the type conversion path collection First obtain the set T d The first element t1 in (t0) is placed at the first item of the list, and the direct type transfer set T of type t0 is traversed d (t0), respectively transfer type t0 and its direct type set T d All the paths in (t0) constitute direct conversion paths. These transfer paths are added to the access path set D of type t0. t (t0), then traverse the type conversion rules related to t1 in the system, and according to these rules, obtain the types directly converted from t1, and compare these types with the elements in the original list one by one. If they are the same, delete them, and if they are different, add the type to the bottom of the list; continue the cycle, and when all the elements in the list have been checked, get the access path set D of type t0 t (t0); After the traversal of the elements in the type set T in the current system is completed, the access path space of all types in the current system is obtained; each access path node is a type, and the conversion path is restricted by restricting the intermediate nodes, thereby restricting the subject's access method to the object; Step 2.4: Construction of type access control space After traversing all allow rules and auditallow rules in the system, the relevant object types, object categories and permissions recorded in these rules are added to the type access control set M(t0) of type t0. Then, all neverallow rules and dontaudit rules in the current system are traversed, and the relevant object types, object categories and permissions recorded in these rules are deleted from the type access control set M(t0) of type t0. When the type access control set T of type t0 is a After all elements in (t0) are traversed, the access control set of the determined type t0 can be obtained; after traversing the elements in the type access control space in the current system, the type access control space M is obtained; Step 2.5: Confidentiality Violation Detection First, take any type t0 in T, construct the access control set M(t0) of type t0, and judge the access relationship between the subject and object types, which are the following three types: (1) Type t0 is a trusted type, and there is an object type in the access control set of type t0 that is an untrusted type, and the access of type t0 to the object type is a write-related operation; (2) Type t0 is an untrusted type. In the access control set of type t0, there is an object type that is a trusted type, and type t0's access to the object type is a read-related operation. In this case, the allow rule or auditallow rule that allows this access right needs to be added to the violation set B. If the access relationships between all subject and object types in the system do not belong to (1) and (2), there is no confidentiality conflict in the current system and the current system is in a secure state.