by
Anonymous Coward
on 2008年12月10日 22時07分
(#1471036)
http://nativeclient.googlecode.com/svn/trunk/nacl/googleclient/native_... [googlecode.com] 2.2. A Sandbox in a Sandbox Native Client is built around an x86-specific intra-process “inner-sandbox.” We believe that the inner-sandbox is robust; regardless, to provide defense in depth [12], [15] we are also developing a second “outer-sandbox” that implements isolation at the process boundary. The inner-sandbox uses static analysis to detect security defects in untrusted x86 code. Previously, such analysis has been challenging for arbitrary x86 code due to such practices as self-modifying code and overlapping instructions. In Native Client we disallow such practices through a set of alignment and structural rules that, when observed, insure that the native code module can be disassembled reliably, such that all reachable instructions are identified during disassembly. With reliable disassembly as a tool, our validator can then insure that the executable includes only the subset of legal instructions, disallowing unsafe machine instructions. The inner-sandbox further uses x86 segmented memory to constrain both data and instruction memory references. Leveraging existing hardware to implement these range checks greatly simplifies the runtime checks required to constrain memory references, in turn reducing the performance impact of safety mechanisms.
偉大なるx86セグメントの大勝利 (スコア:1, おもしろおかしい)
2.2. A Sandbox in a Sandbox
Native Client is built around an x86-specific intra-process
“inner-sandbox.” We believe that the inner-sandbox is robust;
regardless, to provide defense in depth [12], [15]
we are also developing a second “outer-sandbox” that
implements isolation at the process boundary.
The inner-sandbox uses static analysis to detect security
defects in untrusted x86 code. Previously, such analysis
has been challenging for arbitrary x86 code due to such
practices as self-modifying code and overlapping instructions.
In Native Client we disallow such practices through
a set of alignment and structural rules that, when observed,
insure that the native code module can be disassembled
reliably, such that all reachable instructions are identified
during disassembly. With reliable disassembly as a tool, our
validator can then insure that the executable includes only
the subset of legal instructions, disallowing unsafe machine
instructions.
The inner-sandbox further uses x86 segmented memory
to constrain both data and instruction memory references.
Leveraging existing hardware to implement these range
checks greatly simplifies the runtime checks required to
constrain memory references, in turn reducing the performance
impact of safety mechanisms.
Re:偉大なるx86セグメントの大勝利 (スコア:1, 興味深い)
内部表現が関数アドレスじゃなくなってたりして。
誰か調べて教えてたもれ。
Re:偉大なるx86セグメントの大勝利 (スコア:1)
Javaでもx86コードを実行できる(JNIではなくx86コードを理解するライブラリがある)ので、発想としてはそんな感じ??
---
2.2.サンドボックス内サンドボックス
Native Clientはx86特有の内部のプロセス"インナーサンドボックス"に構築されます。
インナーサンドボックスは堅牢であると信じています。とにかく、徹底的な防御を提供するため、プロセス境界の分離を実装する第2の"アウターサンドボックス"も開発しました。
インナーサンドボックスは、信頼できないx86コードにおいて、セキュリティーの問題を検出するために静的解析を利用します。
以前から、このような解析は自己書き換えコードやオーバーラップ命令といったような慣習による不定なx86コードを課題としてきました。
Native Client では、このような慣習を認めず、アラインメントと構造的なルールのセットを通し、それらが観測されたときは、ネイティブコードモジュールは信頼できるようにディスアセンブルされ、ディスアセンブルをする間に全ての到達可能な命令が特定されることを保証します。
信頼できるディスアセンブリにより、私たちのバリデータは、実行可能コードは許可された命令のサブセットだけを含み、安全ではないマシン命令を禁止することを保証することができます。
インナーサンドボックスはさらに、データと命令のメモリ参照の両方に制約を与えるため、x86のセグメント化されたメモリを使います。
これらの範囲チェックを実装するために既存のハードウェアを活用することで、メモリ参照に制約を与えるために必要な実行時チェックを大いに簡素化し安全機構のパフォーマンスへの影響を減らします。
Re:偉大なるx86セグメントの大勝利 (スコア:1)
Re:偉大なるx86セグメントの大勝利 (スコア:1)
NtQueryInformationProcess は documented ですが、
その (Native Client における) 使用方法が undocumented です。
具体的には、NtQueryInformationProcess の第2引数に undocumented な
ProcessLdtInformation (= 10) を渡しています。