This repository contains source files related to bachelor's thesis Attacking hardware using fault injection.
Contains a simple program that blinks an LED. The program is intended to demonstrate the configuration of input-output ports in Assembly on the AVR architecture.
This directory contains the code used in Section 3.1. It includes the following subdirectories:
-
vccOnTheCheap/originalCTF/ – original code taken from: https://blog.securitybits.io/2019/06/voltage-glitching-on-the-cheap/
-
vccOnTheCheap/upgradedCTF/ – contains an improved version of the attack (including parts written in C Inline Assembly)
-
vccOnTheCheap/fiesta.hex – the compiled HEX image of the firmware, which was the target of our attack
-
vccOnTheCheap/Makefile – provides a command to upload
fiesta.hexto the ATMega328P microcontroller using the AVRDUDE software (the target device where the microcontroller is connected/dev/ttyUSB0needs to be adjusted)
The directory contains an auxiliary program that was used to analyze the voltage waveform under an oscilloscope.
This directory contains the code used for testing the effects of the attack during experiments in Section 3.3.1.
-
experiments/experimentsTarget – the source code of the program that was targeted by the attack
-
experiments/experimentsGlitch – the source code of the program that controlled the attack (Arduino Nano board)
-
experiments/STMglitch.zip – an archive of the exported project from STM32CubeIDE. The archive can be imported as a project into this IDE. The main file is STMglitch/Core/Src/main.c, which contains the source code for the STM32 F4 Discovery board. The other files in the archive were automatically generated by STM32CubeIDE.
Contains programs vulnerable to fault injection used as examples in Chapter 4.
-
CTFexamples/CTF-LED – program from example 1 (Section 4.1) – Locked Chip
-
CTFexamples/CTF-RFID – program from example 2 (Section 4.2) – RFID Card Reader
-
CTFexamples/CTF-LED.hex and CTFexamples/CTF-RFID.hex – compiled HEX images of programs from examples 1 and 2
-
CTFexamples/Makefile – provides a command to upload both HEX images to the ATMega328P microcontroller using the AVRDUDE software (the target device where the microcontroller is connected
/dev/ttyUSB0needs to be adjusted)