Lune

CCS2023Top-tier venue

SHERLOC: Secure and Holistic Control-Flow Violation Detection on Embedded Systems

Xi Tan, Ziming Zhao

Abstract

Microcontroller-based embedded systems are often programmed in low-level languages and are vulnerable to control-flow hijacking attacks. One approach to prevent such attacks is to enforce control-flow integrity (CFI), but inlined CFI enforcement can pose challenges in embedded systems. For example, it increases binary size and changes memory layout. Trace-based control-flow violation detection (CFVD) offers an alternative that doesn't require instrumentation of the protected software or changes to its memory layout. However, existing CFVD methods used in desktop systems require kernel modifications to store and analyze the trace, which limits their use to monitoring unprivileged applications. But, embedded systems are interrupt-driven, with the majority of processing taking place in the privileged mode. Therefore, it is critical to provide a holistic and system-oriented CFVD solution that can monitor control-flow transfers both within and among privileged and unprivileged components. In this paper, we present Sherloc, a Secure and Holistic Control-Flow Violation Detection mechanism designed for microcontrollerbased embedded systems. Sherloc ensures security by configuring the hardware tracing unit, storing trace records, and executing the violation detection algorithm in a trusted execution environment, which prevents privileged programs from bypassing monitoring or tampering with the trace. We address the challenges of achieving holistic and system-oriented CFVD by formalizing the problem and monitoring forward and backward edges of unprivileged and privileged programs, as well as control-flow transfers among unprivileged and privileged components. Specifically, Sherloc overcomes the challenges of identifying legitimate asynchronous interrupts and context switches at run-time by using an interrupt-and scheduling-aware violation detection algorithm. Our evaluations on the ARMv8-M architecture demonstrate the effectiveness and efficiency of Sherloc.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SoK: Integrity, Attestation, and Auditing of Program Execution cites SoK: Shining Light on Shadow Stacks
  • PEARTS: Provable Execution in Real-Time Embedded Systems cites SoK: Shining Light on Shadow Stacks
  • PEARTS: Provable Execution in Real-Time Embedded Systems cites Securing Real-Time Microcontroller Systems through Customized Memory View Switching
  • 'We just did not have that on the embedded system': Insights and Challenges for Securing Microcontroller Systems from the Embedded CTF Competitions cites Securing Real-Time Microcontroller Systems through Customized Memory View Switching
  • 'We just did not have that on the embedded system': Insights and Challenges for Securing Microcontroller Systems from the Embedded CTF Competitions cites ACES: Automatic Compartments for Embedded Systems
  • ACES: Automatic Compartments for Embedded Systems cites Securing Real-Time Microcontroller Systems through Customized Memory View Switching
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. SoK: Integrity, Attestation, and Auditing of Program ExecutionMahmoud Ammar, Adam Caulfield, Ivan De Oliveira NunesS&P 2025
  2. PEARTS: Provable Execution in Real-Time Embedded SystemsAntonio Joia Neto, Norrathep Rattanavipanon, Ivan De Oliveira NunesS&P 2025
  3. 'We just did not have that on the embedded system': Insights and Challenges for Securing Microcontroller Systems from the Embedded CTF CompetitionsZheyuan Ma, Gaoxiang Liu, Alex Eastman, Kai Kaufman et al.CCS 2025
  4. The Cost of Performance: Breaking ThreadX with Kernel Object Masquerading AttacksXinhui Shao, Zhen Ling, Yue Zhang, Huaiyu Yan et al.USENIX Security 2025
  5. XCFI: Comprehensive Control-Flow Integrity for Arm TrustZone-MYunju Gu, Jaeyeol Park, Donghyun KwonUSENIX Security 2026

Builds on12

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
  2. SoK: Shining Light on Shadow StacksNathan Burow, Xinping Zhang, Mathias PayerS&P 2019 · 170 citations
  3. Ramblr: Making Reassembly Great AgainRuoyu Wang, Yan Shoshitaishvili, Antonio Bianchi, Aravind Machiry et al.NDSS 2017 · 155 citations
  4. Securing Real-Time Microcontroller Systems through Customized Memory View SwitchingChung Hwan Kim, Taegyu Kim, Hongjun Choi, Zhongshu Gu et al.NDSS 2018 · 127 citations
  5. ACES: Automatic Compartments for Embedded SystemsAbraham A. Clements, Naif Saleh Almakhdhub, Saurabh Bagchi, Mathias PayerUSENIX Security 2018 · 89 citations

Related papers

  1. µRAI: Securing Embedded Systems with Return Address IntegrityNaif Saleh Almakhdhub, Abraham A. Clements, Saurabh Bagchi, Mathias PayerNDSS 2020
  2. Silhouette: Efficient Protected Shadow Stacks for Embedded SystemsJie Zhou, Yufei Du, Zhuojia Shen, Lele Ma et al.USENIX Security 2020
  3. ChaosINTC: A Secure Interrupt Management Mechanism against Interrupt-based Attacks on TEEYifan Zhu, Peinan Li, Lutan Zhao, Dan Meng et al.DAC 2023 · 2 citations
  4. SHiFT: Semi-hosted Fuzz Testing for Embedded ApplicationsAlejandro Mera, Changming Liu, Ruimin Sun, Engin Kirda et al.USENIX Security 2024 · 15 citations
  5. OAT: Attesting Operation Integrity of Embedded DevicesZhichuang Sun, Bo Feng, Long Lu, Somesh JhaS&P 2020 · 89 citations
Dusk over the sea between two cliffs drawn in fine vertical lines