JP2011081501A - Operating system program and computer carrying the same - Google Patents

Operating system program and computer carrying the same Download PDF

Info

Publication number
JP2011081501A
JP2011081501A JP2009231662A JP2009231662A JP2011081501A JP 2011081501 A JP2011081501 A JP 2011081501A JP 2009231662 A JP2009231662 A JP 2009231662A JP 2009231662 A JP2009231662 A JP 2009231662A JP 2011081501 A JP2011081501 A JP 2011081501A
Authority
JP
Japan
Prior art keywords
system call
policy
match
policy data
determined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009231662A
Other languages
Japanese (ja)
Inventor
Yumizumi Osanai
弓澄 小山内
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2009231662A priority Critical patent/JP2011081501A/en
Publication of JP2011081501A publication Critical patent/JP2011081501A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a user's burden while maintaining computer security to some extent. <P>SOLUTION: An OS program includes a policy database which has a combination of a plurality of system calls to be regulated and actions to show contents of regulation processing and a system call hook module for monitoring the system call from a process. The system call hook module makes a processor execute a step S13 to determine a policy match where there is a combination of system calls corresponding to a combination of a plurality of system calls in the policy database in a plurality of system calls received one by one from the process, a step S16 to output action in the policy database to an OS main function part for policy match, and a step S17 to output the received system call to the OS main function part for policy non-match. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、オペレーティングシステムによるコンピュータのセキュリティ技術に関する。   The present invention relates to a computer security technique using an operating system.

近年、コンピュータやIPネットワークの普及に伴い、コンピュータからの情報漏えいやコンピュータウイルスの感染など、コンピュータのセキュリティが脅かされる事態が急増しており、コンピュータセキュリティ技術の重要性が増している。   In recent years, with the spread of computers and IP networks, the situation where computer security is threatened, such as information leakage from computers and computer virus infection, has increased rapidly, and the importance of computer security technology has increased.

コンピュータセキュリティ技術には、大別して、コンピュータへの不正侵入を防ぐ手法と、コンピュータに不正侵入された場合でも被害を最小限に抑える手法とがある。   Computer security technology can be broadly classified into a technique for preventing unauthorized entry into a computer and a technique for minimizing damage even if the computer is illegally entered.

後者の手法で、もっとも広く用いられているのはアクセス制御に代表される実行制御の手法である。ここで、アクセス制御とは、サブジェクト毎に、実行可能なオペレーションとアクセス可能なオブジェクトを制限する手法である。なお、サブジェクトとは、能動的に動作を行う存在であり、ユーザやプロセス等が該当し、プロセスとは、実行中のプログラムである。また、オブジェクトとは、操作される対象であり、ファイルやディレクトリ等が該当する。   In the latter method, the most widely used is an execution control method represented by access control. Here, access control is a technique for restricting executable operations and accessible objects for each subject. Note that a subject is an entity that actively operates and corresponds to a user, a process, or the like, and a process is a program that is being executed. An object is an object to be operated, and corresponds to a file, a directory, or the like.

このアクセス制御による手法としては、以下の非特許文献1に記載されているSELinux(Security Enhanced Linux)が挙げられる。   As a method by this access control, SELinux (Security Enhanced Linux) described in Non-Patent Document 1 below can be cited.

このSELinux手法とは、NSA(アメリカ国家安全保障局)が主体となって開発されたソフトウェアであり、コンピュータ上で動作する各プロセスに対して、OS(Operating System)レベルでアクセス制限を行う手法である。   This SELinux method is software developed mainly by the NSA (National Security Agency), and is a method of restricting access at the OS (Operating System) level for each process running on a computer. is there.

このSELinux手法では、コンピュータ上で動作する全てのプロセスに対しドメインと呼ばれるラベルを設定すると共に、オブジェクトに対して、そのタイプ、さらにタイプ毎のアクセス・ベクタと呼ばれるアクセス形態(一切のアクセス不可、readのみ可、read及びwrite可、等)を設定し、プロセスのドメインとオブジェクトのタイプとを関係付けることで、各オブジェクトに対するプロセスのアクセス制限をOSレベルで実現している。   In this SELinux method, a label called a domain is set for all processes running on a computer, and an access type called an access vector for each type, and an access vector for each type (no access, no read, By setting the process domain and the object type, the process access restriction for each object is realized at the OS level.

このように、SELinux手法では、プロセスのアクセス制限をOSレベルで実現しているため、仮に、不正侵入者に、コンピュータのroot権限を奪われたとしても、この不正侵入者がアクセス可能なオブジェクトは限定され、被害を最小限に抑えることができる。   In this way, in the SELinux method, process access restrictions are realized at the OS level, so even if an unauthorized intruder loses the root privilege of the computer, the objects that can be accessed by the unauthorized intruder are Limited and can minimize damage.

Bill Mccarty 著 田口裕也、根津研介 監訳 林英幸 訳 「SELinuxシステム管理― セキュアOSの基礎と運用」オライリージャパン 2005年3月25日発行Translated by Bill Mccarty Hiroya Taguchi and Kensuke Nezu Translated by Hideyuki Hayashi "SELinux System Management-Basics and Operation of Secure OS" O'Reilly Japan March 25, 2005

しかしながら、上述のSELinux手法では、新たなプロセスが追加される毎に、このプロセスに対するドメインの設定、さらに、このドメインとオブジェクトのタイプとの関係付けを行う必要が有り、コンピュータユーザに負担を強いてしまう、という問題点がある。   However, in the SELinux method described above, every time a new process is added, it is necessary to set a domain for this process and to associate the domain with the object type, which imposes a burden on the computer user. There is a problem.

本発明は、このような従来技術の問題点に着目し、コンピュータのセキュリティをある程度確保しつつも、ユーザの負担を軽減することができる技術を提供することを目的とする。   The present invention pays attention to such problems of the prior art, and an object of the present invention is to provide a technique capable of reducing the burden on the user while ensuring a certain level of computer security.

前記問題点を解決するための発明に係るOSプログラムは、
プロセスからの各種システムコールを処理するためのオペレーティングシステム(以下、OSとする)主機能モジュールと、
規制対象とすべき複数のシステムコールの組合わせと、前記プロセスから該組合わせのシステムコールが出力された場合の規制処理内容を示すシステムコールであるアクションとを有する複数のポリシデータを含むポリシデータベースと、
前記プロセスからの前記システムコールを監視するためのシステムコールフックモジュールと、
を有し、
前記システムコールフックモジュールは、
前記プロセスからのシステムコールを受け付けるシステムコール受付ステップと、
前記システムコール受付ステップでシステムコールを受け付けると、該システムコール受付ステップで順次受け付けられた複数のシステムコール中に、前記ポリシデータベース中のいずれかのポリシデータに含まれている前記複数のシステムコールの組合わせと対応する組合わせのシステムコールがある、ポリシマッチであるか否かを判定する判定ステップと、
前記判定ステップで前記ポリシマッチであると判定されると、前記ポリシマッチであると判定された際に対象になった前記ポリシデータ中の前記アクションを取得して、該アクションを出力し、前記判定ステップで前記ポリシマッチでないと判定されると、前記システムコール受付ステップで受け付けたシステムコールのうち、該判定ステップでの判定の契機となった最新のシステムコールを出力する指示出力ステップと、
をコンピュータのプロセッサに実行させ、
前記OS主機能モジュールは、
前記指示出力ステップで出力された前記システムコール又は前記アクションを受け付ける指示受付ステップと、
前記指示受付ステップで受け付けた前記システムコール又は前記アクションが示す処理を実行する指示実行ステップと、
を前記プロセッサに実行させる、ことを特徴とする。
An OS program according to the invention for solving the above problems is as follows:
An operating system (hereinafter referred to as OS) main function module for processing various system calls from the process;
A policy database including a plurality of policy data having a combination of a plurality of system calls to be regulated and an action which is a system call indicating a regulation processing content when a system call of the combination is output from the process When,
A system call hook module for monitoring the system call from the process;
Have
The system call hook module is
A system call accepting step for accepting a system call from the process;
When the system call is accepted in the system call accepting step, the plurality of system calls included in any one of the policy data in the policy database during the plurality of system calls sequentially accepted in the system call accepting step. A determination step for determining whether or not there is a system call corresponding to a combination and a policy match; and
If it is determined that the policy match is determined in the determination step, the action in the policy data targeted when the policy match is determined is acquired, the action is output, and the determination If it is determined that the policy match is not the step, out of the system calls received in the system call reception step, an instruction output step for outputting the latest system call that is the trigger for the determination in the determination step;
To the computer processor,
The OS main function module is
An instruction receiving step for receiving the system call or the action output in the instruction output step;
An instruction execution step of executing the process indicated by the system call or the action received in the instruction reception step;
Is executed by the processor.

また、前記問題点を解決するための発明に係るコンピュータは、
前記OSプログラムが搭載されている、ことを特長とする。
In addition, a computer according to an invention for solving the above problems is
The OS program is mounted.

本発明では、OSプログラムに予め組み込まれているポリシデータベース中の複数のポリシデータを用いて、コンピュータのセキュリティを一定範囲で確保しているで、従来のSELinux手法のように、新たなプロセスが追加される毎に、このプロセスに対するドメインの設定、さらに、このドメインとオブジェクトのタイプとの関係付けを行う必要がなく、コンピュータユーザの負担を軽減することができる。   In the present invention, a plurality of policy data in a policy database pre-installed in the OS program is used to secure the computer security within a certain range, and a new process is added as in the conventional SELinux method. Each time it is done, there is no need to set a domain for this process and to associate this domain with the object type, thereby reducing the burden on the computer user.

本発明に係る第一実施形態におけるコンピュータの構成図である。It is a block diagram of the computer in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態におけるポリシデータベースのデータ構成を示す説明図である。It is explanatory drawing which shows the data structure of the policy database in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態におけるポリシコンテキストの記述例を示す説明図である。It is explanatory drawing which shows the example of description of the policy context in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態におけるタスク・ストラクトのデータ構成を示す説明図である。It is explanatory drawing which shows the data structure of the task structure in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態におけるシステムコールフック部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the system call hook part in 1st embodiment which concerns on this invention. 図5のポリシマッチ判定処理(S13)の詳細処理を示すフローチャートである。It is a flowchart which shows the detailed process of the policy match determination process (S13) of FIG. 本発明に係る第一実施形態におけるポリシコンテキストの更新過程を示す説明図である。It is explanatory drawing which shows the update process of the policy context in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態における変数対応表の更新過程を示す説明図である。It is explanatory drawing which shows the update process of the variable corresponding table in 1st embodiment which concerns on this invention. 本発明に係る第一実施形態におけるOS主機能部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the OS main function part in 1st embodiment which concerns on this invention. 本発明に係る第二実施形態におけるコンピュータの構成図である。It is a block diagram of the computer in 2nd embodiment which concerns on this invention. 本発明に係る第二実施形態におけるタスク・ストラクトのデータ構成を示す説明図ある。It is explanatory drawing which shows the data structure of the task structure in 2nd embodiment which concerns on this invention. 本発明に係る第二実施形態におけるシステムコールフック部の動作をを示すフローチャートである。It is a flowchart which shows operation | movement of the system call hook part in 2nd embodiment which concerns on this invention. 図12のポリシマッチ判定処理(S13A)の詳細処理を示すフローチャートである。It is a flowchart which shows the detailed process of the policy match determination process (S13A) of FIG.

以下、本発明に係るコンピュータの各実施形態について、図面を用いて説明する。   Embodiments of a computer according to the present invention will be described below with reference to the drawings.

「第一実施形態」
本発明に係るコンピュータの第一実施形態について、図1〜図9を用いて説明する。
"First embodiment"
A first embodiment of a computer according to the present invention will be described with reference to FIGS.

本実施形態のコンピュータ100は、図1に示すように、各種演算処理を実行するCPU110と、CPU110のワークエリア等になるRAM120と、データやプログラム等が予め格納されているROM130と、ハードディスクドライブ装置等の補助記憶装置140と、ディスプレイ151と、キーボードやマウス等の入力装置152と、ディスプレイ151や入力装置152のインタフェースである入出力インタフェース150と、ネットワークNを介して他の装置と通信するためのネットワークインタフェース160と、を備えている。   As shown in FIG. 1, the computer 100 according to the present embodiment includes a CPU 110 that executes various arithmetic processes, a RAM 120 that serves as a work area of the CPU 110, a ROM 130 that stores data, programs, and the like, and a hard disk drive device. To communicate with other devices via the network N, an auxiliary storage device 140 such as a display 151, an input device 152 such as a keyboard and a mouse, an input / output interface 150 that is an interface of the display 151 and the input device 152, and the like. Network interface 160.

補助記憶装置140には、OS(Operating System)プログラム141と、アプリケーションプログラム148とが予め格納されている。OSプログラム141は、プロセスからの各種システムコールを処理するためのプログラムであるOS主機能モジュール142と、プロセスからのシステムコールを監視するためのプログラムであるシステムコールフックモジュール143と、規制対象とすべき複数のシステムコールの組合わせ等が示されている複数のポリシデータを含むポリシデータベース144と、を有している。   The auxiliary storage device 140 stores an OS (Operating System) program 141 and an application program 148 in advance. The OS program 141 is an OS main function module 142 that is a program for processing various system calls from a process, a system call hook module 143 that is a program for monitoring system calls from a process, and a restriction target. And a policy database 144 including a plurality of policy data in which combinations of a plurality of system calls are shown.

CPU110は、機能的に、OS実行部111とプロセス118とを有している。このOS実行部111は、CPU110がOS主機能モジュール142をRAM120にロードし、これを実行することで機能するOS主機能部113と、CPU110がシステムコールフックモジュール143をRAM120にロードし、これを実行することで機能するシステムコールフック部113と、を有している。プロセス118は、CPU110がアプリケーションプログラム148をRAM120にロードし、これを実行することで機能する。   The CPU 110 functionally includes an OS execution unit 111 and a process 118. In the OS execution unit 111, the CPU 110 loads the OS main function module 142 into the RAM 120, and the OS main function unit 113 that functions by executing the OS main function module 142, and the CPU 110 loads the system call hook module 143 into the RAM 120. And a system call hook unit 113 that functions when executed. The process 118 functions when the CPU 110 loads the application program 148 into the RAM 120 and executes it.

RAM120には、OS実行部111により、プロセス118を管理するためのタスク・ストラクト121と、ポリシデータベース144の一つのポリシデータのコピーであるポリシデータコピー125と、プロセス118からのシステムコールに含まれている変数と代入値との関係を示す変数対応表127とが作成される。   The RAM 120 includes a task struct 121 for managing the process 118 by the OS execution unit 111, a policy data copy 125 that is a copy of one policy data in the policy database 144, and a system call from the process 118. A variable correspondence table 127 showing the relationship between the existing variables and the assigned values is created.

補助記憶装置140に格納されているポリシデータベース144は、図2に示すように、複数のポリシデータ145と、オブジェクトタイプ表146とを有している。   The policy database 144 stored in the auxiliary storage device 140 has a plurality of policy data 145 and an object type table 146 as shown in FIG.

ポリシデータ145は、当該ポリシデータを一意に識別するためのポリシID145aと、規制対象とすべき複数のシステムコールの組合わせを記述したポリシコンテキスト145bと、OS主機能部112に処理動作させるべき規制処理内容を示すアクション145cと、を有している。   The policy data 145 includes a policy ID 145a for uniquely identifying the policy data, a policy context 145b describing a combination of a plurality of system calls to be regulated, and a regulation to be processed by the OS main function unit 112. And an action 145c indicating the processing content.

ポリシID145aは、ここでは、重要度の高いポリシデータ順に、1,2,3,…と付される。   Here, the policy ID 145a is assigned 1, 2, 3,... In the order of the policy data having the highest importance.

ポリシコンテキスト145bは、実行することによって情報漏えいやシステムダウン等、ユーザにとって好ましくない状況を引き起こす可能性のある複数のシステムコールの組み合わせ、つまり、前述したように、規制対象とすべき複数のシステムコールの組合せを記述したものである。   The policy context 145b is a combination of a plurality of system calls that may cause an unfavorable situation for the user, such as information leakage or system down, that is, as described above, a plurality of system calls to be regulated. Is described.

アクション145cは、プロセスからの複数のシステムコールがポリシコンテキスト145bにマッチしたときに、OS主機能部112に処理動作させるべき規制処理内容を示すシステムコールである。ポリシデータ145中で、このアクション145cが記述される領域は、プロセスからの複数のシステムコールがポリシコンテキスト145bにマッチしたときに、OS主機能部112に処理動作させるべきシステムコールが存在しない場合には、空欄となる。また、ポリシデータ145中で、このアクション145cが記述される領域には、実行順序を指定して複数のシステムコールを記述される場合もある。   The action 145c is a system call indicating the contents of restriction processing to be performed by the OS main function unit 112 when a plurality of system calls from the process match the policy context 145b. In the policy data 145, the area where the action 145c is described is when there is no system call to be processed by the OS main function unit 112 when a plurality of system calls from the process match the policy context 145b. Is blank. Further, in the policy data 145, an area in which the action 145c is described may describe a plurality of system calls by specifying the execution order.

具体的に、アクション145cには、システムコールを出力したプロセスの強制終了を意味するシステムコール「exit(1)」や、このプロセスの停止を意味するシステムコール等が記述される。また、アクション145cには、エラーメッセージを出力する旨のシステムコールと受付システムコールとが、出力順序を定められた形で記述される場合もある。このアクションは、まず、エラーメッセージを出力する旨のシステムコールをOS主機能部112に出力し、次に、ステップ10で受け付けたシステムコールをOS主機能部112に出力することを意味する。   Specifically, the action 145c describes a system call “exit (1)” that means forced termination of the process that has output the system call, a system call that means stop of this process, and the like. In the action 145c, a system call for outputting an error message and a reception system call may be described in a form in which an output order is determined. This action means that a system call for outputting an error message is first output to the OS main function unit 112, and then the system call accepted in step 10 is output to the OS main function unit 112.

オブジェクトタイプ表146は、補助記憶装置140に格納されているファイルやディレクトリ等のオブジェクト(アクセス対象)の名前が格納されるオブジェクト名領域146aと、オブジェクトの属性が格納されるオブジェクトタイプ領域146bと、を有する。   The object type table 146 includes an object name area 146a for storing names of objects (access targets) such as files and directories stored in the auxiliary storage device 140, an object type area 146b for storing object attributes, Have

オブジェクトタイプ領域146bに格納されるオブジェクトの属性としては、機密情報を含むファイル等であることを示す「secret」や、一般ファイル等であることを示す「normal」等がある。   As attributes of the object stored in the object type area 146b, there are “secret” indicating a file containing confidential information, “normal” indicating a general file, and the like.

なお、ポリシデータベース144中の複数のポリシデータ145は、基本的に、OSプログラム141に予め組み込まれているものであるが、OS主機能部112が、入力装置151から新たなポリシデータを受け付けて、又は、既存のポリシデータの変更内容を受け付けて、これをポリシデータベース144中に格納するようにしてもよい。   The plurality of policy data 145 in the policy database 144 is basically incorporated in advance in the OS program 141. However, the OS main function unit 112 receives new policy data from the input device 151. Alternatively, it is also possible to accept changes in existing policy data and store them in the policy database 144.

また、オブジェクトタイプ表146の各領域146a,146bには、補助記憶装置140に新たにファイル等が格納される際に、OS主機能部112又はシステムコールブック部113により、入力装置151から受け付けたデータが格納される。このため、ユーザは、新たなファイル等を作成する際には、入力装置151を操作して、そのオブジェク名及びオブジェクトタイプを指定することになる。但し、ユーザは、新たなファイル等を作成する毎に、必ず、そのオブジェクト名及びオブジェクトタイプを指定する必要はないが、機密情報を含むファイル等を作成する際には、そのオブジェクト名及びオブジェクトタイプを指定することが好ましい。   Further, in the areas 146a and 146b of the object type table 146, when a file or the like is newly stored in the auxiliary storage device 140, it is received from the input device 151 by the OS main function unit 112 or the system call book unit 113. Data is stored. Therefore, when creating a new file or the like, the user operates the input device 151 and designates the object name and the object type. However, every time a user creates a new file, the user does not necessarily specify the object name and object type. However, when creating a file containing confidential information, the object name and object type Is preferably specified.

次に、以上で説明したポリシコンテキスト145bの具体的な記述形式について、図3を用いて説明する。   Next, a specific description format of the policy context 145b described above will be described with reference to FIG.

複数のシステムコールの組合わせは、「→」と「and」と「or」と用いて表現される。   A combination of a plurality of system calls is expressed using “→”, “and”, and “or”.

「→」は、この「→」を中心として両側に記述されたシステムコールの順序を示し、「→」の左辺に記述されたシステムコールが、「→」の右辺に記述されたシステムコールより、プロセスからの出力順序が先であることを意味させる記号である。   “→” indicates the order of system calls described on both sides centered on this “→”, and the system call described on the left side of “→” is more than the system call described on the right side of “→”. This symbol indicates that the output order from the process is first.

「and」は、この「and」の両側に記述されたシステムコールが、プロセスからのシステムコールであることを意味させる記号である。また、「or」は、この「or」の両側に記述されたシステムコールのうち、いずれか一方のシステムコールが、プロセスからのシステムコールであることを意味させる記号である。   “And” is a symbol that means that the system calls described on both sides of “and” are system calls from the process. Further, “or” is a symbol that means that one of the system calls described on both sides of “or” is a system call from a process.

また、システムコールの引数として、変数、及びオブジェクトタイプ条件付き変数を記述できる。変数は、1以上のアルファベットで記述される。また、オブジェクトタイプ条件付き変数は、まず、オブジェクトタイプが記述され、このオブジェクトタイプの右辺に、「&」が記述され、この「&」の右辺に、1以上のアルファベットにより変数が記述される。   In addition, variables and object type conditional variables can be described as system call arguments. Variables are described in one or more alphabets. In the object type conditional variable, first, the object type is described, “&” is described on the right side of the object type, and the variable is described using one or more alphabets on the right side of the “&”.

具体的に、図3中のポリシコンテキスト145Abは、プロセスからシステムコール「open(x)」が出力された後、プロセスからシステムコール「sendto(x,y)」が出力され、且つ、システムコール「open(x)」の引数とシステムコール「sendto(x,y)」の第一引数とが等しいという意味を表現するポリシである。   Specifically, the policy context 145Ab in FIG. 3 outputs the system call “sendto (x, y)” from the process after the system call “open (x)” is output from the process, and the system call “ This policy expresses the meaning that the argument of “open (x)” is equal to the first argument of the system call “sendto (x, y)”.

このため、実際に、プロセスからシステムコール「open」が出力された後、プロセスからシステムコール「sendto」が出力され、しかも、システムコール「open」の引数とシステムコール「sendto」の第一引数とが等しい場合、これらのシステムコールの組み合わせは、このポリシコンテキスト145bAが示すポリシにマッチすることになる。   Therefore, after the system call “open” is actually output from the process, the system call “sendto” is output from the process, and the arguments of the system call “open” and the first argument of the system call “sendto” Are equal, the combination of these system calls matches the policy indicated by this policy context 145bA.

なお、実際に、プロセスからシステムコール「open(x)」が出力された後、プロセスから他のシステムコールが出力され、さらに、その後に、プロセスからシステムコール「sendto(x,y)」が出力された場合も、本実施形態では、このポリシコンテキスト145Abが示すポリシにマッチしていると定義する。   Actually, after the system call “open (x)” is output from the process, another system call is output from the process, and then the system call “sendto (x, y)” is output from the process. In this embodiment, it is defined that this policy matches the policy indicated by the policy context 145Ab.

また、図3中のポリシコンテキスト145Bbは、プロセスからシステムコール「open(x)」とシステムコール「sendto(x,y)」とが出力され、且つ、システムコール「open(x)」の引数とシステムコール「sendto(x,y)」の第一引数とが等しいという意味を表現するポリシである。   Further, the policy context 145Bb in FIG. 3 outputs a system call “open (x)” and a system call “sendto (x, y)” from the process, and an argument of the system call “open (x)”. This policy expresses the meaning that the first argument of the system call “sendto (x, y)” is equal.

図3中のポリシコンテキスト145Cbは、プロセスからシステムコール「open(x)」システムコール「sendto(x,y)」とのうちの一方のシステムコールが出力されたという意味を表現するポリシである。   The policy context 145Cb in FIG. 3 is a policy expressing the meaning that one of the system calls “open (x)” and the system call “sendto (x, y)” is output from the process.

ポリシコンテキスト145Dbは、プロセスからシステムコール「open(x)」とシステムコール「read(x)」とのうちの一方が出力された後、プロセスからシステムコール「sendto(x,y)」が出力され、且つ、システムコール「open(x)」又はシステムコール「read(x)」の引数と、システムコール「sendto(x,y)」の第一引数とが等しいという意味を表現するポリシである。   In the policy context 145Db, one of the system call “open (x)” and the system call “read (x)” is output from the process, and then the system call “sendto (x, y)” is output from the process. In addition, the policy expresses the meaning that the argument of the system call “open (x)” or the system call “read (x)” is equal to the first argument of the system call “sendto (x, y)”.

図3中のポリシコンテキスト145Ebは、プロセスからシステムコール「open(x)」が出力された後、プロセスからシステムコール「sendto(x,y)」が出力され、且つ、システムコール「open(x)」の引数とシステムコール「sendto(x,y)」の第一引数とが等しく、さらに、システムコール「open(x)」の引数「x」のオブジェクトタイプとシステムコール「sendto(x,y)」の第一引数「x」のオブジェクトタイプがいずれも「secret_t」であるという意味を表現するポリシである。   The policy context 145Eb in FIG. 3 outputs the system call “sendto (x, y)” from the process after the system call “open (x)” is output from the process, and the system call “open (x)”. ”And the first argument of the system call“ sendto (x, y) ”, and the object type of the argument“ x ”of the system call“ open (x) ”and the system call“ sendto (x, y) ” "Is a policy that expresses the meaning that the object type of the first argument" x "is" secret_t ".

以上のように、本実施形態において、複数のシステムコールの組合わせとは、複数のシステムコールを単に全て含む場合の他、複数のシステムコールのいずれかを含む場合や、複数のシステムコールを含み且つこれらの順序が定められている場合、さらに、これらの組み合わせを含んでいる。   As described above, in the present embodiment, the combination of a plurality of system calls includes not only a case where a plurality of system calls are all included, but also a case where any of a plurality of system calls is included or a plurality of system calls. In addition, when the order is determined, a combination of these is included.

以上、ポリシコンテキスト145bの具体的な記述形式について説明したが、他の記述形式で、複数のシステムコールの組合せを記述してもよいことは言うまでもない。   The specific description format of the policy context 145b has been described above. Needless to say, a combination of a plurality of system calls may be described in another description format.

次に、図4を用いて、タスク・ストラクト121について説明する。   Next, the task struct 121 will be described with reference to FIG.

このタスク・ストラクト121は、プロセス118(図1)を管理するために、このプロセス118に関するアプリケーションプログラム148(図1)の起動時に、OS実行部111により、RAM120に上に作成される。   This task struct 121 is created on the RAM 120 by the OS execution unit 111 when the application program 148 (FIG. 1) related to the process 118 is started in order to manage the process 118 (FIG. 1).

このタスク・ストラクト121は、プロセスの状態(正常動作中、停止中等)が格納されるプロセス状態領域121aと、プロセスを一意に識別するためのプロセスIDが格納されるプロセスID領域121bと、プロセスによる使用メモリ量が格納される使用メモリ量領域121cと、プロセスからのシステムコール履歴が格納されるシステムコールテーブル121dと、図示されていないが、CPUの使用状況が格納される領域等を有する。   The task struct 121 includes a process state area 121a in which process states (normal operation, stopped, etc.) are stored, a process ID area 121b in which a process ID for uniquely identifying a process is stored, and a process It has a used memory amount area 121c for storing the used memory amount, a system call table 121d for storing a system call history from the process, and an area for storing the usage status of the CPU (not shown).

このタスク・ストラクト121は、OS主機能部112により、プロセス118に関するアプリケーションプログラム148の起動時に、RAM120に上に作成される。また、このタスク・ストラクト121の各領域のデータのうち、システムコールテーブル121dを除く全ての領域のデータは、いずれも、OS主機能部112が更新する。一方、システムコールテーブル121dのデータは、システムコールフック部113が更新する。   The task struct 121 is created on the RAM 120 by the OS main function unit 112 when the application program 148 related to the process 118 is started. Also, the OS main function unit 112 updates all the data of each area of the task struct 121 except for the system call table 121d. On the other hand, the system call hook unit 113 updates the data in the system call table 121d.

システムコールフック部113は、プロセス118から順次出力されるシステムコールのうち、後述するように、ポリシデータベース144のいずれかのポリシデータ145中に記述されているシステムコール名に一致するシステムコール名のシステムコールを、線形リスト形式で、システムコールテーブル121dに格納する。なお、システムコール名とは、例えば、システムコール「open(x)」の場合、「open」がシステムコール名である。   The system call hook unit 113, among the system calls sequentially output from the process 118, has a system call name that matches the system call name described in any of the policy data 145 in the policy database 144, as will be described later. System calls are stored in the system call table 121d in a linear list format. For example, in the case of a system call “open (x)”, “open” is the system call name.

システムコールフック部113は、システムコールテーブル121d中に、新たなシステムコールを追加する場合、システムコールテーブル121d中のリストの末尾の位置に、「→」及び新たなシステムコールを格納する。   When adding a new system call to the system call table 121d, the system call hook unit 113 stores “→” and the new system call at the end of the list in the system call table 121d.

このように、システムコールテーブル121に、システムコールを順次格納することで、プロセスからの各システムコールの出力順を明記することができる。   Thus, by sequentially storing the system calls in the system call table 121, it is possible to specify the output order of each system call from the process.

次に、図5及び図6に示すフローチャートに従って、システムコールフック部113の動作について説明する。   Next, the operation of the system call hook unit 113 will be described with reference to the flowcharts shown in FIGS.

アプリケーションプログラム148が起動し、このアプリケーションプログラム148によるプロセス118が動作可能な状態になると、OS主機能部112は、このプロセス118に関するタスク・ストラクト121をRAM121上に展開する。なお、この段階で、このタスク・ストラクト121のシステムコールテーブル121d(図4)には、何ら記述されていない。   When the application program 148 is activated and the process 118 by the application program 148 becomes operable, the OS main function unit 112 expands the task struct 121 related to the process 118 on the RAM 121. At this stage, nothing is described in the system call table 121d (FIG. 4) of the task struct 121.

システムコールフック部113は、プロセス118が動作可能な状態になると、このプロセス118の監視を開始し、このプロセス118からのシステムコール出力を待ち(S10)、プロセス118からのシステムコールを受け付けると、このシステムコールのシステムコール名がポリシデータベース144に記述されているいずれかのシステムコールのシステムコール名と一致するか否かを判断する(S11)。   When the process 118 becomes operable, the system call hook unit 113 starts monitoring the process 118, waits for a system call output from the process 118 (S10), and receives a system call from the process 118. It is determined whether or not the system call name of this system call matches the system call name of any system call described in the policy database 144 (S11).

システムコールフック部113は、ステップ10で受け付けたシステムコールのシステムコール名がポリシデータベース144に記述されているいずれのシステムコールのシステムコール名とも一致しないと判断すると、ステップ10で受け付けたシステムコールをOS主機能部112へ出力し(S17)、ステップ10に戻る。また、システムコールフック部113は、ステップ10で受け付けたシステムコールのシステムコール名がポリシデータベース144に記述されているいずれかのシステムコールのシステムコール名と一致すると判断すると、ステップ10で受け付けたシステムコールを、RAM120上に展開されているシステムコールテーブル121d(図4)に記述する(S12)。そして、システムコールフック部113は、システムコールテーブル121dに記述されているシステムコールに関して、ポリシデータとのポリシマッチ判定を行う(S13)。   If the system call hook unit 113 determines that the system call name of the system call received in step 10 does not match the system call name of any system call described in the policy database 144, the system call hook unit 113 determines that the system call received in step 10 The data is output to the OS main function unit 112 (S17), and the process returns to Step 10. If the system call hook unit 113 determines that the system call name of the system call received in step 10 matches the system call name of any system call described in the policy database 144, the system call received in step 10 The call is described in the system call table 121d (FIG. 4) developed on the RAM 120 (S12). Then, the system call hook unit 113 performs policy match determination with policy data for the system call described in the system call table 121d (S13).

システムコールフック部113は、このポリシマッチ判定処理(S13)で、システムコールテーブル121dに記述されているシステムコールに関して、ポリシデータとマッチしていると判定すると、このポリシデータのポリシIDをRAM120上に一時的に記憶する。なお、このポリシマッチ判定処理に関しては、図6を用いて詳細に後述する。   If the system call hook unit 113 determines in the policy match determination process (S13) that the system call described in the system call table 121d matches the policy data, the policy ID of the policy data is stored in the RAM 120. Memorize temporarily. The policy match determination process will be described later in detail with reference to FIG.

システムコールフック部113は、ポリシマッチ判定処理(S13)が終了すると、RAM120上にポリシIDが記憶されているか否かを判断する(S14)。システムコールフック部113は、RAM120上にポリシIDが記憶されていない、言い換えると、システムコールテーブル121dに記述されているシステムコールとポリシデータとがマッチしていない、と判断すると、ステップ10で受け付けたシステムコールをOS主機能部112へ出力し(S17)、ステップ10に戻る。   When the policy match determination process (S13) ends, the system call hook unit 113 determines whether a policy ID is stored in the RAM 120 (S14). When the system call hook unit 113 determines that the policy ID is not stored in the RAM 120, in other words, the system call described in the system call table 121d does not match the policy data, the system call hook unit 113 accepts it in step 10. The system call is output to the OS main function unit 112 (S17), and the process returns to Step 10.

また、システムコールフック部113は、RAM120上にポリシIDが記憶されている、言い換えると、システムコールテーブル121dに記述されているシステムコールとポリシデータとがマッチしている、と判断すると、当該ポリシIDのポリシデータからシステムコールの一種であるアクションを抽出し(S15)、このアクションをOS主機能部112へ出力して(S16)、ステップ10に戻る。   When the system call hook unit 113 determines that the policy ID is stored in the RAM 120, in other words, the system call described in the system call table 121d matches the policy data, the policy call An action which is a type of system call is extracted from the policy data of the ID (S15), this action is output to the OS main function unit 112 (S16), and the process returns to step 10.

次に、ポリシマッチ判定処理(S13)の詳細処理について説明する。   Next, detailed processing of the policy match determination processing (S13) will be described.

ここで、以下の説明の都合上、プロセス118からは、図4のシステムコールテーブル121dに示すように、システムコール「open(myfile)」が出力され、その後、システムコール「sendto(myfile,server)」が出力され、さらに、その後、システムコール「close(…)」が出力されると、仮定する。また、ポリシデータベース144には、ポリシデータ145として、図2に示す、ポリシID「8」のポリシデータ145のみが格納され、オブジェクトタイプ表146として、図2に示すものが格納されていると、仮定する。   Here, for convenience of the following description, as shown in the system call table 121d of FIG. 4, the process 118 outputs a system call “open (myfile)”, and then the system call “sendto (myfile, server)”. ”And then the system call“ close (...) ”Is output. Further, the policy database 144 stores only the policy data 145 of the policy ID “8” shown in FIG. 2 as the policy data 145, and the object type table 146 stores the data shown in FIG. Assume.

図5を用いて前述したように、プロセス118からシステムコール「open(myfile)」が出力され、これをシステムコールフック部113が受け付けると(S10)、このシステムコールのシステムコール名「open」と、図2に示すポリシデータベース144のポリシデータ145に記述されているシステムコール名とを比較する(S11)。この際、システムコールフック部113は、ポリシデータ145中に、受け付けたシステムコールのシステムコール名「open」と一致するものがあると判断して、このシステムコール「open(myfile)」を、RAM120上に展開されているシステムコールテーブル121d(図4)に記述し(S12)、ポリシマッチ判定処理(S13)を開始する。   As described above with reference to FIG. 5, when the system call “open (myfile)” is output from the process 118 and is received by the system call hook unit 113 (S10), the system call name “open” of this system call is Then, the system call name described in the policy data 145 of the policy database 144 shown in FIG. 2 is compared (S11). At this time, the system call hook unit 113 determines that the policy data 145 matches the system call name “open” of the received system call, and stores this system call “open (myfile)” in the RAM 120. It is described in the system call table 121d (FIG. 4) developed above (S12), and the policy match determination process (S13) is started.

システムコールフック部113は、ポリシマッチ判定処理で、図6のフローチャートに示すように、まず、システムコールテーブル121dから、先頭要素としてのシステムコールをターゲットシステムコールとして抽出する(S20)。この場合、システムコールテーブル121dには、システムコール「open(myfile)」しか記述されていないので、このシステムコール「open(myfile)」をターゲットシステムコールとして抽出する。   In the policy match determination process, as shown in the flowchart of FIG. 6, the system call hook unit 113 first extracts a system call as a head element from the system call table 121d as a target system call (S20). In this case, since only the system call “open (myfile)” is described in the system call table 121d, this system call “open (myfile)” is extracted as the target system call.

システムコールフック部113は、次に、全てのポリシデータ145をコピーしたか否かを判断する(S21)。この場合、ポリシデータ145を未だコピーしていないので、全てのポリシデータ145をコピーしていないと判断し、未コピーのポリシデータ145をコピーして、これをポリシデータコピー125としてRAM121を展開すると共に、変対応表127をRAM120上に展開する(S22)。   Next, the system call hook unit 113 determines whether all the policy data 145 has been copied (S21). In this case, since the policy data 145 has not yet been copied, it is determined that not all of the policy data 145 has been copied, and the uncopied policy data 145 is copied and this is used as the policy data copy 125 to expand the RAM 121. At the same time, the change correspondence table 127 is expanded on the RAM 120 (S22).

図2及び図7に示すように、この段階で作成されるポリシデータコピー125Aは、ポリシデータ145をコピーしたものであるから、このポリシデータ145のポリシID145aと同じポリシID125aと、このポリシデータ145のポリシコンテキスト145bと同じポリシコンテキストコピー125Abと、このポリシデータのアクション145cと同じアクション125cとを有している。   As shown in FIGS. 2 and 7, the policy data copy 125A created at this stage is a copy of the policy data 145. Therefore, the same policy ID 125a as the policy ID 145a of the policy data 145, and the policy data 145 The policy context copy 125Ab is the same as the policy context 145b and the action 125c is the same as the action 145c of the policy data.

また、図8に示すように、変数対応表127Aは、ポリシデータコピー125A内の引数「x、y」が変数として格納される変数領域127aと、ターゲットシステムコールの引数が代入値として格納される代入値領域127bとを有する。この段階で、変数対応表127Aには、変数領域127aに、ポリシリコンテキストコピー125Abに記述されている全てのシステムコールの引数「x、y」が格納され、代入値領127bには、何ら格納されない。   Further, as shown in FIG. 8, the variable correspondence table 127A stores a variable area 127a in which the arguments “x, y” in the policy data copy 125A are stored as variables, and an argument of the target system call as an assigned value. And an assigned value area 127b. At this stage, in the variable correspondence table 127A, arguments “x, y” of all system calls described in the polysilicon text copy 125Ab are stored in the variable area 127a, and nothing is stored in the substitution value area 127b. Not.

システムコールフック部113は、ポリシリコンテキストコピーとターゲットシステムコールとを比較し(S23)、このターゲットシステムコールがポリシコンテキストコピー中の対応要素と要素マッチしているか否かを判定する(S24)。   The system call hook unit 113 compares the polysilicon text copy with the target system call (S23), and determines whether or not the target system call matches the corresponding element in the policy context copy (S24).

ここでの判定では、以下の三つの条件a)b)c)を満たす場合に、要素マッチと判定する。但し、条件c)は、ポリシコンテキストコピー中でターゲットシステムコールに対応する要素がオブジェクトタイプ条件付き変数である場合に適用される条件であり、ポリシコンテキストコピー中でターゲットシステムコールに対応する要素がオブジェクトタイプ条件付き変数でない場合には、二つの条件a)b)を満たす場合に、要素マッチと判定する。   In this determination, an element match is determined when the following three conditions a) b) c) are satisfied. However, the condition c) is a condition applied when the element corresponding to the target system call in the policy context copy is an object type conditional variable, and the element corresponding to the target system call in the policy context copy is an object. If the variable is not a type conditional variable, it is determined as an element match if the two conditions a) and b) are satisfied.

a)ターゲットシステムコールのシステムコール名がポリシコンテキストコピー内に存在する。   a) The system call name of the target system call exists in the policy context copy.

b)ターゲットシステムコール中の引数が変数対応表127A内の変数と代入値との組合わせに矛盾がない。   b) The arguments in the target system call are consistent with the combinations of variables and substitution values in the variable correspondence table 127A.

c)ターゲットシステムコール中の引数に関するオブジェクトタイプと、ポリシコンテキストコピーの対応システムコール中に記述されているオブジェクトタイプとが一致する。   c) The object type related to the argument in the target system call matches the object type described in the corresponding system call of the policy context copy.

この場合、ターゲットシステムコール「open(myfile)」のシステムコール名「open」であり、ポリシリコンテキストコピー125Ab内の先頭要素であるシステムコール名が「open」又は「read」であるため、システムコールフック部113は、条件a)を満たすと判定する。   In this case, since the system call name “open” of the target system call “open (myfile)” and the system call name that is the first element in the polysilicon text copy 125Ab are “open” or “read”, the system call The hook unit 113 determines that the condition a) is satisfied.

また、変数対応表127A(図8)には、変数領域127aに「x、y」が格納され、代入値領127bには何ら格納されておらず、代入値として任意の値を代入することが可能であるため、ターゲットシステムコール「open(myfile)」中の引数「myfile」は、変数対応表127A内の変数と変数対応表127A内の代入値との組合わせに矛盾せず、システムコールフック部113は、条件b)を満たすと判定する。なお、矛盾する場合については後述する。   Further, in the variable correspondence table 127A (FIG. 8), “x, y” is stored in the variable area 127a, nothing is stored in the substitution value area 127b, and any value can be substituted as the substitution value. Since it is possible, the argument “myfile” in the target system call “open (myfile)” does not contradict the combination of the variable in the variable correspondence table 127A and the assignment value in the variable correspondence table 127A, and the system call hook The unit 113 determines that the condition b) is satisfied. In addition, the case where it contradicts is mentioned later.

また、ターゲットシステムコール「open(myfile)」中の引数「myfile」に関するオブジェクトタイプは、オブジェクトタイプ表146(図2)によれば「secret_t」であり、ポリシコンテキスト125Abの対応システムコール「open」中に記述されているオブジェクトタイプも「secret_t」であるため、システムコールフック部113は、条件c)を満たすと判定する。   The object type related to the argument “myfile” in the target system call “open (myfile)” is “secret_t” according to the object type table 146 (FIG. 2), and the corresponding system call “open” in the policy context 125Ab Since the object type described in “1” is also “secret_t”, the system call hook unit 113 determines that the condition c) is satisfied.

よって、この場合、システムコールフック部113は、このターゲットシステムコール「open(myfile)」がポリシコンテキスト125Abと要素マッチしていると判定する。   Therefore, in this case, the system call hook unit 113 determines that the target system call “open (myfile)” is element matched with the policy context 125Ab.

システムコールフック部113は、ステップ24でターゲットシステムコールがポリシコンテキストコピーと要素マッチしていないと判定すると、ステップ27に進み、要素マッチしていると判定すると、ポリシリコンテキストコピー及び変数対応表127を更新する(S25)。   If the system call hook unit 113 determines in step 24 that the target system call does not match the policy context copy, the system call hook unit 113 proceeds to step 27. If the system call hook unit 113 determines that the element matches, the polysilicon text copy and variable correspondence table 127 Is updated (S25).

ここで、ポリシリコンテキストコピーの更新とは、このポリシコンテキストコピー中で、ターゲットシステムコールに対する対応要素を、マッチしたことを示す「true」に変更する等を行って、このポリシコンテキストコピーの記述内容を整理することである。   Here, the update of the polysilicon text copy means that the description content of this policy context copy is changed by changing the corresponding element for the target system call to "true" indicating that it matches in the policy context copy. Is to organize.

具体的に、システムコールフック部113は、図7に示すように、ポリシリコンテキストコピー125Abの更新では、まず、ポリシリコンテキストコピー125Ab中で要素マッチと判定した「open(secret_t & x)」を、マッチしたことを示す「true」に変更したポリシリコンテキストコピー125Bbを作成する。次に、このポリシコンテキストコピー125Bb中の「or」の左辺が「true」になったため、or式の全体を「true」に変更したポリシコンテキストコピー125Cbを作成する。以上で、この段階でのポリシコンテキストコピーの更新が終了する。   Specifically, as shown in FIG. 7, in updating the polysilicon text copy 125Ab, the system call hook unit 113 first sets “open (secret_t & x)” determined as an element match in the polysilicon text copy 125Ab. Then, the polysilicon text copy 125Bb changed to “true” indicating the match is created. Next, since the left side of “or” in the policy context copy 125Bb becomes “true”, the policy context copy 125Cb is created by changing the whole or expression to “true”. This is the end of updating the policy context copy at this stage.

また、ここでの変数対応表127の更新とは、変数対応表127の代入値領域127bに、ターゲットシステムコールの引数を格納することである。   The updating of the variable correspondence table 127 here is to store the argument of the target system call in the substitution value area 127b of the variable correspondence table 127.

具体的に、システムコールフック部113は、図8に示すように、変数対応表127Aの代入値領域127bのうち、ポリシリコンテキストコピー125Ab中の対応要素の引数「x」に対応する代入値領域127bに、ターゲットシステムコール「open(myfile)」の引数「myfile」を格納し、変数対応表127Bを作成する。   Specifically, as shown in FIG. 8, the system call hook unit 113 assigns a substitution value area corresponding to the argument “x” of the corresponding element in the polysilicon text copy 125Ab out of the substitution value area 127b of the variable correspondence table 127A. The argument “myfile” of the target system call “open (myfile)” is stored in 127b, and the variable correspondence table 127B is created.

システムコールフック部113は、ポリシコンテキストコピー及び変数対応表127の更新が終了すると(S25)、ターゲットシステムコールの受け付けで、ポリシマッチしたか否かを判定し(S26)、ポリシマッチしたと判定すると、ポリシデータコピー125のポリシID125aをマッチポリシIDとしてRAM120に記憶する(S29)。また、ポリシアンマッチと判定するとステップ27に進む。ポリシマッチの判定は、ポリシコンテキストコピーの記述内容が「true」のみであるか否かによる。   When the policy context copy and update of the variable correspondence table 127 are completed (S25), the system call hook unit 113 determines whether or not the policy is matched by accepting the target system call (S26), and determines that the policy is matched. The policy ID 125a of the policy data copy 125 is stored in the RAM 120 as a match policy ID (S29). If it is determined that the polycyan match, the process proceeds to step 27. The policy match determination is based on whether or not the description content of the policy context copy is only “true”.

ここでは、図7に示すように、ポリシコンテキストコピー125Cbの記述内容が「true」のみでないため、ポリシアンマッチと判定し、ステップ27に進む。   Here, as shown in FIG. 7, since the description content of the policy context copy 125Cb is not only “true”, it is determined as a polycyan match, and the process proceeds to step 27.

システムコールフック部113は、ステップ24で要素マッチしていないと判定した場合、さらに、上述のステップ26でポリシアンマッチと判定した場合、システムコールテーブル121dから全ての要素を抽出したか否かを判定する(S27)。全ての要素を抽出していればステップ30に進み、全ての要素を抽出していればステップ28に進む。   The system call hook unit 113 determines whether or not all elements have been extracted from the system call table 121d when it is determined in step 24 that the elements do not match, and further, in the case where it is determined that polycyan matches in step 26 described above. (S27). If all elements have been extracted, the process proceeds to step 30, and if all elements have been extracted, the process proceeds to step 28.

この場合、システムコールテーブル121dには、システムコール「open(myfile)」のみしか記述されていないため、システムコールフック部113は、システムコールテーブル121dから全ての要素を抽出したと判定し、ステップ30に進む。   In this case, since only the system call “open (myfile)” is described in the system call table 121d, the system call hook unit 113 determines that all elements are extracted from the system call table 121d, and step 30 is performed. Proceed to

システムコールフック部113は、ステップ30で、ポリシデータコピー及び変数対応表127をRAM120から削除し、ステップ21に戻る。   In step 30, the system call hook unit 113 deletes the policy data copy and variable correspondence table 127 from the RAM 120 and returns to step 21.

システムコールフック部113は、ステップ21で、前述したように、全てのポリシデータ145をコピーしたか否かを判断する。ここでは、前述したように、ポリシデータベース144にはポリシデータ145が一つか格納されていないと仮定しているので、全てのポリシデータ145をコピーしたと判断し、ポリシマッチ判定処理(S13)を終了する。一方、ポリシデータベース144にはポリシデータ145が複数格納されている場合、システムコールフック部113は、前述のステップ22以降の処理を実行する。   In step 21, the system call hook unit 113 determines whether all the policy data 145 has been copied as described above. Here, as described above, since it is assumed that one policy data 145 is not stored in the policy database 144, it is determined that all the policy data 145 has been copied, and the policy match determination process (S13) is performed. finish. On the other hand, when a plurality of policy data 145 is stored in the policy database 144, the system call hook unit 113 executes the processes after step 22 described above.

図5を用いて前述したように、システムコールフック部113は、以上で説明したポリシマッチ判定処理(S13)を終了すると、RAM120上にマッチポリシIDが記憶されているか否かを判断する(S14)。この場合、RAM120上にマッチポリシIDが記憶されていないため、ステップ10で受け付けたシステムコールをOS主機能部112へ出力して(S17)、ステップ10に戻る。   As described above with reference to FIG. 5, the system call hook unit 113 determines whether or not the match policy ID is stored in the RAM 120 when the policy match determination process (S13) described above is completed (S14). ). In this case, since the match policy ID is not stored in the RAM 120, the system call accepted in step 10 is output to the OS main function unit 112 (S17), and the process returns to step 10.

次に、プロセス118から、前述のシステムコール「open(myfile)」の出力後、システムコール「sendto(myfile,server)」が出力された場合について説明する。   Next, a case where the system call “sendto (myfile, server)” is output from the process 118 after the above-described system call “open (myfile)” is output will be described.

図5を用いて前述したように、プロセス118からシステムコール「sendto(myfile,server)」が出力され、これをシステムコールフック部113が受け付けると(S10)、このシステムコールのシステムコール名「sendto」と、図2に示すポリシデータベース144のポリシデータ145に記述されているシステムコール名とを比較する(S11)。この際、システムコールフック部113は、ポリシデータ145中に、受け付けたシステムコールのシステムコール名「sendto」と一致するものがあると判断して、このシステムコール「sendto(myfile,server)」を、RAM120上に展開されているシステムコールテーブル121d(図4)に追記する(S12)。この結果、システムコールテーブル121dには、open(myfile)→ … → sendto(myfile,server)が記述されることになる。   As described above with reference to FIG. 5, when the system call “sendto (myfile, server)” is output from the process 118 and is received by the system call hook unit 113 (S10), the system call name “sendto” of this system call is received. And the system call name described in the policy data 145 of the policy database 144 shown in FIG. 2 (S11). At this time, the system call hook unit 113 determines that the policy data 145 matches the system call name “sendto” of the received system call, and sends this system call “sendto (myfile, server)”. The information is added to the system call table 121d (FIG. 4) developed on the RAM 120 (S12). As a result, open (myfile) →... → sendto (myfile, server) is described in the system call table 121d.

システムコールフック部113は、次に、ポリシマッチ判定処理を行う(S13)。このポリシマッチ判定処理で、システムコールフック部113は、図6のフローチャートに示すように、まず、システムコールテーブル121dから、先頭要素としてのシステムコールをターゲットシステムコールとして抽出する(S20)。この場合、システムコールテーブル121dには、先頭要素としてシステムコール「open(myfile)」が記述されているので、このシステムコール「open(myfile)」をターゲットシステムコールとして抽出する。   Next, the system call hook unit 113 performs policy match determination processing (S13). In this policy match determination process, the system call hook unit 113 first extracts a system call as a head element from the system call table 121d as a target system call as shown in the flowchart of FIG. 6 (S20). In this case, since the system call “open (myfile)” is described as the head element in the system call table 121d, this system call “open (myfile)” is extracted as the target system call.

システムコールフック部113は、以降、システムコール「open(myfile)」を受け付けたときのポリシマッチ判定処理と同様、ステップ21,22,23,24,25,26,27を実行する。この結果、ポリシコンテキストコピーは、図7中のポリシコンテキストコピー125Cbの状態になり、変数対応表127は、図8中の変数対応表127Bの状態になる。   Thereafter, the system call hook unit 113 executes steps 21, 22, 23, 24, 25, 26, and 27 in the same manner as the policy match determination process when the system call “open (myfile)” is received. As a result, the policy context copy is in the state of the policy context copy 125Cb in FIG. 7, and the variable correspondence table 127 is in the state of the variable correspondence table 127B in FIG.

システムコールフック部113は、ステップ27で、前述したように、システムコールテーブル121dから全ての要素を抽出したか否かを判定する。この場合、システムコールテーブル121dには、システムコール「open(myfile)」の他に、システムコール「sendto(myfile,server)」も記述されているため、システムコールフック部113は、システムコールテーブル121dから全ての要素を抽出していないと判定し、ステップ28に進む。   In step 27, the system call hook unit 113 determines whether all elements have been extracted from the system call table 121d as described above. In this case, since the system call “sendto (myfile, server)” is described in addition to the system call “open (myfile)” in the system call table 121 d, the system call hook unit 113 is configured to use the system call table 121 d. From step S28, it is determined that all elements have not been extracted.

システムコールフック部113は、ステップ28で、システムコールテーブル121dから次要素を抽出して、これをターゲットシステムコールとし、ステップ23に戻る。この場合、システムコールフック部113は、ターゲットシステムコールとしてシステムコール「sendto(myfile,server)」を抽出する。   In step 28, the system call hook unit 113 extracts the next element from the system call table 121d, sets this as the target system call, and returns to step 23. In this case, the system call hook unit 113 extracts the system call “sendto (myfile, server)” as the target system call.

次に、システムコールフック部113は、前述したように、ポリシリコンテキストコピーとターゲットシステムコールとを比較し(S23)、このターゲットシステムコールがポリシコンテキストコピー中の対応要素と要素マッチしているか否かを判定する(S24)。   Next, as described above, the system call hook unit 113 compares the polysilicon text copy with the target system call (S23), and whether or not the target system call matches the corresponding element in the policy context copy. Is determined (S24).

この要素マッチ判定では、ポリシコンテキストコピー125Cb中でターゲットシステムコール「sendto(myfile,server)」に対応する要素「sendto(x,y)」がオブジェクトタイプ条件付き変数でないので、上記三つの条件a)b)c)のうち、条件a)b)を満たす場合に、要素マッチと判定する。   In this element match determination, since the element “sendto (x, y)” corresponding to the target system call “sendto (myfile, server)” in the policy context copy 125Cb is not an object type conditional variable, the above three conditions a) b) If condition a) b) is satisfied among c), it is determined as an element match.

この場合、ターゲットシステムコール「sendto(myfile,server)」のシステムコール名「sendto」であり、ポリシリコンテキストコピー125Cb内の対応要素であるシステムコール名が「sendto」であるため、システムコールフック部113は、条件a)を満たすと判定する。   In this case, since the system call name “sendto” of the target system call “sendto (myfile, server)” and the system call name corresponding to the polysilicon text copy 125Cb are “sendto”, the system call hook portion 113 determines that the condition a) is satisfied.

また、この場合、変数対応表127B(図8)には、変数領域127aに「x、y」が格納され、代入値領127bには、変数xに対応する代入値として「myfile」が格納されており、変数yに対する代入値が格納されていない。また、ターゲットシステムコール「sendto(myfile,server)」中の引数「myfile,server」は、変数対応表127A内の変数と変数対応表127A内の代入値との組合わせに矛盾せず、システムコールフック部113は、条件b)を満たすと判定する。なお、仮に、ターゲットシステムコールが「sendto(ourfile,server)」である場合には、変数xに対応する値が「myfile」ではなく「ourfile」であるため、変数対応表127A内の変数と変数対応表127A内の代入値との組合わせに矛盾し、条件b)を満たさないと判定することになる。   In this case, in the variable correspondence table 127B (FIG. 8), “x, y” is stored in the variable area 127a, and “myfile” is stored in the substitution value area 127b as the substitution value corresponding to the variable x. The substitution value for the variable y is not stored. In addition, the argument “myfile, server” in the target system call “sendto (myfile, server)” does not contradict the combination of the variable in the variable correspondence table 127A and the assigned value in the variable correspondence table 127A, and the system call The hook unit 113 determines that the condition b) is satisfied. If the target system call is “sendto (ourfile, server)”, since the value corresponding to the variable x is “ourfile” instead of “myfile”, the variables and variables in the variable correspondence table 127A are displayed. It is determined that the combination with the substitution value in the correspondence table 127A is inconsistent and the condition b) is not satisfied.

よって、この場合、システムコールフック部113は、このターゲットシステムコール「sendto(myfile,server)がポリシコンテキスト125Cbと要素マッチしていると判定する。   Therefore, in this case, the system call hook unit 113 determines that the target system call “sendto (myfile, server) is element matched with the policy context 125Cb.

システムコールフック部113は、ステップ23でターゲットシステムコールがポリシコンテキストコピーと要素マッチしていると判定すると、ポリシリコンテキストコピー及び変数対応表127を更新する(S25)。   If the system call hook unit 113 determines in step 23 that the target system call matches the policy context copy, the system call hook unit 113 updates the polysilicon text copy and variable correspondence table 127 (S25).

具体的に、システムコールフック部113は、図7に示すように、ポリシリコンテキストコピー125Cbの更新では、まず、ポリシリコンテキストコピー125Cb中で要素マッチと判定した「sendto(x,y)」を、マッチしたことを示す「true」に変更したポリシリコンテキストコピー125Dbを作成する。次に、このポリシコンテキストコピー125Db中の「→」の両辺が「true」になったため、全体を「true」に変更したポリシコンテキストコピー125Ebを作成する。以上で、ポリシコンテキストコピーの更新が終了する。   Specifically, as shown in FIG. 7, when updating the polysilicon text copy 125Cb, the system call hook unit 113 first selects “sendto (x, y)” determined as an element match in the polysilicon text copy 125Cb. Then, the polysilicon text copy 125Db changed to “true” indicating the match is created. Next, since both sides of “→” in the policy context copy 125Db have become “true”, the policy context copy 125Eb in which the whole is changed to “true” is created. The policy context copy update is thus completed.

また、システムコールフック部113は、図8に示すように、変数対応表127Bの代入値領域127bのうち、ポリシリコンテキストコピー125Cb中の対応要素の引数「x,y」のうち、引数「y」に対応する代入値領域127bに、ターゲットシステムコール「sendto(myfile,server)」の引数「server」を格納し、変数対応表127Eを作成する。   Further, as shown in FIG. 8, the system call hook unit 113 sets the argument “y” among the arguments “x, y” of the corresponding element in the polysilicon text copy 125Cb in the substitution value area 127b of the variable correspondence table 127B. ”Is stored in the substitution value area 127b corresponding to“ sendto (myfile, server) ”, and a variable correspondence table 127E is created.

システムコールフック部113は、ポリシコンテキストコピー及び変数対応表127の更新が終了すると、前述したように、ターゲットシステムコールの受け付けで、ポリシマッチしたか否かを判定する(S28)。この場合、ポリシコンテキストコピー125Ebの記述内容が「true」のみであるため、ポリシマッチと判定し、ステップ29に進む。   When the policy context copy and update of the variable correspondence table 127 are completed, the system call hook unit 113 determines whether or not a policy match has been made by accepting the target system call as described above (S28). In this case, since the description content of the policy context copy 125Eb is only “true”, the policy match is determined, and the process proceeds to step 29.

システムコールフック部113は、ステップ29で、前述したように、ポリシデータコピー125のポリシID125aをマッチポリシIDとしてRAM120に記憶する。この場合、ポリシデータコピー125のポリシID125a「8」をマッチポリシIDとしてRAM120に記憶する。   In step 29, the system call hook unit 113 stores the policy ID 125a of the policy data copy 125 in the RAM 120 as a match policy ID, as described above. In this case, the policy ID 125a “8” of the policy data copy 125 is stored in the RAM 120 as a match policy ID.

そして、システムコールフック部113は、ポリシデータコピー125及び変数対応表127をRAM120から削除してから(S30)、ステップ21に戻る。   Then, the system call hook unit 113 deletes the policy data copy 125 and the variable correspondence table 127 from the RAM 120 (S30), and then returns to step 21.

システムコールフック部113は、ステップ21で、全てのポリシデータ145をコピーしたと判断すると、このポリシマッチ判定処理(S13)を終了する。   If the system call hook unit 113 determines in step 21 that all the policy data 145 has been copied, the policy match determination process (S13) ends.

図5を用いて前述したように、システムコールフック部113は、以上で説明したポリシマッチ判定処理(S13)を終了すると、RAM120上にマッチポリシIDが記憶されているか否かを判断する(S14)。この場合、RAM120上にマッチポリシID「8」が記憶されているため、システムコールフック部113は、このマッチポリシID「8」のポリシデータ145からアクション145cとしての「exit(1)」を抽出する(S15)。そして、システムコールフック部113は、アクション145cとしての「exit(1)」をOS主機能部112へ出力してから(S16)、ステップ10に戻る。   As described above with reference to FIG. 5, the system call hook unit 113 determines whether or not the match policy ID is stored in the RAM 120 when the policy match determination process (S13) described above is completed (S14). ). In this case, since the match policy ID “8” is stored in the RAM 120, the system call hook unit 113 extracts “exit (1)” as the action 145c from the policy data 145 of the match policy ID “8”. (S15). The system call hook unit 113 outputs “exit (1)” as the action 145c to the OS main function unit 112 (S16), and then returns to step 10.

なお、ポリシマッチ判定処理(S13)では、複数のポリシデータの全てに関して判定が実行されるため、システムコールテーブル121dに記述されているシステムコールが複数のポリシデータにマッチしており、RAM120上に複数のマッチポリシIDが記憶されている場合がある。この場合、システムコールフック部113は、ステップ16において、マッチポリシIDが小さい、つまり重要度の高いポリシデータ中のアクションから順に、OS主機能部112へ出力する。   In the policy match determination process (S13), since determination is performed for all of the plurality of policy data, the system call described in the system call table 121d matches the plurality of policy data and is stored in the RAM 120. Multiple match policy IDs may be stored. In this case, the system call hook unit 113 outputs to the OS main function unit 112 in order from the action in the policy data having a small match policy ID, that is, a high importance in step 16.

次に、図9に示すフローチャートに従って、OS主機能部112の動作について説明する。   Next, the operation of the OS main function unit 112 will be described with reference to the flowchart shown in FIG.

OS主機能部112は、システムコールフック部113からのシステムコール出力を待ち(S40)、このシステムコールを受け付けると、このシステムコールを実行し(S41)、ステップ40に戻る。   The OS main function unit 112 waits for a system call output from the system call hook unit 113 (S40). When this system call is received, the OS main function unit 112 executes this system call (S41) and returns to step 40.

システムコールフック部113から出力されるシステムコールとしては、システムコールフック部113がプロセス118から受け付けたシステムコールと、ポリシマッチしたときにシステムコールフック部113が出力するアクションとしてのシステムコールとがある。さらに、アクションとしてのシステムコールには、プロセスの動作規制を示すシステムコールのみの場合と、プロセスの動作規制を示すシステムコールと受付システムコール(プロセス118から受け付けたシステムコール)とを含む場合とがある。   The system call output from the system call hook unit 113 includes a system call received by the system call hook unit 113 from the process 118 and a system call as an action output by the system call hook unit 113 when a policy match is made. . Further, the system call as an action includes only a system call indicating process operation restriction, and may include a system call indicating process operation restriction and a reception system call (system call received from the process 118). is there.

OS主機能部112は、以上のシステムコールを実行する。具体的に、ポリシマッチしたときにシステムコールフック部113が出力するアクションとしてのシステムコールとして、プロセスの強制終了又は停止を意味するシステムコールを受け付けると、このプロセスを強制終了又は停止する。また、アクションとしてのシステムコールとして、エラーメッセージを出力する旨のシステムコールに引き続き、受付システムコールを受け付けると、ディスプレイ152にエラーメッセージを表示させてから、当該受付システムコールを実行する。   The OS main function unit 112 executes the above system call. Specifically, when a system call meaning forced termination or stop of a process is received as a system call as an action output by the system call hook unit 113 when a policy match is made, this process is forcibly terminated or stopped. Further, when a reception system call is accepted as a system call as an action following a system call for outputting an error message, the reception system call is executed after an error message is displayed on the display 152.

以上のように、本実施形態では、OSプログラム141に予め組み込まれているポリシデータベース144中の複数のポリシデータを用いて、コンピュータのセキュリティを一定範囲で確保しているで、従来のSELinux手法のように、新たなプロセスが追加される毎に、このプロセスに対するドメインの設定、さらに、このドメインとオブジェクトのタイプとの関係付けを行う必要がなく、コンピュータユーザの負担を軽減することができる。   As described above, in this embodiment, the security of the computer is ensured within a certain range by using a plurality of policy data in the policy database 144 pre-installed in the OS program 141. Thus, each time a new process is added, it is not necessary to set a domain for this process and to associate the domain with the object type, thereby reducing the burden on the computer user.

また、従来のSELinux手法では、例えば、システムコール「open」でオブジェクトにアクセスしようとした場合、このオブジェクトがアクセス規制のタイプであれば、このシステムコールの実行を認めていない。しかしながら、実際には、単に、プロセスが規制対象のオブジェクトにアクセスしただけでは、外部に情報漏えいすることがない。つまり、アクセス規制対象のオブジェクトであっても、このオブジェクトにアクセスするという行為自体を防止する必要はない。   Further, in the conventional SELinux method, for example, when an object is accessed by the system call “open”, if this object is a type of access restriction, execution of this system call is not permitted. However, in practice, information is not leaked to the outside simply by accessing a regulated object. That is, it is not necessary to prevent the act of accessing this object even for an object subject to access restriction.

一方、本実施形態では、ポリシデータとして、システムコール「open」とシステムコール「sendto(オブジェクトを他のコンピュータに送る旨を示すシステムコール)」とを組合わせたポリシデータが存在していれば、システムコール「open」でのオブジェクトがアクセス規制対象であっても、このシステムコール「open」を実行する。そして、このシステムコール「open」を実行した後、システムコール「sendto」を実行しようとした場合に、この実行を認めていない。よって、本実施形態では、不必要にシステムコールの実行を制限せずに、情報漏えいを防ぐことができる。   On the other hand, in the present embodiment, if there is policy data combining the system call “open” and the system call “sendto (system call indicating that an object is sent to another computer)” as policy data, This system call “open” is executed even if the object with the system call “open” is subject to access control. Then, after executing this system call “open”, if an attempt is made to execute the system call “sendto”, this execution is not permitted. Therefore, in this embodiment, information leakage can be prevented without unnecessarily restricting execution of system calls.

なお、本実施形態では、OS主機能部112が、システムコールテーブル121dを含むタスク・ストラクト121のRAM120上に作成しているが、システムコールテーブル121dをRAM上に作成するものの、このシステムコールテーブル121dをタスク・ストラクト121内に設けない場合には、システムコールフック部113がシステムコールテーブル121dの作成及び更新を行うようにしてもよい。   In this embodiment, the OS main function unit 112 creates the task call 121 including the system call table 121d on the RAM 120. However, although the system call table 121d is created on the RAM, this system call table When 121d is not provided in the task struct 121, the system call hook unit 113 may create and update the system call table 121d.

「第二実施形態」
本発明に係るコンピュータの第二実施形態について、図10〜図13を用いて説明する。
"Second embodiment"
A second embodiment of the computer according to the present invention will be described with reference to FIGS.

本実施形態のコンピュータ100Aは、そのハードウェア構成が第一実施形態と同一で、ソフトウェア構成のみが異なっている。すなわち、補助記憶装置140に格納されているOSプログラム142Aが第一実施形態と異なっている。   The computer 100A of the present embodiment has the same hardware configuration as that of the first embodiment, but differs only in the software configuration. That is, the OS program 142A stored in the auxiliary storage device 140 is different from the first embodiment.

OSプログラム142Aは、第一実施形態と異なるOS主機能モジュール142A及びシステムコールフックモジュール143Aと、第一実施形態と同じポリシデータベース144とを有している。   The OS program 142A includes an OS main function module 142A and a system call hook module 143A that are different from those in the first embodiment, and a policy database 144 that is the same as that in the first embodiment.

このように、OS主機能モジュール142A及びシステムコールフックモジュール143Aが第一実施形態と異なるため、CPU110の機能構成の一つであるOS実行部111A、その要素であるOS主機能部112A及びシステムコールフック部113Aも第一実施形態と異なっている。なお、OS主機能部112A及びシステムコールフック部113Aに関する第一実施形態との相違点に関しては、後述の動作説明の際に説明する。   Thus, since the OS main function module 142A and the system call hook module 143A are different from the first embodiment, the OS execution unit 111A that is one of the functional configurations of the CPU 110, the OS main function unit 112A that is an element thereof, and the system call The hook portion 113A is also different from the first embodiment. Note that differences from the first embodiment regarding the OS main function unit 112A and the system call hook unit 113A will be described in the description of the operation described later.

RAM120に上に作成されるタスク・ストラクト121Aは、図11に示すように、第一実施形態におけるシステムコールテーブル121dの替わりに、ポリシデータコピーテーブル121eを有している。   As shown in FIG. 11, the task struct 121A created on the RAM 120 has a policy data copy table 121e instead of the system call table 121d in the first embodiment.

このポリシデータコピーテーブル121eは、ポリシデータベース144に格納されている全てのポリシデータ145がコピーされたポリシデータコピー125,125,…と、各ポリシデータコピー125,125,…に対応付けられた変数対応表127,127,…と、を有している。   This policy data copy table 121e includes policy data copies 125, 125,..., Which are all of the policy data 145 stored in the policy database 144, and variables associated with the respective policy data copies 125, 125,. Correspondence tables 127, 127,...

このタスク・ストラクト121Aは、OS主機能部112Aにより、プロセス118に関するアプリケーションプログラム148の起動時に、RAM120に上に作成される。また、このタスク・ストラクト121Aの各領域のデータのうち、ポリシコピーテーブル121eを除く全ての領域のデータは、いずれも、OS主機能部112Aにより更新される。一方、ポリシコピーテーブル121eのデータは、システムコールフック部113Aにより更新される。   This task struct 121A is created on the RAM 120 when the OS main function unit 112A starts up the application program 148 related to the process 118. In addition, among the data of each area of the task struct 121A, the data of all areas except the policy copy table 121e are all updated by the OS main function unit 112A. On the other hand, the data in the policy copy table 121e is updated by the system call hook unit 113A.

次に、図12及び図13に示すフローチャートに従って、システムコールフック部113の動作について説明する。なお、図12及び図13中で、第一実施形態と異なる符合が付されているブロックは、第一実施形態と異なる処理を行うブロックである。   Next, the operation of the system call hook unit 113 will be described with reference to the flowcharts shown in FIGS. In FIG. 12 and FIG. 13, blocks that are given different signs from the first embodiment are blocks that perform processing different from the first embodiment.

アプリケーションプログラム148が起動し、このアプリケーションプログラム148によるプロセス118が動作可能な状態になると、OS主機能部112Aは、このプロセス118に関するタスク・ストラクト121AをRAM121上に展開する。この際、タスク・ストラクト121Aのポリシデータコピーテーブル121eには、前述したように、ポリシデータベース144内の全てのポリシデータ145のポリシデータコピー125,125,…が作成されると共に、各ポリシデータコピー125,125,…に対応付けて変数対応表127,127,…が作成される。   When the application program 148 is activated and the process 118 by the application program 148 becomes operable, the OS main function unit 112A develops a task struct 121A related to the process 118 on the RAM 121. At this time, in the policy data copy table 121e of the task struct 121A, as described above, the policy data copies 125, 125,... Of all the policy data 145 in the policy database 144 are created, and each policy data copy is also created. Variable correspondence tables 127, 127,... Are created in association with 125, 125,.

本実施形態のOS主機能部112Aは、以上のタスク・ストラクト121Aの作成動作が第一実施形態と異なる。   The OS main function unit 112A of the present embodiment is different from the first embodiment in the operation of creating the task struct 121A described above.

システムコールフック部113Aは、プロセス118が動作可能な状態になると、このプロセス118の監視を開始し、このプロセス118からのシステムコール出力を待ち(S10)、プロセス118からのシステムコールを受け付けると、このシステムコールに関して、ポリシデータとのポリシマッチ判定を行う(S13A)。   When the process 118 becomes operable, the system call hook unit 113A starts monitoring the process 118, waits for a system call output from the process 118 (S10), and receives a system call from the process 118. For this system call, a policy match with policy data is determined (S13A).

システムコールフック部113Aは、次に、第一実施形態と同様、RAM120上にポリシIDが記憶されているか否かを判断する(S14)。そして、システムコールフック部113Aは、RAM120上にポリシIDが記憶されていない、言い換えると、ポリシアンマッチと判断すると、このシステムコールをOS主機能部112Aへ出力し(S17)、ステップ10に戻る。   Next, similarly to the first embodiment, the system call hook unit 113A determines whether or not a policy ID is stored in the RAM 120 (S14). When the system call hook unit 113A determines that no policy ID is stored in the RAM 120, in other words, a polycyan match, the system call hook unit 113A outputs this system call to the OS main function unit 112A (S17), and returns to step 10.

また、システムコールフック部113Aは、RAM120上にポリシIDが記憶されている、言い換えると、ポリシマッチと判断すると、当該ポリシIDのポリシデータコピーからシステムコールの一種であるアクションを抽出し(S15A)、当該ポリシIDのポリシデータコピー125及び変数対応表127を削除した後、当該ポリシIDの新たなポリシデータコピー125及び変数対応表127を再生する(S19)。そして、システムコールフック部113Aは、ステップ15Aで抽出したアクションをOS主機能部112へ出力して(S16)、ステップ10に戻る。   When the system call hook unit 113A determines that the policy ID is stored in the RAM 120, in other words, a policy match, the system call hook unit 113A extracts an action that is a type of system call from the policy data copy of the policy ID (S15A) Then, after deleting the policy data copy 125 and variable correspondence table 127 of the policy ID, the new policy data copy 125 and variable correspondence table 127 of the policy ID is reproduced (S19). Then, the system call hook unit 113A outputs the action extracted in step 15A to the OS main function unit 112 (S16), and returns to step 10.

次に、ポリシマッチ判定処理(S13A)の詳細処理について、図13のフローチャートに従って説明する。   Next, detailed processing of the policy match determination processing (S13A) will be described with reference to the flowchart of FIG.

システムコールフック部113Aは、ポリシデータコピーテーブル121e内の全てのポリシリコンテキストコピー125b,125b,…とターゲットシステムコールとを比較し(S23A)、このターゲットシステムコールがいずれかのポリシコンテキストコピー125b中の対応要素と要素マッチしているか否かを、第一実施形態と同様の判定手法で判定する(S24A)。   The system call hook unit 113A compares all the polysilicon text copies 125b, 125b,... In the policy data copy table 121e with the target system call (S23A), and this target system call is in any policy context copy 125b. Whether or not the corresponding element is matched is determined by the same determination method as in the first embodiment (S24A).

システムコールフック部113Aは、ターゲットシステムコールがいずれのポリシコンテキストコピー125b中の対応要素とも要素マッチしていないと判定すると、直ちに、このポリシマッチ判定処理(S13A)を終了する。   If the system call hook unit 113A determines that the target system call does not match any of the corresponding elements in any policy context copy 125b, it immediately ends this policy match determination process (S13A).

また、システムコールフック部113Aは、要素マッチしていると判定すると、要素マッチと判定した全てのポリシコンテキストコピー125b、これに対応する変数対応表127を、第一実施形態と同様の手法で更新する(S25A)。   If the system call hook unit 113A determines that the elements match, it updates all policy context copies 125b determined to be element matches and the variable correspondence table 127 corresponding thereto by the same method as in the first embodiment. (S25A).

システムコールフック部113Aは、次に、ステップ25Aで更新した全てのポリシコンテキストコピー125bに関して、いずれかがポリシマッチしていることを示しているか否かを判定する(S26a)。なお、ポリシコンテキストコピー125bがポリシマッチしていることを示しているか否かは、第一実施形態と同様、その記述内容が「true」のみであるか否かによる。   Next, the system call hook unit 113A determines whether any of the policy context copies 125b updated in step 25A indicates that there is a policy match (S26a). Whether or not the policy context copy 125b indicates a policy match depends on whether or not the description content is only “true”, as in the first embodiment.

システムコールフック部113Aは、いずれかのポリシコンテキストコピー125bがポリシマッチしたことを示している判定すると、そのポリシデータコピー125bのポリシID125aをマッチポリシIDとしてRAM120に記憶して(S29A)、ポリシマッチ判定処理(S13A)を終了する。また、ポリシアンマッチと判定すると、直ちに、ポリシマッチ判定処理(S13A)を終了する。   If the system call hook unit 113A determines that any policy context copy 125b indicates a policy match, the system call hook unit 113A stores the policy ID 125a of the policy data copy 125b in the RAM 120 as a match policy ID (S29A). The determination process (S13A) ends. If it is determined that the polycyan match, the policy match determination process (S13A) is immediately terminated.

以上のように、本実施形態でも、本実施形態では、OSプログラム141に予め組み込まれているポリシデータベース144中の複数のポリシデータを用いて、コンピュータのセキュリティを一定範囲内で確保しているので、第一実施形態と同様の効果を得ることができる。   As described above, in this embodiment as well, in this embodiment, the security of the computer is ensured within a certain range by using a plurality of policy data in the policy database 144 incorporated in advance in the OS program 141. The effect similar to 1st embodiment can be acquired.

さらに、本実施形態では、タスク・ストラクト121Aの生成時間が第一実施形態よりも長くなるものの、第一実施形態のように、全てのポリシデータに関してステップ21〜30(図6)のループ処理を行わず、全てのポリシデータに関して各ステップでまとめて処理しているので、全体として、処理の高速化を図ることができる。   Furthermore, in this embodiment, although the generation time of the task struct 121A is longer than that in the first embodiment, the loop processing of steps 21 to 30 (FIG. 6) is performed for all policy data as in the first embodiment. Since all the policy data is processed together in each step without performing the processing, the overall processing speed can be increased.

なお、本実施形態では、OS主機能部112が、ポリシデータコピーテーブル121eを含むタスク・ストラクト121AをRAM120上に作成しているが、ポリシデータコピーテーブル121eをRAM120上に作成するもものの、タスク・ストラクト121A内に設けない場合には、システムコールフック部113がポリシデータコピーテーブル121eを作成してもよい。   In this embodiment, the OS main function unit 112 creates the task struct 121A including the policy data copy table 121e on the RAM 120. However, although the policy data copy table 121e is created on the RAM 120, the task When not provided in the struct 121A, the system call hook unit 113 may create the policy data copy table 121e.

100,100A:コンピュータ、110:CPU、111,111A:OS実行部、112,112A:OS主機能部、113,113A:システムコールフック部、118:プロセス、120:RAM、121,121A:タスク・ストラクト、121d:システムコールテーブル、121e:ポリシデータコピーテーブル、125:ポリシデータコピー、125a:ポリシID、125b:ポリシコンテキストコピー、125c:アクション、127:変数対応表、140:補助記憶装置、141,141A:OSプログラム、142,142A:OS主機能モジュール、143,143A:システムコールフックモジュール、144:ポリシデータベース、145:ポリシデータ、146:オブジェクトタイプ表、148:アプリケーションプログラム   100, 100A: Computer, 110: CPU, 111, 111A: OS execution unit, 112, 112A: OS main function unit, 113, 113A: System call hook unit, 118: Process, 120: RAM, 121, 121A: Task Struct, 121d: system call table, 121e: policy data copy table, 125: policy data copy, 125a: policy ID, 125b: policy context copy, 125c: action, 127: variable correspondence table, 140: auxiliary storage device, 141 141A: OS program, 142, 142A: OS main function module, 143, 143A: System call hook module, 144: Policy database, 145: Policy data, 146: Object type table, 148: Application Deployment program

Claims (8)

プロセスからの各種システムコールを処理するためのオペレーティングシステム(以下、OSとする)主機能モジュールを有するOSプログラムにおいて、
規制対象とすべき複数のシステムコールの組合わせと、前記プロセスから該組合わせのシステムコールが出力された場合の規制処理内容を示すシステムコールであるアクションとを有する複数のポリシデータを含むポリシデータベースと、
前記プロセスからの前記システムコールを監視するためのシステムコールフックモジュールと、
を有し、
前記システムコールフックモジュールは、
前記プロセスからのシステムコールを受け付けるシステムコール受付ステップと、
前記システムコール受付ステップでシステムコールを受け付けると、該システムコール受付ステップで順次受け付けられた複数のシステムコール中に、前記ポリシデータベース中のいずれかのポリシデータに含まれている前記複数のシステムコールの組合わせと対応する組合わせのシステムコールがある、ポリシマッチであるか否かを判定する判定ステップと、
前記判定ステップで前記ポリシマッチであると判定されると、前記ポリシマッチであると判定された際に対象になった前記ポリシデータ中の前記アクションを取得して、該アクションを出力し、前記判定ステップで前記ポリシマッチでないと判定されると、前記システムコール受付ステップで受け付けたシステムコールのうち、該判定ステップでの判定の契機となった最新のシステムコールを出力する指示出力ステップと、
をコンピュータのプロセッサに実行させ、
前記OS主機能モジュールは、
前記指示出力ステップで出力された前記システムコール又は前記アクションを受け付ける指示受付ステップと、
前記指示受付ステップで受け付けた前記システムコール又は前記アクションが示す処理を実行する指示実行ステップと、
を前記プロセッサに実行させる、
ことを特徴とするOSプログラム。
In an OS program having an operating system (hereinafter referred to as OS) main function module for processing various system calls from a process,
A policy database including a plurality of policy data having a combination of a plurality of system calls to be regulated and an action which is a system call indicating a regulation processing content when a system call of the combination is output from the process When,
A system call hook module for monitoring the system call from the process;
Have
The system call hook module is
A system call accepting step for accepting a system call from the process;
When the system call is accepted in the system call accepting step, the plurality of system calls included in any one of the policy data in the policy database during the plurality of system calls sequentially accepted in the system call accepting step. A determination step for determining whether or not there is a system call corresponding to a combination and a policy match; and
If it is determined that the policy match is determined in the determination step, the action in the policy data targeted when the policy match is determined is acquired, the action is output, and the determination If it is determined that the policy match is not the step, out of the system calls received in the system call reception step, an instruction output step for outputting the latest system call that is the trigger for the determination in the determination step;
To the computer processor,
The OS main function module is
An instruction receiving step for receiving the system call or the action output in the instruction output step;
An instruction execution step of executing the process indicated by the system call or the action received in the instruction reception step;
Causing the processor to execute
An OS program characterized by that.
請求項1に記載のOSプログラムにおいて、
前記システムコールフックモジュールは、
前記システムコール受付ステップでシステムコールを受け付ける毎に、該システムコールのシステムコール名が前記ポリシデータベースの複数のポリシデータのうちのいずれかのポリシデータに含まれているシステムコールのシステムコール名に一致するか否かを判定するコール名判定ステップと、
コール名判定ステップで一致すると判定されたシステムコール名のシステムコールを、システムコール履歴として前記コンピュータの記憶手段に記憶するシステムコール記憶ステップと、
を前記プロセッサに実行させ、
前記判定ステップでは、前記システムコール履歴中の複数のシステムコールのうち、前記ポリシデータベース中のいずれかのポリシデータ中の複数のシステムコールの組合わせと対応する組合わせが存在するか否かを判定し、対応する組合わせが存在する場合には前記ポリシマッチとする、
ことを特徴とするOSプログラム。
In the OS program according to claim 1,
The system call hook module is
Each time a system call is accepted in the system call accepting step, the system call name of the system call matches the system call name of the system call included in any one of the policy data of the policy database A call name determination step for determining whether or not to perform,
A system call storage step of storing the system call of the system call name determined to match in the call name determination step in the storage means of the computer as a system call history;
To the processor,
In the determining step, it is determined whether or not there is a combination corresponding to a combination of a plurality of system calls in any of policy data in the policy database among a plurality of system calls in the system call history. If there is a corresponding combination, the policy match is used.
An OS program characterized by that.
請求項2に記載のOSプログラムにおいて、
前記判定ステップでは、
前記ポリシデータベースの複数のポリシデータのうち、未コピーのポリシデータを一つコピーして、該ポリシデータをポリシデータコピーとして前記記憶手段に記憶するポリシデータコピーステップと、
前記システムコール履歴から、最新のシステムコールをターゲットシステムコールとして抽出し、該ターゲットシステムコールと前記ポリシデータコピーとを比較し、該ターゲットシステムコールと、該ポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールとが対応する、要素マッチであるか否かを判定する要素マッチ判定ステップと、
前記要素マッチ判定ステップで、前記ターゲットシステムコールと、前記ポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールとが対応し、前記要素マッチであると判定されると、該ポリシデータコピー中の対応システムコールを要素マッチしたことを示す記述に変更するポリシデータコピー更新ステップと、
前記ポリシデータコピー更新ステップで更新された前記ポリシデータが、前記要素マッチしていないシステムコールを含むか否かを判定し、該要素マッチしていないシステムコールを含まないときに前記ポリシマッチとするポリシマッチ判定ステップと、
前記要素マッチ判定ステップで前記要素マッチでないと判定された場合、及び前記ポリシマッチ判定ステップで前記ポリシマッチでないと判定された場合に、前記システムコール履歴から、前記ターゲットシステムコールの次に新しいシステムコールを新たなターゲットシステムコールとして抽出し、該新たなターゲットシステムコールに関して前記要素マッチ判定ステップを実行させるターゲットシステムコール抽出ステップと、
を実行し、
前記ポリシデータコピーステップは、前記システムコール履歴中から前記新たなターゲットシステムコールを抽出できなくなると、繰り返し実行される、
ことを特徴とするOSプログラム。
In the OS program according to claim 2,
In the determination step,
A policy data copy step of copying one copy of uncopied policy data among a plurality of policy data in the policy database and storing the policy data in the storage means as a policy data copy;
The latest system call is extracted as a target system call from the system call history, the target system call is compared with the policy data copy, and a plurality of target system calls and a plurality of policy data copies included in the policy data copy are compared. An element match determination step for determining whether or not there is an element match corresponding to any one of the system calls;
When it is determined in the element match determination step that the target system call corresponds to any one of a plurality of system calls included in the policy data copy and is the element match A policy data copy update step for changing the corresponding system call in the policy data copy to a description indicating that an element match has occurred;
It is determined whether or not the policy data updated in the policy data copy update step includes a system call that does not match the elements, and is determined as the policy match when the system calls that do not match the elements are not included. A policy matching step;
When it is determined that the element match is not the element match in the element match determination step, and when it is determined that the policy match determination step is not the policy match, the system call history is the newest system call next to the target system call. A target system call extraction step that extracts the element match determination step with respect to the new target system call,
Run
The policy data copy step is repeatedly executed when the new target system call cannot be extracted from the system call history.
An OS program characterized by that.
請求項3に記載のOSプログラムにおいて、
前記OS主機能モジュール又は前記システムコールフックモジュールは、
前記コンピュータの記憶手段に格納されたオブジェクトの識別情報と、該オブジェクトへのアクセスを制限すべきか否かを示すオブジェクトタイプとを受け付けて、前記コンピュータの記憶手段に記憶するオブジェクトタイプ受付ステップを、前記プロセッサに実行させ、
前記要素マッチ判定ステップでは、
前記ターゲットシステムコールのシステムコール名と、前記全てのポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールのシステムコール名とが一致するか否かを判定し、
両システムコール名が一致すると判定した場合に、前記ターゲットシステムコールのシステムコール名と一致する、前記ポリシデータコピー中の対応システムコールが、オブジェクトタイプを含んでいれば、前記記憶手段を参照して、前記ターゲットシステムコール中に含まれている引数に関するオブジェクトタイプを把握し、両オブジェクトタイプが一致するか否かを判定し、
両オブジェクトタイプが一致すると判定した場合に、前記要素マッチとする、
ことを特徴とするOSプログラム。
In the OS program according to claim 3,
The OS main function module or the system call hook module is
Receiving the object identification information stored in the storage means of the computer and the object type indicating whether or not access to the object should be restricted, and storing the object type in the storage means of the computer, Let the processor run,
In the element match determination step,
Determining whether a system call name of the target system call matches a system call name of any one of the plurality of system calls included in the policy data copy;
If it is determined that both system call names match, if the corresponding system call in the policy data copy that matches the system call name of the target system call includes an object type, refer to the storage means. , Grasp the object type related to the argument included in the target system call, determine whether both object types match,
When it is determined that both object types match, the element match is used.
An OS program characterized by that.
請求項1に記載のOSプログラムにおいて、
前記OS主機能モジュール又は前記システムコールフックモジュールは、前記プロセスの起動時に、前記ポリシデータベース中の全てのポリシデータをコピーして、該コピーをポリシデータコピーとして前記コンピュータの記憶手段に記憶するポリシコピーステップを、前記プロセッサに実行させ、
前記判定ステップでは、
前記システムコール受付ステップでシステムコールを受け付ける毎に、該システムコールをターゲットシステムコールとして、前記記憶手段に記憶されている全てのポリシデータコピーを比較し、該ターゲットシステムコールと、該全てのポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールとが対応する、要素マッチであるか否かを判定する要素マッチ判定ステップと、
前記要素マッチ判定ステップで、前記ターゲットシステムコールと、前記全てのポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールとが対応し、前記要素マッチであると判定されると、ポリシデータコピー中の対応システムコールを要素マッチしたことを示す記述に変更するポリシデータコピー更新ステップと、
前記ポリシデータコピー更新ステップで更新された前記ポリシデータが、前記要素マッチしていないシステムコールを含むか否かを判定し、該要素マッチしていないシステムコールを含まないときに前記ポリシマッチとするポリシマッチ判定ステップと、
を実行する、
ことを特徴とするOSプログラム。
In the OS program according to claim 1,
The OS main function module or the system call hook module copies all policy data in the policy database at the time of starting the process, and stores the copy in the storage unit of the computer as a policy data copy Causing the processor to execute steps,
In the determination step,
Each time a system call is accepted in the system call accepting step, the system call is regarded as a target system call, all policy data copies stored in the storage means are compared, and the target system call and all the policy data are compared. An element match determination step for determining whether or not an element match corresponds to any one of a plurality of system calls included in the copy; and
In the element match determination step, it is determined that the target system call corresponds to any one of a plurality of system calls included in all the policy data copies and is the element match. Then, the policy data copy update step for changing the corresponding system call in the policy data copy to a description indicating that the element match has occurred,
It is determined whether or not the policy data updated in the policy data copy update step includes a system call that does not match the elements, and is determined as the policy match when the system calls that do not match the elements are not included. A policy matching step;
Run the
An OS program characterized by that.
請求項5に記載のOSプログラムにおいて、
前記OS主機能モジュール又は前記システムコールフックモジュールは、
前記コンピュータの記憶手段に格納されたオブジェクトの識別情報と、該オブジェクトへのアクセスを制限すべきか否かを示すオブジェクトタイプとを受け付けて、前記コンピュータの記憶手段に記憶するオブジェクトタイプ受付ステップを、前記プロセッサに実行させ、
前記要素マッチ判定ステップでは、
前記ターゲットシステムコールのシステムコール名と、前記全てのポリシデータコピー中に含まれている複数のシステムコールのうちのいずれかのシステムコールのシステムコール名とが一致するか否かを判定し、
両システムコール名が一致すると判定した場合に、前記ターゲットシステムコールのシステムコール名と一致する、前記ポリシデータコピー中の対応システムコールが、オブジェクトタイプを含んでいれば、前記記憶手段を参照して、前記ターゲットシステムコール中に含まれている引数に関するオブジェクトタイプを把握し、両オブジェクトタイプが一致するか否かを判定し、
両オブジェクトタイプが一致すると判定した場合に、前記要素マッチとする、
ことを特徴とするOSプログラム。
In the OS program according to claim 5,
The OS main function module or the system call hook module is
Receiving the object identification information stored in the storage means of the computer and the object type indicating whether or not access to the object should be restricted, and storing the object type in the storage means of the computer, Let the processor run,
In the element match determination step,
Determining whether a system call name of the target system call matches a system call name of any one of the plurality of system calls included in the policy data copy;
If it is determined that both system call names match, if the corresponding system call in the policy data copy that matches the system call name of the target system call includes an object type, refer to the storage means. , Grasp the object type related to the argument included in the target system call, determine whether both object types match,
When it is determined that both object types match, the element match is used.
An OS program characterized by that.
請求項1に記載のOSプログラムにおいて、
前記ポリシデータに含まれている前記複数のシステムコールの組み合わせは、該複数のシステムコールを含み、該複数のシステムコールの組み合わせ形態が記述されたデータである、
ことを特徴とするOSプログラム。
In the OS program according to claim 1,
The combination of the plurality of system calls included in the policy data is data that includes the plurality of system calls and describes the combination form of the plurality of system calls.
An OS program characterized by that.
記憶手段と、各種処理を実行するプロセッサとを備えているコンピュータにおいて、
前記記憶手段には、請求項1から7のいずれか一項に記載のOSプログラムが格納され、
前記プロセッサは、前記OSプログラム中の前記OS主機能モジュールと前記システムコールフックモジュールとを実行する、
ことを特徴とするコンピュータ。
In a computer comprising storage means and a processor for executing various processes,
The OS program according to any one of claims 1 to 7 is stored in the storage unit,
The processor executes the OS main function module and the system call hook module in the OS program.
A computer characterized by that.
JP2009231662A 2009-10-05 2009-10-05 Operating system program and computer carrying the same Pending JP2011081501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009231662A JP2011081501A (en) 2009-10-05 2009-10-05 Operating system program and computer carrying the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009231662A JP2011081501A (en) 2009-10-05 2009-10-05 Operating system program and computer carrying the same

Publications (1)

Publication Number Publication Date
JP2011081501A true JP2011081501A (en) 2011-04-21

Family

ID=44075512

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009231662A Pending JP2011081501A (en) 2009-10-05 2009-10-05 Operating system program and computer carrying the same

Country Status (1)

Country Link
JP (1) JP2011081501A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10769273B2 (en) 2017-07-03 2020-09-08 Denso Corporation Electronic control unit
US11496506B2 (en) 2017-07-03 2022-11-08 Denso Corporation Program generation method and electronic control unit for changing importance of functions based on detected operation state in a vehicle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10769273B2 (en) 2017-07-03 2020-09-08 Denso Corporation Electronic control unit
US11496506B2 (en) 2017-07-03 2022-11-08 Denso Corporation Program generation method and electronic control unit for changing importance of functions based on detected operation state in a vehicle

Similar Documents

Publication Publication Date Title
US8321843B2 (en) Automatic analysis of an application&#39;s run-time settings
US7483895B2 (en) Metadata management
KR101643022B1 (en) Catalog-based software component management
JP4652702B2 (en) Detailed hardware identification for linking software packages to computer systems with hardware change tolerance
US8001528B2 (en) Organization of application state and configuration settings
US9317681B2 (en) Information processing apparatus, information processing method, and computer program product
US20060248310A1 (en) System and method for monitoring interactions between application programs and data stores
US11175909B2 (en) Software discovery using exclusion
US20080109466A1 (en) Virtual Deletion In Merged Registry keys
US20090064197A1 (en) Driver installer usable in plural environments
US11386067B2 (en) Data integrity checking in a distributed filesystem using object versioning
US8001099B2 (en) Maintaining and utilizing copy histories
US10514940B2 (en) Virtual application package reconstruction
US7827614B2 (en) Automatically hiding sensitive information obtainable from a process table
JP2007257315A (en) Device for determining influence involved in program setting change and its method
JP2011081501A (en) Operating system program and computer carrying the same
US9917922B2 (en) Extensibility bundles for a cloud and devices suite
US11113127B2 (en) Command line output redirection
US10389743B1 (en) Tracking of software executables that come from untrusted locations
EP4030280A1 (en) Seamless lifecycle stability for extensible software features
JP4937387B2 (en) Automatic rewriting program and automatic rewriting device
AU2019387658B2 (en) Information creation device, information creation method, and information creation program
US8402532B2 (en) Host control of partial trust accessibility
JP2007299233A (en) Customizing device, customizing method, and customizing program
CN115994350A (en) Method and device for changing interception file opening mode, electronic equipment and storage medium