Abstract
Time is used in secure systems to validate security properties. Consequently, it is vital to protect the integrity of time information. Intel SGX enables building secure applications inside a Trusted Execution Environment (TEE), called an enclave, isolated from the untrusted OS. However, accessing time information from the enclave remains challenging as the OS controls the system time. Previous versions of the SGX SDK provided the sgx_get_trusted_time function as an alternative to OS time. However, Intel removed the API in 2020, without providing an alternative. This paper examines trusted time challenges in SGX and presents TPM-based Trusted Time Extensions (T3E), a novel solution that builds on readily available hardware. T3E leverages TPM functionality to provide trusted time services in enclaves while protecting against common attacks. It offers better time granularity and lower latency than Intel’s sgx_get_trusted_time implementation. Unlike related work, it does not rely on deprecated features or hardware/firmware modifications.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Removed as of Intel SGX SDK for Linux version 2.8 (https://github.com/intel/linux-sgx/releases/tag/sgx_2.8).
- 2.
A post on the Intel Developer Forum by a moderator suggests that the reason of the removal might be linked to the fact that the CSME is not available on server platforms, and due to licensing issues. https://community.intel.com/t5/Intel-Software-Guard-Extensions/The-delay-attack-towards-the-trusted-time/m-p/1343497.
- 3.
- 4.
- 5.
References
Alder, F., Asokan, N., Kurnikov, A., Paverd, A., Steiner, M.: S-FaaS: trustworthy and accountable function-as-a-service using Intel SGX. In: Proceedings of the 2019 ACM SIGSAC Conference on Cloud Computing Security Workshop, CCSW 2019, pp. 185–199. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3338466.3358916
Alder, F., Scopelliti, G., Bulck, J.V., Mühlberg, J.T.: About time: on the challenges of temporal guarantees in untrusted environments. In: Proceedings of the 6th Workshop on System Software for Trusted Execution (SysTEX 2023) (2023)
Anwar, F.M., Garcia, L., Han, X., Srivastava, M.: Securing time in untrusted operating systems with TimeSeal. In: 2019 IEEE Real-Time Systems Symposium (RTSS), pp. 80–92 (2019). https://doi.org/10.1109/RTSS46320.2019.00018
Anwar, F.M., Srivastava, M.: Applications and challenges in securing time. In: 12th USENIX Workshop on Cyber Security Experimentation and Test (CSET 2019), Santa Clara, CA. USENIX Association (2019). https://www.usenix.org/conference/cset19/presentation/anwar
Arthur, W., Challener, D., Goldman, K.: A Practical Guide to TPM 2.0: Using the New Trusted Platform Module in the New Age of Security. Springer, Cham (2015). https://doi.org/10.1007/978-1-4302-6584-9
Berger, S., Caceres, R., Goldman, K.A., Perez, R., Sailer, R., van Doorn, L.: vTPM: virtualizing the trusted platform module. In: 15th USENIX Security Symposium (USENIX Security 2006), Vancouver, B.C., Canada. USENIX Association (2006). https://www.usenix.org/conference/15th-usenix-security-symposium/vtpm-virtualizing-trusted-platform-module
Boubakri, M., Chiatante, F., Zouari, B.: Towards a firmware TPM on RISC-V. In: 2021 Design, Automation & Test in Europe Conference & Exhibition (DATE), pp. 647–650. IEEE (2021). https://doi.org/10.23919/DATE51398.2021.9474152
Chen, L., et al.: Trusted Computing Platforms: TPM2.0 in Context. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-08744-3
Chen, S., Zhang, X., Reiter, M.K., Zhang, Y.: Detecting privileged side-channel attacks in shielded execution with Déjà Vu. In: Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security, ASIA CCS 2017, pp. 7–18. Association for Computing Machinery, New York (2017). https://doi.org/10.1145/3052973.3053007
Dang, H., Dinh, A., Chang, E.C., Ooi, B.C.: Chain of trust: can trusted hardware help scaling blockchains. arXiv preprint arXiv:1804.00399 (2018)
Franke, D.F., et al.: Network Time Security for the Network Time Protocol. RFC 8915 (2020). https://www.rfc-editor.org/info/rfc8915
Intel: IA-PC HPET (High Precision Event Timers) Specification. Intel (2004). https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/software-developers-hpet-spec-1-0a.pdf
Intel: Intel® Software Guard Extensions Programming Reference (2014). https://www.intel.com/content/dam/develop/external/us/en/documents/329298-002-629101.pdf
Intel: Intel® 64 and IA-32 Architectures Software Developer’s Manual, chap. 39, pp. 13–14. Intel (2016). https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3d-part-4-manual.pdf
Intel: Trusted Time and Monotonic Counters with Intel® Software Guard Extensions Platform Services (2017). https://community.intel.com/legacyfs/online/drupal_files/managed/1b/a2/Intel-SGX-Platform-Services.pdf
Intel: Intel® Transactional Synchronization Extension (Intel® TSX) Disable Update for Selected Processors (2022). https://cdrdv2.intel.com/v1/dl/getContent/643557
Liang, H., Li, M.: Bring the missing jigsaw back: trustedclock for SGX enclaves. In: Proceedings of the 11th European Workshop on Systems Security, EuroSec 2018. Association for Computing Machinery, New York (2018). https://doi.org/10.1145/3193111.3193119
Matetic, S., et al.: ROTE: rollback Protection for Trusted Execution. In: 26th USENIX Security Symposium (USENIX Security 2017), pp. 1289–1306 (2017). https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/matetic
McKeen, F., et al.: Innovative instructions and software model for isolated execution. In: Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy, HASP 2013. Association for Computing Machinery, New York (2013). https://doi.org/10.1145/2487726.2488368
Raj, H., et al.: fTPM: a software-only implementation of a TPM chip. In: 25th USENIX Security Symposium (USENIX Security 2016), pp. 841–856 (2016). https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_raj.pdf
Schwarz, M., Gruss, D.: How trusted execution environments fuel research on microarchitectural attacks. IEEE Secur. Priv. 18(5), 18–27 (2020). https://doi.org/10.1109/MSEC.2020.2993896
Schwarz, M., Weiser, S., Gruss, D., Maurice, C., Mangard, S.: Malware guard extension: using SGX to conceal cache attacks. In: Polychronakis, M., Meier, M. (eds.) DIMVA 2017. LNCS, vol. 10327, pp. 3–24. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-60876-1_1
The Trusted Computing Group: ISO/IEC 11889-1:2015 - Information Technology - Trusted Platform Module (2015). https://www.iso.org/standard/66510.html
Tople, S., Park, S., Kang, M.S., Saxena, P.: VeriCount: verifiable resource accounting using hardware and software isolation. In: Preneel, B., Vercauteren, F. (eds.) ACNS 2018. LNCS, vol. 10892, pp. 657–677. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93387-0_34
Trach, B., Krohmer, A., Gregor, F., Arnautov, S., Bhatotia, P., Fetzer, C.: ShieldBox: secure middleboxes using shielded execution. In: Proceedings of the Symposium on SDN Research, SOSR 2018. Association for Computing Machinery, New York (2018). https://doi.org/10.1145/3185467.3185469
Tsai, C.C., Porter, D.E., Vij, M.: Graphene-SGX: a practical library OS for unmodified applications on SGX. In: 2017 USENIX Annual Technical Conference (USENIX ATC 2017), pp. 645–658 (2017). https://www.usenix.org/conference/atc17/technical-sessions/presentation/tsai
Wang, H., Chen, G., Zhang, Y., Lin, Z.: Multi-certificate attacks against proof-of-elapsed-time and their countermeasures. In: Network and Distributed System Security Symposium, NDSS 2022 (2022). https://www.ndss-symposium.org/ndss-paper/auto-draft-253/
Zhang, F., Cecchetti, E., Croman, K., Juels, A., Shi, E.: Town crier: an authenticated data feed for smart contracts. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS 2016, pp. 270–282. Association for Computing Machinery, New York (2016). https://doi.org/10.1145/2976749.2978326
Zuccherato, R., et al.: Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP). RFC 3161 (2001). https://doi.org/10.17487/RFC3161. https://www.rfc-editor.org/info/rfc3161
Acknowledgements
This research is partially funded by the Research Fund KU Leuven, and by the Flemish Research Program Cybersecurity. The authors thank all reviewers, who provided constructive feedback to improve our paper. In addition, the first author would like to also thank Dody Suhendra from Sandhiguna for triggering the discussion leading to this research question.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Appendix: Comparison with Related Solutions
A Appendix: Comparison with Related Solutions
The features of T3E are comparable to the related works presented in Sect. 3. However, T3E can be implemented without requiring intrusive changes to hardware or software. It does not rely on deprecated infrastructure or APIs and does not require modifications to commodity hardware such as custom-made firmware. T3E is an alternative for the deprecated sgx_get_trusted_time function, offering better security guarantees and a higher clock granularity.
T3E builds on the security properties of the TPM and SGX to ensure the clock’s monotonicity and authenticity. A trusted channel is set up between the TPM and the enclave. This approach is similar to the TimeSeal solution, where the time information originates from the PSE.
To mitigate delay attacks, T3E maintains a maximum use count for each set of time information received from the TPM. While TimeSeal considered a scheduling delay, it did not consider the possibility of the entire application thread being suspended, pausing the time progression altogether. S-FaaS can detect the pause attack, but it cannot determine the duration of the delay, making it impossible to use it as a reliable tick source for a clock. TrustedClock does not have this issue because the tick generator is completely isolated from the untrusted OS. However, a powerful adversary can still suspend the enclave execution right before the trusted time is used, allowing TOCTTOU (Time-of-Check to Time-of-Use) attacks. We summarize our comparison in Table 3 and Table 4.
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Hamidy, G.M., Philippaerts, P., Joosen, W. (2023). T3E: A Practical Solution to Trusted Time in Secure Enclaves. In: Li, S., Manulis, M., Miyaji, A. (eds) Network and System Security. NSS 2023. Lecture Notes in Computer Science, vol 13983. Springer, Cham. https://doi.org/10.1007/978-3-031-39828-5_17
Download citation
DOI: https://doi.org/10.1007/978-3-031-39828-5_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-39827-8
Online ISBN: 978-3-031-39828-5
eBook Packages: Computer ScienceComputer Science (R0)