Detecting Hardware Trojans in Unspecified Functionality Using Mutation Testing Nicole Fern K.-T. Tim Cheng UC Santa Barbara 1.

Slides:



Advertisements
Similar presentations
Developed by Reneta Barneva, SUNY Fredonia
Advertisements

Modular and Verified Automatic Program Repair Francesco Logozzo, Thomas Ball RiSE - Microsoft Research Redmond.
Verification and Validation
Using emulation for RTL performance verification
Making a Simple, Structured and Efficient Testbench Step-by-step
Data Dependencies Describes the normal situation that the data that instructions use depend upon the data created by other instructions, or data is stored.
- Verifying “Golden” reused IPs The Evil’s in the Edits William C Wallace Texas Instruments Nitin Jayaram Texas Instruments Nitin Mhaske Atrenta Inc Vijay.
Internal Logic Analyzer Final presentation-part B
Internal Logic Analyzer Final presentation-part A
Software Fault Injection for Survivability Jeffrey M. Voas & Anup K. Ghosh Presented by Alison Teoh.
Mutation Analysis with Coverage Discounting Peter Lisherness, Nicole Lesperance, and Kwang-Ting (Tim) Cheng University of California – Santa Barbara.
Reporter:PCLee With a significant increase in the design complexity of cores and associated communication among them, post-silicon validation.
NATW 2008 Using Implications for Online Error Detection Nuno Alves, Jennifer Dworak, R. Iris Bahar Division of Engineering Brown University Providence,
Who’s Watching the Watchmen? The Time has Come to Objectively Measure the Quality of Your Verification by David Brownell Design Verification Analog Devices.
Coverage Discounting: Improved Testbench Qualification by Combining Mutation Analysis with Functional Coverage Nicole Lesperance, Peter Lisherness, and.
Feng-Xiang Huang A Low-Cost SOC Debug Platform Based on On-Chip Test Architectures.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
1 Design For Debug Using DAFCA system Gadi Glikberg 15/6/06.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Bottom-Up Integration Testing After unit testing of individual components the components are combined together into a system. Bottom-Up Integration: each.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
What Exactly are the Techniques of Software Verification and Validation A Storehouse of Vast Knowledge on Software Testing.
Methods for checking simulation correctness How do you know if your testcase passed or failed?
VerificationTechniques for Macro Blocks (IP) Overview Inspection as Verification Adversarial Testing Testbench Design Timing Verification.
What are Exception and Interrupts? MIPS terminology Exception: any unexpected change in the internal control flow – Invoking an operating system service.
Circuit CAD Tools as a Security Threat University of Michigan † and Rice University ‡ June 9, 2008 Jarrod A. Roy †, Farinaz Koushanfar ‡ and Igor L. Markov.
Software faults & reliability Presented by: Presented by: Pooja Jain Pooja Jain.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
System/Software Testing
공과대학 > IT 공학부 Embedded Processor Design Chapter 8: Test EMBEDDED SYSTEM DESIGN 공과대학 > IT 공학부 Embedded Processor Design Presenter: Yvette E. Gelogo Professor:
Fault Models and Injection Strategies in SystemC Specifications ANTONIO MIELE Dipartimento di Elettronica e Informazione
1. Topics to be discussed Introduction Objectives Testing Life Cycle Verification Vs Validation Testing Methodology Testing Levels 2.
Reporter: PCLee. Assertions in silicon help post-silicon debug by providing observability of internal properties within a system which are.
Sparse Coding for Specification Mining and Error Localization Runtime Verification September 26, 2012 Wenchao Li, Sanjit A. Seshia University of California.
Kyle Mundt February 3,  Richard Lipton, 1971  A way of testing your tests  Alter your code in various ways  Check to see if tests fail on altered.
Software Metrics - Data Collection What is good data? Are they correct? Are they accurate? Are they appropriately precise? Are they consist? Are they associated.
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
Some Course Info Jean-Michel Chabloz. Main idea This is a course on writing efficient testbenches Very lab-centric course: –You are supposed to learn.
Reliable Design of Safety Critical Systems Dr. Abhik Roychoudhury School of Computing
Using Formal Verification to Exhaustively Verify SoC Assemblies by Mark Handover Kenny Ranerup Applications Engineer ASIC Consultant Mentor Graphics Corp.
Fsim_logic – A VHDL type for testing of FLYTRAP by Joanne E. DeGroat, Ph.D. Associate Professor The Ohio State University.
The First in GPON Verification Classic Mistakes Verification Leadership Seminar Racheli Ganot FlexLight Networks.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
Synthesis Of Fault Tolerant Circuits For FSMs & RAMs Rajiv Garg Pradish Mathews Darren Zacher.
Title of Selected Paper: IMPRES: Integrated Monitoring for Processor Reliability and Security Authors: Roshan G. Ragel and Sri Parameswaran Presented by:
14.1/21 Part 5: protection and security Protection mechanisms control access to a system by limiting the types of file access permitted to users. In addition,
Memory Subsystem verification – Can it be taken for granted ?
Macro Verification Guidelines Chapter 7.. Chap 7. Macro Verification Guidelines The goal of macro verification The macro is 100 percent correct in its.
Lecture 1 – Overview (rSp06) ©2008 Joanne DeGroat, ECE, OSU -1- Functional Verification of Hardware Designs EE764 – Functional Verification of Hardware.
A4 1 Barto "Sequential Circuit Design for Space-borne and Critical Electronics" Dr. Rod L. Barto Spacecraft Digital Electronics Richard B. Katz NASA Goddard.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Lach1MAPLD 2005/241-W Accessible Formal Verification for Safety-Critical FPGA Design BOF-W Presentation John Lach, Scott Bingham, Carl Elks, Travis Lenhart.
ATLAS Pre-Production ROD Status SCT Version
Regression Testing with its types
Software Security Testing
Dr.K.Venkata Subba Reddy Professor-CSE Department
Iterative Waterfall Model
Verification and Validation
Defending against malicious hardware
Fast Track Formal Verification Signoff
Formal Verification of Partial Good Self-Test Fencing Structures
Baisc Of Software Testing
Software Verification and Validation
Software Verification and Validation
Software Verification and Validation
Functional Safety Solutions for Automotive
Dave Marples Communications Division
Presentation transcript:

Detecting Hardware Trojans in Unspecified Functionality Using Mutation Testing Nicole Fern K.-T. Tim Cheng UC Santa Barbara 1

Main Contributions Information leakage Trojan only modifying unspecified functionality Mutation testing based detection method Discovered vulnerabilities and verification holes in UART design with sophisticated testbench 2

Hardware Trojans Malicious circuitry inserted in the hardware design Can be inserted by any party with access to the design! Goals: leak information, induce faults, chip failure, gain root privileges, etc. 3

Trojan Classes 1.The logic functions of some design signals are altered, system specifications are violated 2.The Trojan leaks information through side- channels 3.The logic functions of only those design signals which have unspecified behavior are altered to add malicious functionality without violating system specifications 4

FIFO Example What is the value of read_data when read_en is 0? 5

Threat Model Trojans can be inserted in the RTL and all subsequent design stages Our method analyzes RTL code, identifies Trojans which leak information from the circuit by hiding in unspecified functionality Behavior of circuit under Trojan activation condition is unspecified and unverified – Trojan can be active frequently, yet go undetected! 6

Detection Methodology Overview Goal: design independent method to identify dangerous unspecified functionality Use mutation testing to uniformly sample possible design modifications (can think of as very simple Trojan modifications) Use additional information to determine if modification is “dangerous” 7

Mutation Testing Basic Idea: If the testbench cannot detect an artificial error, testbench likely incapable of detecting a real error 8 DUT Tests Checker Detected Undetected Add more tests Fix

Mutation Testing Used in software domain since the 1970’s to test program correctness – Can also identify security weaknesses 1,2 Used in hardware domain for testbench qualification 3,4 Long simulation runtime and manual effort required for mutant analysis are drawbacks 1.Jia and Harman. An analysis and survey of the development of mutation testing. TSE, Breech et al. An attack simulator for systematically testing program-based security mechanisms. ISSRE, Bombieri et al. Functional qualification of TLM verification. DATE, Lisherness et al. Mutation Analysis with Coverage Discounting. DATE,

Interpreting Undetected Faults 2 Classifications: 1.Affect Poorly Tested Functionality Ex. Interrupt line set to static 0 2.Redundant Fault: does not affect design functionality Ex. for (int i = 0; i < 10; i++) Ex. Adder output toggled only during intermediate cycles 10 Coverage Discounting: automated analysis to identify Class 1 faults 1.Lisherness et al. Mutation Analysis with Coverage Discounting. DATE, !=

Identifying Dangerous Faults Attacker-observable signals: primary outputs, software-visible registers, network interface, bus interface,… Information leakage possible if undetected fault causes change in attacker-observable signals 11 if (key) { code w/ fault; } else { original code; } key 0 1 0/1 1/0 Attacker- observable signal

Dangerous Unspecified Functionality Undetected Fault Classes: 1.Affect Poorly Tested Functionality Ex. Interrupt line set to static 0 2.Redundant Fault: does not affect design functionality Ex. for (int i = 0; i < 10; i++) Ex. Adder output toggled only during intermediate cycles 12 != Undetected Fault Classes: 1.Affect Poorly Tested Functionality Ex. Interrupt line set to static 0 2.Affect attacker-observable signals, but not design functionality 3.Causes no change in any signal values (truly redundant) Automated method to identify only dangerous Class 2 faults

Trojan Detection Methodology 13 DUT Tests Checker Detected Undetected Add more tests Fix Before Fault Injection Record functional coverage Record attacker-observable signals Functional coverage differs? Fault affects poorly tested specified functionality Attacker- observable signals differ? Fault affects dangerous unspecified functionality Refine Specification

Poorly Tested Specified v. Dangerous Unspecified Functionality Redundant 14

Methodology Applied to FIFO Example What is the value of read_data when read_en is 0? 1)Fault is undetected 2)Causes changes in attacker-observable signal read_data! 15 ||

Fault Ranking Mechanism Might be too expensive to analyze all faults classified as dangerous Ideal to identify and fix functionality related to the “most dangerous” faults first Quantities easy to measure for each fault: 1.Number of attacker-observable bits differing 2.Total time attacker-observable signals differ 3.Number of distinct tests producing differences in attacker-observable signals 16

UART Controller Case Study OpenCores IP, OVM testbench from EDA vendor Verification Infrastructure: 80 tests, 846 coverpoints Mutation Testing: 1183 total faults injected – 110 faults not detected 32 caused differences in attacker-observable signals – 4 discounted coverpoints UART wb_dat_o int_o wb_ack_o baud_o stx_pad_o rts_pad_o dtr_pad_o Output signals going to main processor Output signals for serial data transmission attacker-observable bits

Wishbone Bus Trojan Analyzed 3 most dangerous faults – All affect bus between UART and main processor – All affect output enable signal for data bus Information can be leaked on data bus if a valid read transaction is NOT occurring! UART wb_dat_o int_o wb_ack_o baud_o stx_pad_o 18 rts_pad_o dtr_pad_o

Wishbone Bus Trojan The 3 Undetected Faults: Write enable is de- asserted (read transaction) Slave is selectedValid bus cycle in progress | | | | | | Undetected Faults changing & to | 19

Wishbone Bus Trojan Data can be leaked on wb_dat_o whenever all 4 conditions for a valid read transaction are not simultaneously met! | | We will leak data when wbstate==01 but not during a valid read transaction 20

Improving Bus Checker Data during invalid bus cycle, or output data during write cycles was not checked New assertion added: value of wb_dat_o cannot change unless design has been reset or read request is being acknowledged New check detects 3 faults and bus Trojan 21 Method able to highlight unspecified functionality in on-chip bus protocols allowing attacker to leak information using the system bus

Interrupt Functionality 5 possible interrupt sources, 1 interrupt bit Next most dangerous fault causes int_o to become X for many cycles during 49 of 80 tests! Attacker can spuriously change int_o to encode information UART wb_dat_o int_o wb_ack_o baud_o stx_pad_o 22 rts_pad_o dtr_pad_o

Why was this fault undetected? Interrupt Identification Register (IIR) reveals source of interrupt For all 5 events which cause interrupts, testbench checks that IIR is properly set, and that int_o is set within 10 cycles Due to a bug in the testbench if int_o is X this check is skipped! 23

Interrupt Functionality Functional coverage did not change, suggesting that the coverage model is insufficient! 24 Method able to highlight verification hole relating to specified interrupt functionality

Conclusions Illustrated how unspecified functionality can be altered for malicious purposes Automated analysis methodology: 1.Uncovered Trojan leaking information through unspecified functionality in a standard bus protocol 2.Identified verification hole for interrupt functionality 25

Questions? 26

Payload violates Design Specification Relies on rare triggering conditions Detection likely if triggered during verification/testing Detection methods identify “almost unused logic” Ex. When specific 128-bit plaintext value appears, dump key bits to output Payload operates completely within unspecified functionality Design behavior unspecified for activation conditions Likely not detected if triggered during testing Functionality Trojan modifies is unspecified and unverified Activation condition can occur frequently during testing (ex. read_en == 0) 27 Comparison of Trojans in Logic Domain

Coverage Discounting DUT Tests Checker Detected Undetected Add more tests No Yes Fix Coverage Changed? 28