+ All Categories
Home > Documents > Identification of Covert Channels inside Linux Kernel Based on Source Code.

Identification of Covert Channels inside Linux Kernel Based on Source Code.

Date post: 21-Dec-2015
Category:
View: 223 times
Download: 0 times
Share this document with a friend
Popular Tags:
24
Identification of Covert Channels inside Linux Kernel Based on Source Code
Transcript
Page 1: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Identification of Covert Channels inside LinuxKernel Based on Source Code

Page 2: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Covert channel definition.

Possible sources of CCA (Covert Channel Analysis).

Methods of CCA in Source Code.

Proposed tool to automate CCA on source code of Linux kernel.

Conclusion.

Agenda

Page 3: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Definition 1 - A communication channel is covert if it is neither designed nor intended to transfer information at all.

Definition 2 - A communication channel is covert if it is based on transmission by storage into variables that describe resource states.

Definition 3 - Covert channels are those that use entities not normally viewed as data objects to transfer information from one subject to another .

Several Definitions of Covert Channels

Page 4: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Does not make it obvious that a covert channel is irrelevant in case of a discretionary security policy (Trojan Horses can anyway leak information via valid system calls).

The previous definitions don’t acknowledge the fact that a covert channel is a result of a specific mandatory security policy being enforced and its implementation.

Problem with previous definitions

Page 5: Identification of Covert Channels inside Linux Kernel Based on Source Code.

a communication channel that allows a process totransfer information in a manner that violates the system's security policy.

Given a nondiscretionary (e.g., mandatory) security policy model M and its interpretation I(M) in an operating system, any potential communication between two subjects I(Sh) and I(Si) of I(M) is covert if and

only if any communication between the corresponding subjects Sh and Si of the model M is illegal in M.

TCSEC Definition

Page 6: Identification of Covert Channels inside Linux Kernel Based on Source Code.

The TCSEC is divided into four divisions: D, C, B, and A

An important set of TCSEC requirements,which appears in classes B2 to A1,is that of covert channel analysis (CCA)

TCSEC Definition Cont.

Page 7: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Identification of covert channels.Determination of covert channels' maximum

attainable bandwidth.Handling covert channels using a

well-defined policy consistent with the TCSEC objectives.

Generation of assurance evidence to show that all channels are handled according to the policy in force.

Objectives of CCA

Page 8: Identification of Covert Channels inside Linux Kernel Based on Source Code.

System reference manuals.

Top-level TCB specification.

Source code.

Means of Identifying Covert Channels

Page 9: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Syntactic Information Flow Analysis.

Semantic Information Flow Analysis.

Shared Resource Matrix Method.

Covert Flow Tree Method.

Methods of Identification in source code

Page 10: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Information Flow is associated with each statement.ex: a:=b Information flows from b to a if b is not a constant.

Define Flow Policies.Generate Flow Formulas for the entire TCB.Use theorem prover.Check if a flow is real or a false illegal flow.

Syntactic Information Flow

Page 11: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Examine all flows visible through a TCB interface and separate the legal from the illegal ones.

Separation of real channels from potential ones must still be done manually.Separation of potential channels from all the possible flows

is labor intensive compared to the above.

Semantic Information Flow

Page 12: Identification of Covert Channels inside Linux Kernel Based on Source Code.

A matrix containing user visible TCB primitives as rowsand read/altered variables which represent attribute of a shared resource as columns is created.

Each entry is marked R or M based on whether the variable is read or modified.

Calculate the transitive closure and update the matrix.

Shared Resource Matrix

Page 13: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Prototype Design

Page 14: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Traverse and scan all source code files.

Extract function names and global variables.

Global variables of simple types and complex typesshould be accounted for appropriately.

Generate a list of segmented token of the format<key,value>.

Module of syntax analysis

Page 15: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Further code analysis based on Information flow rules.

Readability and Modifiability of shared variables is analyzed.

If a variable y modifies a variable x then yx.

If a variable x is read inside a function Fx thenx Fx.

Module of constructing Info Flow Tree

Page 16: Identification of Covert Channels inside Linux Kernel Based on Source Code.

If a variable x is modified from inside of a function Fxthen Fx x.

Compound statements(CSx), Statements(Sx) and Expressions(Ex) are considered separately .

Null statements, type declaration statements, goto satements, labelled statements and cont/breakare ignored.

Info Flow Tree Contd.

Page 17: Identification of Covert Channels inside Linux Kernel Based on Source Code.

RIFA for Variable Declaration Statements

Page 18: Identification of Covert Channels inside Linux Kernel Based on Source Code.

RIFA for if statements

Page 19: Identification of Covert Channels inside Linux Kernel Based on Source Code.

RIFA for Function Definitions

Page 20: Identification of Covert Channels inside Linux Kernel Based on Source Code.

struct mm_struct * mm_alloc(void){struct mm_struct * mm;mm = allocate_mm();if (mm) {

memset(mm, 0, sizeof(*mm));return mm_init(mm);

}return NULL;

}

Sample Code From Linux kernel 2.4.37.9

Page 21: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Information Flow Trees are created using the above defined RIFA.

Four types of nodes namely functions,statements, expressions and variables.

Info Flow tree created as a binary tree.

Info Flow Tree Creation

Page 22: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Information Flow tree is transformed into a graph such that information flows exist across each edge.

Shared resource matrix and its transitive closure is calculated from the preprocessed information.

The values in the matrix cells are taken as 1,2,3,0.

Generate Info Flow Graph and Shared Resource Matrix

Page 23: Identification of Covert Channels inside Linux Kernel Based on Source Code.

This tool was used to discover some real covert channels that existed in Linux kernel 2.4.18.

Only entry functions to system calls need be examined.

All the .h files should be analyzed before the .c files.

An automated tool need to be developed to create application scenarios to identify real covert channel from the potential ones.

Conclusion

Page 24: Identification of Covert Channels inside Linux Kernel Based on Source Code.

Virgil D. Gligor (1993). A Guide to understanding Covert Channel Analysis of Trusted Systems. Technical Report NCSC-TG-030, National Computer Security Centre.

Gaoshou Zhai, Yufeng Zhang, Chengyu Liu, Na Yang, MinLi Tian, Hengsheng Yang. Automatic Identification of Covert Channels inside LinuxKernel Based on Source Codes.

Dorothy E. Denning. 1976. A Lattice Model of Secure Information Flow. Communications of the ACM 19, 5 (May 1976), 236-246.

C.R. Tsai, V.D. Gligor, C. S Chandersekaran. 1990. A Formal Method for the Identification of Covert Storage Channels in Source Code. lEEE Transactions on Software Engineering 16, 6 (June 1990), 569-580.

Richard A. Kemmerer. 1983. Shared Resource Matrix Methodology: An Approach to Identifying Storage and Timing Channels. ACM Transactions on Computer Systems 1, 3 (August 1983), 256-277.

Bibliography


Recommended