TOMOYO Linux is a MAC (Mandatory Access Control) implementation which gives support to protect Linux systems as well as to learn, understand and analyze system behavior. Being lightweight, it results suitable for embedded systems too. This tutorial aims to show in a practical way how to make the best use of TOMOYO Linux potentials in order to study and protect embedded Linux systems, taking Android as a specific study case. Though Android is amazingly expanding its target to various kinds of devices, it was designed mainly for mobile phones. Then, unlike other embedded operating systems, it presents some peculiar characteristics which require a particular attention to apply MAC effectively. The session is directed to those who want to learn how to use TOMOYO Linux, to managers or developers interested in security concerning embedded Linux and Android, and even to anyone just wishing to take a closer glance at Android internals.
36. Problem with splitting domains <kernel> /init /system/bin/app_process Copyright (C) 2009 NTT Data Corporation 2009/10/23
37.
38.
39.
40.
41.
42.
43.
44.
45.
46. Thank you for your attention Copyright (C) 2009 NTT Data Corporation Daisuke Numaguchi <numaguchid@nttdata.co.jp> Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Giuseppe La Tona <giuseppelatona@gmail.com> 2009/10/23
47.
48.
Editor's Notes
May I begin now? Thank you for such an opportunity to talk about tomoyo I am not fluent in English but I will give it a try. My name is Daisuke Numaguchi. I'm working in secure os group in NTTdata corporation. I've been employed here for 5 years. I'm conducting tomoyo linux promotional activities.
最初に tomoyo と Android がどのようなものか紹介をしておきます。
TOMOYO Linux is a lightweight MAC implementation for Linux and Embedded Linux developed by NTT Data Corporation. It performs pathname-based MAC ( Mandatory Access Control ) , separating security domains according to process invocation history, which describes the system behavior. tomoyo は2つのものから成り立っている。 1つめはカーネルのパッチで、 tomoyo のためのパッチを追加するものです。 2つめは tomoyo のポリシーと呼ばれるアクセスコントロール設定を マネージメントするためのユーティリティです。
それでは tomoyo がどのようなところで活用できるかを少し紹介します。 まず「プロテクト」、 MAC ツールとしてのふつうの使い方です。 次に、 TOMOYO Linux has a special mode called &quot;learning&quot; mode. In learning mode, TOMOYO Linux analyzes the accesses occured in the kernel and stores them as MAC policy. 「学習」、 tomoyo はパス名のアクセス制御をしているので、 ポリシーを見ることで、自分が作ったアプリケーションが どのような振る舞いをするのか 簡単に知ることができます。 学習だけで使うことも可能ですが、アプリケーションのデバッグにも使うことができます。
Android はプロンプトモデル (prompting model) を採用している。 このプロンプトモデルは、ユーザにファイルを実行してもよいか、尋ねるタイプのモデルです。 Android は各アプリケーションが ( システム内の各部分も同様に ) 固有のプロセスで実行する、 マルチプロセスシステムです。アプリケーションとシステムの間のセキュリティは、 標準的な Linux と同様にしてアプリケーションに割り当てられたユーザ・グループ ID 制御により、 プロセスレベルで確保されます。
ここからは Android へ tomoyo の適用についてお話していきます
Android で tomoyo が起動するように Android を設定していきます。
Android に適用したイメージです。 Tomoyo はカーネル上で動作し、 Android 上で MAC を使えるようになります。
Tomoyo ではドメインと呼ばれるプログラム単位でポリシーを管理しています。 Tomoyo ではこのドメインポリシーを適切に設定することが重要になります。 これをみることで、プログラムの呼び出し順序を見ていくことができます。 例えば /system/bin/app_process は、 <kernel> /init の順番で呼び出されていることがわかります。 <kernel> は、ツリーの起点を表しています。 この部分は、プロファイル番号です。 TOMOYO manages the policy by a program unit to be called a domain in Tomoyo. It becomes important that I set domain policy corectly in Tomoyo. For example, I understand that /system/bin/app_process is called by kernel /init. <kernel>is starting point of a domain tree. The second column is a profile number.
Profile defines tomoyo’s operation mode.
ドメインをプロセスの親子関係で表示しています。 /init プログラムから sh (シェル)や servicemanager というプログラムが呼び出されていることがわかります。