4 ms·
You cannot do syscalls, but you can read/write all memory, which means you can make some arbitrary (trusted) process your victim, executing code in a ROP manner
by tpolzer 8y ago
You cannot do syscalls, but you can read/write all memory, which means you can make some arbitrary (trusted) process your victim, executing code in a ROP manner and antivirus won't see a thing.
- gruez 8y ago>but you can read/write all memory Source? AFAIK programs running inside don't have kernel/DMA access.
- UncleEntity 8y ago> The enclave code does, however, have the ability to read and write anywhere in the unencrypted process memory Source: TFA
- gruez 8y agoStrange, I skimmed through a few SGX code samples[1] and they're all C programs that pass data through an API rather than pointer passing. The article states that they have access to all memory and it doesn't seem like Intel refuted it, so I guess we can assume it's true. That said, I find it strange that enclaves have access to all memory, when all it needs is access to its own protected region. If that's true, that seems like an oversight on Intel's part, especially since they already have well defined interfaces for passing data between trusted/untrusted code. [1] https://github.com/digawp/hello-enclave https://github.com/digawp/hello-enclave [1] https://software.intel.com/en-us/articles/sgx-intro-passing-data-between-app-and-enclave https://software.intel.com/en-us/articles/sgx-intro-passing-... edit: looks like the article might be mistaken. According to an article on SGX internals[2], SGX code may only access enclave memory. A similar diagram can be found in a slide deck [3]. [2] https://blog.quarkslab.com/overview-of-intel-sgx-part-1-sgx-internals.html https://blog.quarkslab.com/overview-of-intel-sgx-part-1-sgx-... [3] http://cwfletcher.net/Content/598/lec04_sgx.pdf http://cwfletcher.net/Content/598/lec04_sgx.pdf page 26
- amluto 8y agoThe SDM is unambiguous: enclaves can access any memory that the host process can access. The enclave can also modify most of its callers registers, including RSP, RBP, and RIP. The Intel SDK uses these ability for reasons that might be considered unwise.
- ENOTTY 8y agoProcess address spaces don't include (nearly all of) the kernel address space anymore thanks to Meltdown.
- amluto 8y agoThis isn’t relevant here. Enclaves can access any memory that the user host process can, plus their own memory. The kernel is off limits, except insofar as the enclave can exploit Meltdown.