cispa_all_3644.pdf (440.93 kB)

SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave Fuzzing

Download (440.93 kB)
conference contribution
posted on 2023-11-29, 18:20 authored by Tobias Cloosters, Johannes Willbold, Thorsten HolzThorsten Holz, Lucas Davi
Intel's Software Guard Extensions (SGX) provide a non-introspectable trusted execution environment (TEE) to protect security-critical code from a potentially malicious OS. This protection can only be effective if the individual enclaves are secure, which is already challenging in regular software, and this becomes even more difficult for enclaves as the entire environment is potentially malicious. As such, many enclaves expose common vulnerabilities, e.g., memory corruption and SGX-specific vulnerabilities like null-pointer dereferences. While fuzzing is a popular technique to assess the security of software, dynamically analyzing enclaves is challenging, as enclaves are meant to be non-introspectable. Further, they expect an allocated multi-pointer structure as input instead of a plain buffer. In this paper, we present SGXFuzz, a coverage-guided fuzzer that introduces a novel binary input structure synthesis method to expose enclave vulnerabilities even without source-code access. To obtain code coverage feedback from enclaves, we show how to extract enclave code from distribution formats. We also present an enclave runner that allows execution of the extracted enclave code as a user-space application at native speed, while emulating all relevant environment interactions of the enclave. We use this setup to fuzz enclaves using a state-of-the-art snapshot fuzzing engine that deploys our novel structure synthesis stage. This stage synthesizes multi-layer pointer structures and size fields incrementally on-the-fly based on fault signals. Furthermore, it matches the expected input format of the enclave without any prior knowledge. We evaluate our approach on 30 open and closed-source enclaves and found a total of 79 new bugs and vulnerabilities.


Preferred Citation

Tobias Cloosters, Johannes Willbold, Thorsten Holz and Lucas Davi. SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave Fuzzing. In: Usenix Security Symposium (USENIX-Security). 2022.

Primary Research Area

  • Threat Detection and Defenses

Name of Conference

Usenix Security Symposium (USENIX-Security)

Legacy Posted Date


Open Access Type

  • Green


@inproceedings{cispa_all_3644, title = "SGXFuzz: Efficiently Synthesizing Nested Structures for SGX Enclave Fuzzing", author = "Cloosters, Tobias and Willbold, Johannes and Holz, Thorsten and Davi, Lucas", booktitle="{Usenix Security Symposium (USENIX-Security)}", year="2022", }

Usage metrics


    No categories selected


    Ref. manager