Trusted Execution Environments (TEEs) have been proposed as a solution to protect code confidentiality in scenarios where computation is outsourced to an untrusted operator. We study the resilience of such solutions to side-channel attacks in two commonly deployed scenarios: when a confidential code is a native binary that is shipped and executed within a TEE and when the confidential code is an intermediate representation (IR) executed on top of a runtime within a TEE. We show that executing IR code such as WASM bytecode on a runtime executing in a TEE leaks most IR instructions with high accuracy and therefore reveals the confidential code. Contrary to IR execution, native execution is much less susceptible to leakage and largely resists even the most powerful side-channel attacks. We evaluate native execution leakage in Intel SGX and AMD SEV and experimentally demonstrate end-to-end instruction extraction on Intel SGX, with WASM bytecode as IR executed within WAMR, a hybrid between a JIT compiler and interpreter developed by Intel. Our experiments show that IR code leakage from such systems is practical and therefore question the security claims of several commercial solutions which rely on TEEs+WASM for code confidentiality.
翻译:在计算外包给不受信任的操作者的情况下,作为保护代码保密性的一种解决办法,提出了可靠的执行环境(TEE)的建议。我们研究了在两种通常部署的情景下,在两种常见情景下,这种解决侧道袭击的方法的弹性:当机密代码是本地二进制,在TEE内装运和执行,当机密代码是中间代表(IR),在TEE内运行时间之外执行。我们表明,在TEE泄漏的运行时间里,执行诸如WASM 字节码等IR代码,使大多数IR指令非常精确地泄漏,从而暴露了机密代码。与IR执行相反,本地执行远不易泄漏,甚至基本上抵制最强大的侧道袭击。我们评估了在SGX和AMD SEV中的本地执行渗漏,并实验性地展示了在INTel SGX上的端对端指令的抽取。我们发现,在INTER编辑和翻译之间,一种混合的JIT编译器。我们的实验表明,从这种系统渗漏的代码是实用的,因此,基本上不易泄漏,甚至抵制最有力的侧道攻击。我们提出的技术安全要求。