Abstract
Most of the mitigation techniques against access-driven cache side-channel attacks (CSCAs) are not very effective. This is mainly because most mitigation techniques usually protect against any given specific vulnerability of the system and do not take a system-wide approach. Moreover, they either completely remove or greatly reduce the performance benefits. Therefore, to find a security vs performance trade-off, we argue in favor of need-based protection in this paper, which will allow the operating system to apply mitigation only after successful detection of CSCAs. Thus, detection can serve as a first line of defense against such attacks. In this work, we propose a novel OS-level runtime detection-based mitigation mechanism, called the Kingsguard, against CSCAs in general-purpose operating systems. The proposed mechanism enhances the security and privacy capabilities of Linux as a proof of concept, and it can be widely used in commodity systems without any hardware modifications. We provide experimental validation by mitigating three state-of-the-art CSCAs on two different cryptosystems running under Linux. We have also provided results by analyzing the effect of the combination of multiple attacks running concurrently under variable system noise. Our results show that the Kingsguard can detect and mitigate known CSCAs with an accuracy of more than 99% and 95%, respectively.
Similar content being viewed by others
References
Performance application programming interface. In: http://icl.cs.utk.edu/papi/http://icl.cs.utk.edu/papi/ (2018)
Aciiçmez O (2007) Yet another microarchitectural attack: exploiting I-cache. In: Proceedings of the 2007 ACM workshop on computer security architecture, CSAW ’07. ACM, New York, pp 11–18. https://doi.org/10.1145/1314466.1314469
Akram A, Mushtaq M, Bhatti M, Lapotre V, Gogniat G (2020) Meet the Sherlock Holmes’ of side channel leakage: a survey of cache sca detection techniques. IEEE Access 8:70,836–70,860
Alam M, Bhattacharya S, Mukhopadhyay D, Bhattacharya S (2017) Performance counters to rescue: a machine learning based safeguard against micro-architectural side-channel-attacks. Cryptology ePrint Archive Report 2017/564
Allaf Z, Adda M, Gegov A (2017) A comparison study on flush+reload and prime+probe attacks on aes using machine learning approachess. UK Workshop on Computational Intelligence pp 203—-213
Askarov A, Zhang D, Myers AC (2010) Predictive black-box mitigation of timing channels. In: Proceedings of the 17th ACM conference on computer and communications security, CCS ’10. ACM, New York, pp 297–307. https://doi.org/10.1145/1866307.1866341
Bazm MM, Sautereau T, Lacoste M, Sudholt M, Menaud JM (2018) Cache-based side-channel attacks detection through intel cache monitoring technology and hardware performance counters. In: 2018 Third international conference on fog and mobile edge computing (FMEC). IEEE, pp 7–12
Briongos S, Irazoqui G, Malagón P, Eisenbarth T (2018) Cacheshield: detecting cache attacks through self-observation. In: Proceedings of the eighth ACM conference on data and application security and privacy. ACM, pp 224–235
Chiappetta M, Savas E, Yilmaz C (2016) Real time detection of cache-based side-channel attacks using hardware performance counters. Appl Soft Comput 49(C):1162–1174. https://doi.org/10.1016/j.asoc.2016.09.014
Das S, Werner J, Antonakakis M, Polychronakis M, Monrose F (2019) Sok: the challenges, pitfalls, and perils of using hardware performance counters for security. In: 2019 IEEE Symposium on security and privacy (SP). IEEE, pp 20–38
France L, Mushtaq M, Bruguier F, Novo D, Benoit P (2021) Vulnerability assessment of the Rowhammer attack using machine learning and the gem5 simulator-work in progress. In: Proceedings of the 2021 ACM workshop on secure and trustworthy cyber-physical systems, pp 104–109
Ge Q, Yarom Y, Cock D, Heiser G (2016) A survey of microarchitectural timing attacks and countermeasures on contemporary hardware. J Cryptogr Eng, 1–27. https://doi.org/10.1007/s13389-016-0141-6
Gruss D, Maurice C, Wagner K, Mangard S (2016) Flush+Flush: a fast and stealthy cache attack. In: Proceedings of the 13th international conference on detection of intrusions and malware, and vulnerability assessment - volume 9721, DIMVA 2016. Springer, New York, pp 279–299
Gülmezoğlu B, İnci MS, Irazoqui G, Eisenbarth T, Sunar B (2015) A faster and more realistic flush+reload attack on aes. In: Revised selected papers of the 6th international workshop on constructive side-channel analysis and secure design - volume 9064, COSADE 2015. Springer, New York, pp 111–126. https://doi.org/10.1007/978-3-319-21476-4_8
He KK (2005) Kernel Korner. why and how to use netlink socket https://www.linuxjournal.com/article/7356
Irazoqui G, Inci MS, Eisenbarth T, Sunar B (2014) Wait a minute! A fast, Cross-VM attack on AES. In: International workshop on recent advances in intrusion detection. Springer, pp 299–319
Kocher P, Genkin D, Gruss D, Haas W, Hamburg M, Lipp M, Mangard S, Prescher T, Schwarz M, Yarom Y (2018) Spectre attacks: exploiting speculative execution. CoRR abs/1801:01203
Kulah Y, Dincer B, Yilmaz C, Savas E (2018) Spydetector: an approach for detecting side-channel attacks at runtime
Lipp M, Schwarz M, Gruss D, Prescher T, Haas W, Mangard S, Kocher P, Genkin D, Yarom Y, Hamburg M (2018)
Liu F, Yarom Y, Ge Q, Heiser G, Lee RB (2015) Last-level cache side-channel attacks are practical. In: Proceedings of the 2015 IEEE symposium on security and privacy, SP ’15. IEEE Computer Society, Washington, pp 605–622. https://doi.org/10.1109/SP.2015.43
Liu L, Wang A, Zang W, Yu M, Xiao M, Chen S (2018) Shuffler: mitigate cross-VM side-channel attacks via hypervisor scheduling. In: International conference on security and privacy in communication systems. Springer, pp 491–511
Mushtaq M (2019) Software-based detection and mitigation of microarchitectural attacks on Intel’s x86 architecture. Theses, Université de Bretagne Sud. https://hal-univ-ubs.archives-ouvertes.fr/tel-03105715
Mushtaq M, Akram A, Bhatti M, Rao NBR, Lapotre V, Gogniat G (2018) Run-time detection of Prime+ Probe side-channel attack on AES encryption algorithm. In: Global Information infrastructure and networking symposium
Mushtaq M, Akram A, Bhatti M, Chaudhry M, Lapotre V, Gogniat G (2018) Nights-watch: a cache-based side-channel intrusion detector using hardware performance counters. In: Proceedings of the 7th International workshop on hardware and architectural support for security and privacy. ACM, p 1
Mushtaq M, Akram A, Bhatti M, Chaudhry M, Yousaf M, Farooq U, Lapotre V, Gogniat G (2018) Machine learning for security: the case of side-channel attack detection at run-time. In: 25th IEEE International conference on electronics circuits and systems. Bordeaux
Mushtaq M, Bricq J, Bhatti M, Akram A, Lapotre V, Gogniat G, Benoit P (2020) Whisper: a tool for run-time detection of side-channel attacks. IEEE Access 8:83,871–83,900. https://doi.org/10.1109/ACCESS.2020.2988370
Osvik DA, Shamir A, Tromer E (2006) Cache attacks and countermeasures: the case of AES. Springer, Berlin, pp 1–20. https://doi.org/10.1007/11605805_1
Peng Sh, Zhou Qf, Zhao Jl (2017) Detection of cache-based side channel attack based on performance counters. DEStech Trans on Computer Science and Engg
Sabbagh M, Fei Y, Wahl T, Ding AA (2018) SCADET: a side-channel attack detection tool for tracking Prime+ Probe. In: ICCAD
Stefan D, Buiras P, Yang EZ, Levy A, Terei D, Russo A, Mazières D (2013) Eliminating cache-based timing attacks with instruction-based scheduling. In: European symposium on research in computer security. Springer, pp 718–735
Tromer E, Osvik DA, Shamir A (2010) Efficient Cache Attacks on AES, and Countermeasures. J Cryptol 23(1):37–71. https://doi.org/10.1007/s00145-009-9049-y
Vattikonda BC, Das S, Shacham H (2011) Eliminating fine grained timers in Xen. In: Proceedings of the 3rd ACM workshop on cloud computing security workshop, cCSW ’11. ACM, New York, pp 41–46. https://doi.org/10.1145/2046660.2046671
Yarom Y, Benger N Recovering OpenSSL ECDSA Nonces using the FLUSH+RELOAD cache side-channel attack
Yarom Y, Falkner K (2014) FLUSH+RELOAD: a high resolution, low noise, L3 cache side-channel attack. In: Proceedings of the 23rd USENIX conference on security symposium, SEC’14. USENIX Association, Berkeley, pp 719–732. http://dl.acm.org/citation.cfm?id=2671225.2671271
Yarom Y, Genkin D, Heninger N (2016) CacheBleed: a timing attack on OpenSSL constant time RSA. Springer, Berlin, pp 346–367. https://doi.org/10.1007/978-3-662-53140-2_17
Zhang R, Su X, Wang J, Wang C, Liu W, Lau RWH (2015) On mitigating the risk of cross-vm covert channels in a public cloud. IEEE Trans Parallel Distrib Syst 26(8):2327–2339. https://doi.org/10.1109/TPDS.2014.2346504
Zhang T, Zhang Y, Lee RB (2016) Cloudradar: a real-time side-channel attack detection system in clouds. In: International symposium on research in attacks, intrusions, and defenses. Springer, pp 118–140
Zhang Y, Juels A, Reiter MK, Ristenpart T (2012) Cross-vm side channels and their use to extract private keys. In: Proceedings of the 2012 ACM conference on computer and communications security, CCS ’12
Zhang Y, Reiter MK (2013) Düppel: retrofitting commodity operating systems to mitigate cache side channels in the cloud. In: Proceedings of the 2013 ACM SIGSAC conference on computer & communications security, CCS ’13, pp 827– 838
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Mushtaq, M., Yousaf, M.M., Bhatti, M.K. et al. The Kingsguard OS-level mitigation against cache side-channel attacks using runtime detection. Ann. Telecommun. 77, 731–747 (2022). https://doi.org/10.1007/s12243-021-00906-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12243-021-00906-3