Hypersafe (Introducing in japanese by third party)
-
Upload
yosuke-chubachi -
Category
Technology
-
view
818 -
download
0
description
Transcript of Hypersafe (Introducing in japanese by third party)
HyperSafe : A Light Apporoach to Provide Lifetime Hypervisor
Control-Flow Integrity
2010-06-21論文紹介
id:yuzuhara
31st IEEE Symposium on Security and Privacy (2010)
12010年6月22日火曜日
Background
• 仮想化のセキュリティへの応用が盛んである• 多くはVMMが安全だという仮定を置いている• しかし実際,その仮定は怪しい• ハイパーバイザの脆弱性を突いた攻撃 (VM escape attack)
• hypervisor rootkit(blue pill etc..) による攻撃など
22010年6月22日火曜日
Approach a secure hypervisor
• ハイパーバイザの形式的検証 [seL4, SOSP’09]
• 最もチャレンジかつ自然なアプローチ• Microkernelのような設計や実装でなければ難しい
• メモリ管理など肝心な部分が検証されない• TPM&TXTを用いたmeasured launch による完全性保証• 信頼された起動を実現する• 稼働時の完全性は保証できていない
32010年6月22日火曜日
Objective
• 低レイヤソフトウェアの完全性を保つ• ハイパーバイザのControl flow integrityを確保し続ける
• 一般的な低レイヤソフトウェアに適用可能であることが望ましい
42010年6月22日火曜日
cf).Control Flow Integrity [Abadi et.al. , CCS’05]
• 関数の呼び出しフローの完全性を確保• SFIよりprimitive
• jmpとかcallの前後でsrc/dstをチェック
• 異常挿入されたコードやreturn-oriented programmingに対する対抗手段
52010年6月22日火曜日
Goal and Assumptions• 3つのGoal
• ハイパーバイザの自身を守る• ハイパーバイザの再設計などを必要としない• 一般的なハードウェアで動作する• Threat model• メモリへの攻撃を想定• inject, modify, return-to-libcなど
• out-of-band attacksやMalicious DMAは想定しない
• 起動時の完全性はTPM,TXTを用いて確保
62010年6月22日火曜日
HyperSafe
• ハイパーバイザ自身の完全性を保証する仕組み
• Type1-VMMに最小限の変更で適用可能
• 特別なハードウェアは必要としない• 2つのコア技術により稼働時の完全性を確保する• Non-bypassable memory lockdown
• Restricted pointer indexing
72010年6月22日火曜日
lifetime hypervisor control-flow integrity
run-timecontrol-flow integrity
load-time integrity
e.g. tboot
hypervisor code integrity
hypervisorcontrol-data integrity
1.non-bypassable memory lockdown
2.restricted pointer indexing (RPI)
Fig.1 A break-down of hypervisor integrity guarantees and corresponding key techniques in HyperSage
82010年6月22日火曜日
1.Non-Bypassable Memory Lockdown
• メモリ上のハイパーバイザの改ざんを防止• code部分を改ざんさせない
• control dataに関しても同様に改ざんさせない• control data... 後述するRPIのTarget Tableなど
92010年6月22日火曜日
• ページテーブルの基本的にread-onlyに• W^XのようにHWと連携して行う
• 正しい書き込みのときはWPbitをOFF
• すぐ後にWPbitをON
1.Non-Bypassable Memory Lockdown (cont’d)
Read-only page tables
WPOFF
WPON
Writable page tables(Traditional)
Benign
Malicious
Benign
Malicious
102010年6月22日火曜日
2.Restricted Pointer Indexing (RPI)
• Control flow integrityを保証するテクニック• call/retやjmpでプログラムの流れを制御するときのパスを強制する
112010年6月22日火曜日
2.Restricted Pointer Indexing (cont’d)
• control dataを間接参照に置き換える• call/ret, jmp命令のsrc/dstなど
• static analysisでCFG(Call Flow Graph)を作成• CFGを強制するようなTarget Tableを作成
Callee jCall Site i
call *%eaxRi: ... ...
func_j
Ri
func_j:|||
ret
eax
[esp]
(a) Traditional indirection call
Callee jCall Site i
call *%eaxRi: ... ...
・
・
func_j:|||
ret
eax
[esp]
(b) New indirection call
func_j
Target Table i
Ri
Target Table j
122010年6月22日火曜日
2.Restricted Pointer Indexing (cont’d)
• CFG(control flow graph)はPointer analysisが必要• LLVMのサポートで実現
• プロトタイプでは部分的に人力解析している• 例えば:
BitVisorがgsセグメントにアクセスするとき• call/retではないがcontrol flowに影響するところなのでRPIを適用
132010年6月22日火曜日
Implementation
• Non-bypassable memory lockdown : VMMのメモリ管理を変更• Restrict Pointer Indexing : LLVMを拡張して実装• LLVM = low level virtual machine• ポインタ解析とかがやりやすいらしい• BitVisorでは2つともサポート• Xenではmemory lockdownのみ
142010年6月22日火曜日
セキュリティ分析
• WP bitをOFFする攻撃• ページテーブルをアップデートする関数の悪用<-RPI
• subvert page table• ページテーブルをアップデートする関数の悪用<-RPI
• Guestとハイパーバイザのメモリマッピングが混ざる<-memory lockdown
• Return-oriented programming <- memory lockdown, RPI
152010年6月22日火曜日
Related Work• 静的解析と形式手法• seL4[Klein et al, SOSP’09],WIT[Akritidis et al, IEEE
S&P’08],KLEE[Cadar et al, OSDI’08]
• ゲストOSの完全性のモニタリングor保護
• SIM[Sharif et al, CCS’09] SecVisor[Seshadri,et al, ’07]SBCFI[Petroni et al,CCS’07]
• Trusted Computing
• TrustVisor[McCune et al, Oakland’10], Flicker[McCune et al,Eurosys’08],Pioneer[Seshadri et al, SOSP’05]
162010年6月22日火曜日
Summary• HyperSafeはType-1 Hypervisorのcontrol flow
integrityを提供する手軽なアプローチである lifetime hypervisor
control-flow integrity
run-timecontrol-flow integrity
load-time integrity
e.g. tboot
hypervisor code integrity
hypervisorcontrol-data integrity
1.non-bypassable memory lockdown
2.restricted pointer indexing
172010年6月22日火曜日