FuCE: Fuzzing+Concolic Execution guided Trojan Detection in Synthesizable Hardware Designs

Mukta Debnath, Animesh Basak Chowdhury, Debasri Saha, Susmita Sur-KolayarXiv 2021

Abstract

High-level synthesis (HLS) is the next emerging trend for designing complex customized architectures for applications such as Machine Learning and Video Processing. It provides a higher level of abstraction and freedom to hardware engineers to perform hardware-software co-design. However, it opens up a new gateway to attackers to insert hardware Trojans. Such Trojans are semantically more meaningful and stealthy compared to gate-level Trojans and therefore are hard to detect using state-of-the-art gate-level Trojan detection techniques. Although recent works have proposed detection mechanisms to uncover such stealthy Trojans in HLS designs, these techniques are either specially curated for existing Trojan benchmarks or may run into scalability issues for large designs. In this work, we leverage the power of greybox fuzzing combined with concolic execution to explore deeper segments of design and uncover stealthy Trojans. Experimental results show that our proposed framework, FuCE, is able to automatically detect Trojans faster with fewer test cases while attaining notable branch coverage without any manual pre-processing analysis.

Introduction: The Threat of Synthesizable Hardware Trojans

As chip designs grow more complex, engineers are increasingly adopting High-Level Synthesis (HLS), utilizing languages like C++ and SystemC to boost productivity. However, this shift introduces a significant security risk: Synthesizable Hardware Trojans (SHTs). These malicious logic blocks are often inserted into third-party intellectual property (3PIP) components, which are considered untrusted in the globalized semiconductor supply chain.

Threat model of hardware Trojan insertion in the SoC design flow.

Unlike traditional gate-level Trojans, HLS Trojans are semantically complex. They often function as "ticking time-bombs," triggering only after a specific 32-bit "magic number" is received or a counter reaches a massive value. Existing detection methodologies generally fall into two categories, both with significant drawbacks:

  1. Greybox Fuzzing: Efficient at exploring shallow code paths but fails when faced with complex conditional checks (e.g., if (input == 0xDEADBEEF)), as the probability of a random mutation hitting the exact trigger value is near zero.
  2. Concolic/Symbolic Execution: Uses mathematical solvers to find exact trigger inputs but suffers from "path explosion," where the state space becomes too large for the engine to process, leading to high memory consumption and timeouts.

Methods: The FuCE Architecture

The FuCE framework addresses these limitations by orchestrating a synergistic "tag-team" approach between fuzzing and concolic execution.

The FuCE test generation framework architecture, illustrating the synergy between the Fuzz and Concolic engines.

The framework consists of three primary components:

  • Pre-processing: The design is instrumented using LLVM to track branch coverage and generate a testable executable.
  • Greybox Fuzzing (via AFL): FuCE utilizes greybox fuzzing to rapidly map out the easily reachable segments of the design. It employs genetic algorithms to mutate inputs and prioritize test cases that improve coverage.
  • Concolic Execution (via S2E): When the fuzzer reaches a "stuck" state—defined by a lack of coverage improvement over a set time threshold ($time_{threshold}$)—FuCE invokes the concolic engine. This engine treats inputs as symbolic variables to solve for the exact values required to flip previously "unseen" conditional branches.
  • Feedback Loop: Once a hard branch is solved, the resulting "interesting" test case is fed back to the fuzzer as a new seed, allowing it to explore deeper code segments that were previously inaccessible.

Experimental Results

FuCE was evaluated using the S3CBench suite, which includes SystemC Trojan-infected designs for applications like AES, ADPCM, and UART. The framework was tested against both combinational and sequential Trojans (CWOM, SWM, and SWOM).

Key Performance Metrics

  • Detection Speed: For the AES-cwom benchmark, FuCE detected the Trojan in 47 seconds, compared to 337 seconds for vanilla AFL. Pure symbolic execution (S2E) timed out without finding the trigger.
  • Code Coverage: FuCE achieved 100% branch coverage on complex benchmarks like ADPCM-swm, where standalone AFL and S2E failed to exceed 90%.
  • Resource Efficiency: FuCE maintained a significantly lower memory footprint than pure concolic engines. In the ADPCM test, FuCE utilized approximately 51MB of RAM, while pure S2E memory usage ballooned to over 3GB.
  • Effectiveness: FuCE successfully detected all Trojans in the S3CBench suite, often with significantly fewer test cases than competing methods.

Insights and Future Work

A core innovation of FuCE is the "Stuck" Heuristic, which intelligently determines when to switch from the computationally inexpensive fuzzer to the more resource-intensive concolic engine. Furthermore, FuCE's ability to automatically identify variables for complex checks reduces the manual effort typically required for formal verification.

Future research will focus on improving handling for complex input formats (such as image files) and extending the framework to target more rigorous metrics like MC/DC (Modified Condition/Decision Coverage). Additionally, the authors plan to investigate how Trojans inserted at lower levels (RTL or gate-level) manifest in HLS source code to broaden the framework's detection capabilities.

Summary updated

BibTeX
@misc{debnath2021fuce,
  author = {Mukta Debnath and Animesh Basak Chowdhury and Debasri Saha and Susmita Sur-Kolay},
  title = {{FuCE: Fuzzing+Concolic Execution guided Trojan Detection in Synthesizable Hardware Designs}},
  year = {2021},
  eprint = {2111.00805},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.00805},
}
Figure