[論文レビュー] Inferring Fine-grained Control Flow Inside SGX Enclaves with Branch Shadowing
本論文は、分岐予測、BTB、LBRを悪用してSGXエンクレーブ内部の細粒度の制御フローを明らかにする分岐シャドウィング側チャネル攻撃を提示し、Zigzaggerを含む緩和策を提案する。
In this paper, we explore a new, yet critical, side-channel attack against Intel Software Guard Extension (SGX), called a branch shadowing attack, which can reveal fine-grained control flows (i.e., each branch) of an enclave program running on real SGX hardware. The root cause of this attack is that Intel SGX does not clear the branch history when switching from enclave mode to non-enclave mode, leaving the fine-grained traces to the outside world through a branch-prediction side channel. However, exploiting the channel is not so straightforward in practice because 1) measuring branch prediction/misprediction penalties based on timing is too inaccurate to distinguish fine-grained control-flow changes and 2) it requires sophisticated control over the enclave execution to force its execution to the interesting code blocks. To overcome these challenges, we developed two novel exploitation techniques: 1) Intel PT- and LBR-based history-inferring techniques and 2) APIC-based technique to control the execution of enclave programs in a fine-grained manner. As a result, we could demonstrate our attack by breaking recent security constructs, including ORAM schemes, Sanctum, SGX-Shield, and T-SGX. Not limiting our work to the attack itself, we thoroughly studied the feasibility of hardware-based solutions (e.g., branch history clearing) and also proposed a software-based countermeasure, called Zigzagger, to mitigate the branch shadowing attack in practice.
研究の動機と目的
- 粗いページレベルの攻撃を超える細粒度の制御フロー漏えいに対するSGXエンクレーブのセキュリティリスクを動機づけ、評価する。
- 分岐予測履歴を用いてエンクレーブの実行 traces を明らかにする新しいサイドチャネル「branch shadowing」を調査する。
- 現在のSGX防御に対する攻撃を評価し、測定可能なオーバーヘッドを伴う実用的な緩和策を提案する。
提案手法
- BTBとLBRを組み合わせて、エンクレーブ内のターゲット分岐が採られたかどうかとその分岐先を判定する分岐シャドウィング技法を開発する。
- Intel PTのタイミングとLBRの経過サイクルデータを用いて、ノイズを最小限に抑えつつ分岐の結果を正確に推定する。
- APICタイマーとキャッシュ制御を介して実行タイミングとメモリアドレッシングを操作し、被害コードとシャドウコードを同期させて正確なプロービングを行う。
- 低位アドレスビットでシャドウと被害の分岐アドレスを揃え、BTBの衝突と共有された予測状態を許容する。
- 条件付き、非条件、間接分岐などの異なる分岐タイプをプローブし、LBRと経過サイクルを解釈して分岐履歴と分岐先を推測する。
- ハードウェアベースの分岐履歴クリアとソフトウェアベースのZigzaggerを含む緩和策を提案してこの攻撃を緩和する。
実験結果
リサーチクエスチョン
- RQ1OSが管理する攻撃者は、粗いページレベルのアクセスパターンを超えて、SGXエンクレーブ内の細粒度の制御フローを推測できるか?
- RQ2BTBとLBRの機能をどのように組み合わせて、エンクレーブ内の分岐レベルの実行トレースを明らかにできるか?
- RQ3許容できる性能オーバーヘッドでbranch shadowingを緩和する実践的な対策はどのようなものか?
主な発見
- 分岐シャドウィング攻撃は、基礎ブロックレベルの細粒度の制御フローをエンクレーブ内で特定できる。
- LBRとIntel PTを用いると、以前のタイミング手法と比べて測定ノイズを低減し、正確な分岐履歴情報を得られる。
- この攻撃はSGXアプリケーションから機密情報を抽出し、最先端のSGX防御のいくつか(例: deterministic multiplexing、Sanctum、SGX-Shield、T-SGX)を回避できる。
- 提案手法に対して、ハードウェアおよびソフトウェアベースの緩和策は実現可能で、オーバーヘッドは1.3x未満である。
- この攻撃は、条件付き・非条件・間接分岐の漏洩を、エンクレーブの実行トレースを維持したまま示している。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。