[論文レビュー] Binary Debloating for Security via Demand Driven Loading
この論文では、入力に応じた意思決定ツリー型オラクルを用いて、各呼び出し箇所で必要な関数のみを動的にロードすることで、C/C++ ライブラリの攻撃表面を効果的に縮小する、バイナリレベルで需要駆動型のローディング機構 BlankIt を提案する。この手法により、平均でライブラリコードの露出量が 97.2% 減少し、ROP ガジェットも 97.9% 減少するが、実行時オーバーヘッドは平均 18% にとどまり、再コンパイルを必要とせず、制御フローハイジャック攻撃を効果的に弱体化させる。
Modern software systems heavily use C/C++ based libraries. Because of the weak memory model of C/C++, libraries may suffer from vulnerabilities which can expose the applications to potential attacks. For example, a very large number of return oriented programming gadgets exist in glibc that allow stitching together semantically valid but malicious Turing-complete programs. In spite of significant advances in attack detection and mitigation, full defense is unrealistic against an ever-growing set of possibilities for generating such malicious programs. In this work, we create a defense mechanism by debloating libraries to reduce the dynamic functions linked so that the possibilities of constructing malicious programs diminishes significantly. The key idea is to locate each library call site within an application, and in each case to load only the set of library functions that will be used at that call site. This approach of demand-driven loading relies on an input-aware oracle that predicts a near-exact set of library functions needed at a given call site during the execution. The predicted functions are loaded just in time, and the complete call chain (of function bodies) inside the library is purged after returning from the library call back into the application. We present a decision-tree based predictor, which acts as an oracle, and an optimized runtime system, which works directly with library binaries like GNU libc and libstdc++. We show that on average, the proposed scheme cuts the exposed code surface of libraries by 97.2%, reduces ROP gadgets present in linked libraries by 97.9%, achieves a prediction accuracy in most cases of at least 97%, and adds a small runtime overhead of 18% on all libraries (16% for glibc, 2% for others) across all benchmarks of SPEC 2006, suggesting this scheme is practical.
研究の動機と目的
- 膨大な数の ROP ガジェットを露出する、特に glibc のような肥大化した C/C++ ライブラリが引き起こす継続的なセキュリティリスクに対処すること。
- 実行時における動的ロード関数の最小化により、リンクされたライブラリの攻撃表面を縮小すること。
- ソースコードやライブラリの再コンパイルを必要としない実用的なバイナリレベルの防御を構築すること。
- 従来の CFI や CPI メカニズムを回避する高度な制御フローハイジャック攻撃(例:ROP や JOP)を緩和すること。
- CFI や CPI が防御できない非制御データ攻撃の検出と防止を可能にすること。
提案手法
- 制御依存関係を静的に特定するために、逆の支配フロンティア(reverse dominance frontiers)を用いる。
- 入力固有の挙動に基づき、各呼び出し箇所で必要なライブラリ関数の正確な集合を意思決定ツリー型オラクルが予測する。
- 実行時、予測された関数のみがメモリにロードされ、他の関数はライブラリの動的コード領域から完全に削除される。
- 実行時システムは、glibc や libstdc++ などのバイナリライブラリを直接操作し、ソースコードや再コンパイルを必要としない。
- 各ライブラリ呼び出しが終了した後、呼び出しチェーン全体がメモリからクリアされ、ロードされた関数の再利用が防止される。
- 最適化されたバイナリインストラクション挿入により、アプリケーションの実行フローに最小限の性能影響を及ぼす形でアプローチを統合する。
実験結果
リサーチクエスチョン
- RQ1需要駆動型ローディング機構は、C/C++ ライブラリにおける動的リンク関数および ROP ガジェットの数を顕著に削減できるか?
- RQ2入力に応じたオラクルは、各呼び出し箇所で必要な正確なライブラリ関数の集合を高い精度で予測できるか?
- RQ3このような機構は、ライブラリのソースコードや再コンパイルを必要とせずに攻撃表面を縮小できるか?
- RQ4CFI や CPI を回避する高度な攻撃(例:ROP、JOP、非制御データ攻撃)に対しても、このアプローチは有効であるか?
- RQ5実世界のワークロードにおいて、このようなシステムの実行時オーバーヘッドはどの程度か?
主な発見
- 提案された BlankIt システムは、SPEC2006 ベンチマーク全体で、リンクされたライブラリの平均露出コード表面を 97.2% 減少させた。
- リンクされたライブラリにおける ROP ガジェット数は平均で 97.9% 減少し、制御フローハイジャックの能力が著しく弱体化した。
- 意思決定ツリー型オラクルは、大多数のケースで少なくとも 97% の予測精度を達成し、偽陰性の最小限に抑えられた。
- SPEC2006 ベンチマーク全体での平均実行時オーバーヘッドは 18% であり、glibc では 16%、他のライブラリでは 2% にとどまり、実用性が裏付けられた。
- BlankIt は、CFI や CPI を回避する攻撃、非制御データ攻撃、および制御フローバーティング(CFB)攻撃に対しても効果的に対処できた。
- このシステムは完全にバイナリレベルで動作し、リンクされたバイナリの再コンパイルを一切必要とせず、レガシーソフトウェアへの展開が可能である。
この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。