Nothing Special   »   [go: up one dir, main page]

Skip to main content

T3E: A Practical Solution to Trusted Time in Secure Enclaves

  • Conference paper
  • First Online:
Network and System Security (NSS 2023)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Removed as of Intel SGX SDK for Linux version 2.8 (https://github.com/intel/linux-sgx/releases/tag/sgx_2.8).

  2. 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. 3.

    https://github.com/DistriNet/T3E.

  4. 4.

    https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/get-started.html.

  5. 5.

    https://github.com/tpm2-software/tpm2-tss.

References

  1. 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

  2. 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)

    Google Scholar 

  3. 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

  4. 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

  5. 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

    Book  Google Scholar 

  6. 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

  7. 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

  8. Chen, L., et al.: Trusted Computing Platforms: TPM2.0 in Context. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-08744-3

    Book  Google Scholar 

  9. 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

  10. 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)

  11. Franke, D.F., et al.: Network Time Security for the Network Time Protocol. RFC 8915 (2020). https://www.rfc-editor.org/info/rfc8915

  12. 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

  13. Intel: Intel® Software Guard Extensions Programming Reference (2014). https://www.intel.com/content/dam/develop/external/us/en/documents/329298-002-629101.pdf

  14. 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

  15. 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

  16. Intel: Intel® Transactional Synchronization Extension (Intel® TSX) Disable Update for Selected Processors (2022). https://cdrdv2.intel.com/v1/dl/getContent/643557

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

    Article  Google Scholar 

  22. 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

    Chapter  Google Scholar 

  23. The Trusted Computing Group: ISO/IEC 11889-1:2015 - Information Technology - Trusted Platform Module (2015). https://www.iso.org/standard/66510.html

  24. 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

    Chapter  MATH  Google Scholar 

  25. 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

  26. 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

  27. 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/

  28. 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

  29. 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

Download references

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

Authors

Corresponding author

Correspondence to Gilang Mentari Hamidy .

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.

Table 3. Comparison of T3E and related solutions for trusted time in SGX.
Table 4. Security evaluation of T3E and related solutions for trusted time in SGX, with regard to the security requirements in Sect. 5

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

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics