Software Guard Extensions
Intel Software Guard Extensions (SGX) is a set of instruction codes implementing trusted execution environment that are built into some Intel central processing units (CPUs). They allow user-level and operating system code to define protected private regions of memory, called enclaves.[1][2] SGX is designed to be useful for implementing secure remote computation, secure web browsing, and digital rights management (DRM).[3] Other applications include concealment of proprietary algorithms and of encryption keys.[4] SGX involves encryption by the CPU of a portion of memory (the enclave). Data and code originating in the enclave are decrypted on the fly within the CPU,[4] protecting them from being examined or read by other code,[4] including code running at higher privilege levels such as the operating system and any underlying hypervisors.[1][4][2] While this can mitigate many kinds of attacks, it does not protect against side-channel attacks.[5]
A pivot by Intel in 2021 resulted in the deprecation of SGX from the 11th and 12th generation Intel Core Processors, but development continues on Intel Xeon for cloud and enterprise use.[6][7]
Details
This article is missing information about interesting implementation in the form of XuCode — actual ELF files (see microcodeDecryptor) executed to implement SGX instructions. (July 2022) |
SGX was first introduced in 2015 with the sixth generation Intel Core microprocessors based on the Skylake microarchitecture.
Support for SGX in the CPU is indicated in CPUID "Structured Extended feature Leaf", EBX bit 02,[8] but its availability to applications requires BIOS/UEFI support and opt-in enabling which is not reflected in CPUID bits. This complicates the feature detection logic for applications.[9]
Emulation of SGX was added to an experimental version of the QEMU system emulator in 2014.[10] In 2015, researchers at the Georgia Institute of Technology released an open-source simulator named "OpenSGX".[11]
One example of SGX used in security was a demo application from wolfSSL[12] using it for cryptography algorithms.
Intel Goldmont Plus (Gemini Lake) microarchitecture also contains support for Intel SGX.[13]
Both in the 11th and 12th generations of Intel Core processors, SGX is listed as "Deprecated" and thereby not supported on "client platform" processors. [6][14][15] This removed support of playing Ultra HD Blu-ray discs on officially licensed software, such as PowerDVD.[16][17][18]
List of SGX vulnerabilities
Prime+Probe attack
On 27 March 2017 researchers at Austria's Graz University of Technology developed a proof-of-concept that can grab RSA keys from SGX enclaves running on the same system within five minutes by using certain CPU instructions in lieu of a fine-grained timer to exploit cache DRAM side-channels.[19][20] One countermeasure for this type of attack was presented and published by Daniel Gruss et al. at the USENIX Security Symposium in 2017.[21] Among other published countermeasures, one countermeasure to this type of attack was published on September 28, 2017, a compiler-based tool, DR.SGX,[22] that claims to have superior performance with the elimination of the implementation complexity of other proposed solutions.
Spectre-like attack
The LSDS group at Imperial College London showed a proof of concept that the Spectre speculative execution security vulnerability can be adapted to attack the secure enclave.[23] The Foreshadow attack, disclosed in August 2018, combines speculative execution and buffer overflow to bypass the SGX.[24] A security advisory and mitigation for this attack, also called an L1 Terminal Fault, was originally issued on August 14, 2018 and updated May 11, 2021.[25]
Enclave attack
On 8 February 2019, researchers at Austria's Graz University of Technology published findings, which showed that in some cases it is possible to run malicious code from within the enclave itself.[26] The exploit involves scanning through process memory, in order to reconstruct a payload, which can then run code on the system. The paper claims that due to the confidential and protected nature of the enclave, it is impossible for antivirus software to detect and remove malware residing within it. However, since modern anti-malware and antivirus solutions monitor system calls, and the interaction of the application with the operating system, it should be possible to identify malicious enclaves by their behavior, and this issue is unlikely to be a concern for state-of-the-art antiviruses. Intel issued a statement, stating that this attack was outside the threat model of SGX, that they cannot guarantee that code run by the user comes from trusted sources, and urged consumers to only run trusted code.[27]
MicroScope replay attack
There is a proliferation of side-channel attacks plaguing modern computer architectures. Many of these attacks measure slight, nondeterministic variations in the execution of code, so the attacker needs many, possibly tens of thousands, of measurements to learn secrets. However, the MicroScope attack allows a malicious OS to replay code an arbitrary number of times regardless of the programs actual structure, enabling dozens of side-channel attacks.[28] In July 2022, Intel submitted a Linux patch called AEX-Notify to allow the SGX enclave programmer to write a handler for these types of events.[29]
Plundervolt
Security researchers were able to inject timing specific faults into execution within the enclave, resulting in leakage of information. The attack can be executed remotely, but requires access to the privileged control of the processor's voltage and frequency.[30] A security advisory and mitigation for this attack was originally issued on August 14, 2018 and updated on March 20, 2020.[31]
LVI
Load Value Injection[32][33] injects data into a program aiming to replace the value loaded from memory which is then used for a short time before the mistake is spotted and rolled back, during which LVI controls data and control flow. A security advisory and mitigation for this attack was originally issued on March 10, 2020 and updated on May 11, 2021.[34]
SGAxe
SGAxe,[35] an SGX vulnerability published in 2020, extends a speculative execution attack on cache,[36] leaking content of the enclave. This allows an attacker to access private CPU keys used for remote attestation.[37] In other words, a threat actor can bypass Intel's countermeasures to breach SGX enclaves' confidentiality. The SGAxe attack is carried out by extracting attestation keys from SGX's private quoting enclave that are signed by Intel. The attacker can then masquerade as legitimate Intel machines by signing arbitrary SGX attestation quotes.[38] A security advisory and mitigation for this attack, also called a Processor Data Leakage or Cache Eviction, was originally issued January 27, 2020 and updated May 11, 2021.[39]
ÆPIC leak
In 2022, security researchers discovered a vulnerability in the Advanced Programmable Interrupt Controller (APIC) that allows for an attacker with root/admin privileges to gain access to encryption keys via the APIC by inspecting data transfers from L1 and L2 cache.[40] This vulnerability is the first architectural attack discovered on x86 CPUs. This differs from Spectre and Meltdown which uses a noisy side channel. This exploit currently affects Intel Core 10th, 11th and 12th, and Xeon Ice Lake microprocessors.[41][42]
SGX malware arguments
There has been a long debate on whether SGX enables creation of superior malware. Oxford University researchers published an article in October 2022[43] considering attackers' potential advantages and the disadvantages by abusing SGX for malware development. Researchers conclude that while there might be temporary zero day vulnerabilities to abuse in SGX ecosystem, the core principles and design features of Trusted Execution Environments (TEEs) make malware weaker than a malware-in-the-wild, TEEs make no major contributions to malware otherwise.
See also
- Intel MPX
- Spectre-NG
- Trusted execution environment (TEE)
References
- ↑ 1.0 1.1 "Intel SGX for Dummies (Intel SGX Design Objectives)". 2013-09-26. https://software.intel.com/en-us/blogs/2013/09/26/protecting-application-secrets-with-intel-sgx.
- ↑ 2.0 2.1 johnm (2017-08-08). "Properly Detecting Intel® Software Guard Extensions (Intel® SGX) in Your Applications" (in en). https://software.intel.com/en-us/articles/properly-detecting-intel-software-guard-extensions-in-your-applications.
- ↑ "Intel SGX Details". 2017-07-05. https://software.intel.com/en-us/sgx/details.
- ↑ 4.0 4.1 4.2 4.3 "Researchers Use Intel SGX To Put Malware Beyond the Reach of Antivirus Software - Slashdot". 12 February 2019. https://it.slashdot.org/story/19/02/12/222254/researchers-use-intel-sgx-to-put-malware-beyond-the-reach-of-antivirus-software?sbsrc=developers.
- ↑ "Intel SGX and Side-Channels". 2020-02-28. https://software.intel.com/en-us/articles/intel-sgx-and-side-channels.
- ↑ 6.0 6.1 "New Intel chips won't play Blu-ray disks due to SGX deprecation". https://www.bleepingcomputer.com/news/security/new-intel-chips-wont-play-blu-ray-disks-due-to-sgx-deprecation/.
- ↑ anrilr (2022-01-20). "Rising to the Challenge — Data Security with Intel Confidential Computing" (in en). https://community.intel.com/t5/Blogs/Products-and-Solutions/Security/Rising-to-the-Challenge-Data-Security-with-Intel-Confidential/post/1353141.
- ↑ Intel Architecture Instruction Set Extensions Programming Reference, Intel, AUGUST 2015, page 36 "Structured Extended feature Leaf EAX=07h, EBX Bit 02: SGX"
- ↑ "Properly Detecting Intel Software Guard Extensions in Your Applications". 2016-05-13. https://software.intel.com/en-us/articles/properly-detecting-intel-software-guard-extensions-in-your-applications.
- ↑ "Intel SGX Emulation using QEMU". https://tc.gtisc.gatech.edu/bss/2014/l/final/pjain43.pdf.
- ↑ "sslab-gatech/opensgx". https://github.com/sslab-gatech/opensgx.
- ↑ "wolfSSL At IDF". 2016-08-11. https://www.wolfssl.com/wolfssl-at-idf/.
- ↑ "Intel® Pentium® Silver J5005 Processor". https://ark.intel.com/content/www/us/en/ark/products/128984/intel-pentium-silver-j5005-processor-4m-cache-up-to-2-80-ghz.html.
- ↑ "11th Generation Intel Core Processor Datasheet". https://cdrdv2.intel.com/v1/dl/getContent/634648.
- ↑ "12th Generation Intel Core Processors Datasheet". https://cdrdv2.intel.com/v1/dl/getContent/655258.
- ↑ "Intel discontinues support for UHD Blu-ray discs in its newest PC chips". January 21, 2022. https://www.whathifi.com/news/intel-discontinues-support-for-uhd-blu-ray-discs-in-its-newest-pc-chips.
- ↑ https://www.cyberlink.com/support-center/faq/content?id=26690
- ↑ https://www.cyberlink.com/stat/help/powerdvd/22/pc-mode/enu/98_01_14_how_to_play_uhdbd.html
- ↑ Chirgwin, Richard (March 7, 2017). "Boffins show Intel's SGX can leak crypto keys". The Register. https://www.theregister.co.uk/2017/03/07/eggheads_slip_a_note_under_intels_door_sgx_can_leak_crypto_keys/.
- ↑ Schwarz, Michael; Weiser, Samuel; Gruss, Daniel; Maurice, Clémentine; Mangard, Stefan (2017). "Malware Guard Extension: Using SGX to Conceal Cache Attacks". arXiv:1702.08719 [cs.CR].
- ↑ "Strong and Efficient Cache Side-Channel Protection using Hardware Transactional Memory". 2017-08-16. https://www.usenix.org/system/files/conference/usenixsecurity17/sec17-gruss.pdf.
- ↑ Brasser, Ferdinand; Capkun, Srdjan; Dmitrienko, Alexandra; Frassetto, Tommaso; Kostiainen, Kari; Müller, Urs; Sadeghi, Ahmad-Reza (2017-09-28). "DR.SGX: Hardening SGX Enclaves against Cache Attacks with Data Location Randomization". ACSAC '19: Proceedings of the 35th Annual Computer Security Applications Conference December 2019. pp. 788–800. doi:10.1145/3359789.3359809.
- ↑ Sample code demonstrating a Spectre-like attack against an Intel SGX enclave., 19 December 2021, https://github.com/lsds/spectre-attack-sgx
- ↑ Peter Bright - Jul 10, 2018 9:00 pm UTC (2018-07-10). "New Spectre-like attack uses speculative execution to overflow buffers". Ars Technica. https://arstechnica.com/gadgets/2018/07/new-spectre-like-attack-uses-speculative-execution-to-overflow-buffers/.
- ↑ "CVE - CVE-2018-3615". https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3615.
- ↑ Schwarz, Michael; Weiser, Samuel; Gruss, Daniel (2019-02-08). "Practical Enclave Malware with Intel SGX". arXiv:1902.03256 [cs.CR].
- ↑ Bright, Peter (2019-02-12). "Researchers use Intel SGX to put malware beyond the reach of antivirus software" (in en-us). https://arstechnica.com/gadgets/2019/02/researchers-use-intel-sgx-to-put-malware-beyond-the-reach-of-antivirus-software/.
- ↑ Skarlatos, Dimitrios; Yan, Mengjia; Gopireddy, Bhargava; Sprabery, Read; Torrellas, Josep; Fletcher, Christopher W. (2019). "MicroScope" (in en). Proceedings of the 46th International Symposium on Computer Architecture. Isca '19. Phoenix, Arizona: ACM Press. pp. 318–331. doi:10.1145/3307650.3322228. ISBN 978-1-4503-6669-4.
- ↑ "[PATCH x86/sgx: Allow enclaves to use Asynchrounous Exit Notification"]. https://lore.kernel.org/lkml/YsuMK0JIYqqjtVdk@kernel.org/T/.
- ↑ "Plundervolt steals keys from cryptographic algorithms" (in en-us). 2019-12-11. https://www.rambus.com/blogs/plundervolt-steals-keys-from-cryptographic-algorithms/.
- ↑ "CVE - CVE-2019-11157". https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11157.
- ↑ "LVI: Hijacking Transient Execution with Load Value Injection". https://lviattack.eu/.
- ↑ "Load Value Injection". https://software.intel.com/security-software-guidance/software-guidance/load-value-injection.
- ↑ "CVE - CVE-2020-0551". https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0551.
- ↑ "SGAxe". https://sgaxe.com/.
- ↑ "CacheOut". https://cacheoutattack.com/.
- ↑ "Towards Formalization of Enhanced Privacy ID (EPID)-based Remote Attestation in Intel SGX". https://www.researchgate.net/publication/342833256.
- ↑ "SGAxe & CrossTalk Attacks: New Intel SGX Vulnerability Leaks Data" (in en). 2020-06-12. https://www.hackreports.com/sgaxe-crosstalk-attacks-intel-sgx-vulnerability/.
- ↑ "CVE - CVE-2020-0549". https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0549.
- ↑ "Intel SGX: Not So Safe After All, ÆPIC Leak" (in en-US). 2022-08-16. https://thenewstack.io/intel-sgx-not-so-safe-after-all-aepic-leak/.
- ↑ Wilson, Jason R. (2022-08-11). "ÆPIC Leak is an Architectural CPU Bug Affecting 10th, 11th, and 12th Gen Intel Core CPUs" (in en-US). https://wccftech.com/aepic-leak-is-an-architectural-cpu-bug-affecting-10th-11th-and-12th-gen-intel-core-cpus/.
- ↑ "ÆPIC Leak". https://aepicleak.com/index.html#.
- ↑ Küçük, Kubilay Ahmet; et, al. (October 2022). "SoK: How 'Not' to Architect Your Next-Generation TEE Malware". Hardware and Architectural Support for Security and Privacy (HASP) 2022. https://haspworkshop.org/2022/program.html. Retrieved 2023-04-17.
External links
- Intel Software Guard Extensions (Intel SGX) / ISA Extensions, Intel
- Intel Software Guard Extensions (Intel SGX) Programming Reference, Intel, October 2014
- IDF 2015 - Tech Chat: A Primer on Intel Software Guard Extensions, Intel (poster)
- ISCA 2015 tutorial slides for Intel SGX, Intel, June 2015
- McKeen, Frank, et al. (Intel), Innovative Instructions and Software Model for Isolated Execution // Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy. ACM, 2013.
- Jackson, Alon, (PhD dissertation). Trust is in the Keys of the Beholder: Extending SGX Autonomy and Anonymity, May 2017.
- Joanna Rutkowska, Thoughts on Intel's upcoming Software Guard Extensions (Part 1), August 2013
- SGX: the good, the bad and the downright ugly / Shaun Davenport, Richard Ford (Florida Institute of Technology) / Virus Bulletin, 2014-01-07
- Victor Costan and Srinivas Devadas, Intel SGX Explained, January 2016.
- wolfSSL, October 2016.
- The Security of Intel SGX for Key Protection and Data Privacy Applications / Professor Yehuda Lindell (Bar Ilan University & Unbound Tech), January 2018
- Intel SGX Technology and the Impact of Processor Side-Channel Attacks, March 2020
- How Confidential Computing Delivers A Personalised Shopping Experience, January 2021
- Realising the Potential of Data Whilst Preserving Privacy with EyA and Conclave from R3, December 2021
- Introduction to Intel Software Guard Extensions, June 2020
Original source: https://en.wikipedia.org/wiki/Software Guard Extensions.
Read more |