SlideShare a Scribd company logo
1 of 36
Download to read offline
Fault	Injection	Attacks
on	embedded	systems
Ziyad	Alshehri
IA	5984
Fall	- 2017
Overview
• Fault	injection	techniques
• Clock	Glitching
• Timing	the	attack
• Setup	for	Clock	Glitching
• Advanced	Clock	Glitching
• Voltage	Glitching
• Setup	for	Voltage	Glitching
• Defenses	against	fault	injection
• Contribution	to	Sprite	team
• Conclusion
Glitching	Attacks
• Introducing	faults	in	a	target	to	alter	its	intended	behavior
• The	goal	is	to	skip	instructions	or	corrupt	data	while	
read/write
• Real-life	Example:
• Xbox	360	Reset	Glitch	Hack	– by	a	French	hacker	GliGli,	2011
Clock	Glitching
• Since	the	instructions	are	executed	in	a	pipeline	based	on	the	rising	edge,	it’s	
possible	to	skip	an	instruction	by	reducing	the	execution	time.
Clock	Glitching
• To	build	a	Clock	Glitcher,	we	XOR	the	glitch	stream	with	the	original	clock:
• Then	we	remove	the	crystal	oscillator	and	use	the	new	clock.
Timing	the	attack
• In	order	to	precisely	attack	the	target,	we	have	to	
identify	a	trigger	signal	to	initiate	the	attack	based	
on.
• Status	LEDs
• Toggle	GPIO
• Serial	messages	(	UART	)
• Any	other	hardware	events	(	Reset,	… )
Setup	for	Clock	Glitching
• We	will	use	Chipwhisperer-Lite	for	this	attack
• Comprised	of	MCU	&	FPGA	(ATSAM3U2C	+	
SPARTAN-6)
CLK	out
Trigger	in
UART	for	output
Setup	for	ATMEGA1284PChipWhispere
r
CLK	OUT
Trigger	
in
UART	
output
ChipWhisperer	Software	
Configuration
External	
trigger	
offset
=	22%	of	50ns	=	11ns
=	14%	of	50ns	=	7ns
Glitch	
offset
Glitch	
Width
20MHz	freq =	Period	50ns
Results
Trigger
Target	instruction
Examples	of	Successful	Glitches
• Rolled	back	to	version	1	using	FPGA	trigger	(UART=‘U’)	to	skip	version	check,	and	then	printed	the	
flag.
River	Hawk	(Umass Lowell)
Target	instruction
Examples	of	Successful	Glitches
• Obtained	the	encryption	keys	by	glitching to	exit	the	while	loop,	and	then	installing	a	malicious	
firmware	to	print	the	keys	over	serial,	then	decrypted	v1	firmware.
• Forced	the	bootloader	to	print	out	memory	read	log	and	decrypt	it	using	the	keys	to	get	stored	flags.
Northeastern	ReadbackNortheastern	Upload
If	statement
Print	‘F’	=	0x46
Infinite	loop
wdt_reset()
Minimum	optimization	-O1
Optimized	!Optimized	!
Lesson	learned! Review	the	assembly	code
Advanced	Glitching
• Practical	Analysis	of	Embedded	Microcontrollers	
against	Clock	Glitching	Attacks - by	Ricardo	Gomes	da	
Silva,	17	March	2014	
Summary	of	the	paper:
• The	research	proposes	a	better	design	for	a	glitching
system,	and	compares	between	different	glitching
results	for	different	assembly	instructions.
• Also,	the	research	shows	how	glitching multiple	loops	is	
possible	with	the	appropriate	hardware configurations.
Glitcher Development
• Using	Die	Datenkrake,	Hardware	Security	Platform
• Comprised	of	ARM	MCU	&	FPGA
• Their	target	XMEGA-A1	Xplained
XMEGA-A1	Xplained
Glitcher Development
• Results	of	the	glitched clock:
• The	research	compares	between	
• Unconditional	loops	(Jump,	Relative	Jump)
• Conditional	loops	(Branch	if	equal,	Branch	if	not	equal)
• Multiple	loops
Unconditional	loops: Jump	(	JMP )
Explanation:
JMP	requires	3	CLK	cycles	to	be	
executed.	
Each	instruction	is	(16-bit)	long,	
and	the	new	address	is	(22-bit)	
long,	therefore,	we	need	2	cycles	
to	fit	the	new	address.	If	these	2	
cycles	were	glitched then	we	can	
bypass	the	instruction.
If	we	glitched both	
cycles,	we	won’t	
change	the	PC	value.
Unconditional	loops	– Relative	
Jump	(	RJMP )
Explanation:
RJMP	requires	2	CLK	cycles	to	
be	executed.	
RJMP	is	a	sum	of	the	current	
PC	+	offset	(12	bit)	+1	,	so	the	
first	cycle	will	conduct	the	
sum	operation	for	the	new	
address,	if	glitched,	then	we	
can	bypass	the	instruction.
Conditional	loops	– Branch	if	
equal	(	BREQ )
Explanation:
BREQ	changes	the	current	
flow	of	the	program	if	the	
compared	values	are	equal.	In	
other	words,	subtract	then	
branch	if	zero.
BREQ	requires	1	or	2	CLK	
cycles	to	be	executed.	The	first	
cycle,	will	compare	if	the	
result	is	zero	or	not	(0xFF),	
and	the	second	one	will	
execute	the	branch.
We	only	need	to	glitch	the	
first	cycle	to	bypass	the	
instruction.
Conditional	loops	–Branch	if	not	
equal	(BRNE)
Explanation:
BRNE	changes	the	current	flow	
of	the	program	if	the	compared	
values	are	not	equal.	In	other	
words,	subtract	then	branch	if	
not	zero.
BRNE	requires	1	or	2	CLK	cycles	
to	be	executed.	The	first	cycle,	
will	compare	if	the	result	is	not	
zero	(0xEE),	and	the	second	one	
will	execute	the	branch.
We	only	need	to	glitch	the	first	
cycle	to	bypass	the	instruction.
Multiple	loops	– (double	RJMP)
We	needed	to	use	the	internal	
trigger	to	add	a	precise	delay	
before	the	second	RJMP.
Multiple	loops	– (double	RJMP)
Explanation:
D0 and	W0 correspond	to	the	
delay	and	width	of	the	first	glitch,	
while	D1	and	W1	correspond	to	
the	delay	and	width	of	the	second	
glitch	(after	the	trigger).
They	were	able	to	glitch	multiple	
RJMPs	with	1-2	repeated	glitches
VCC	Glitching
Shunt	
resistor
Setup	for	Voltage	Glitching
Setup	for	ATMEGA1284P
ChipWhisperer
Glitch	OUT
Example	of	VCC	Glitching
Defenses	against	glitching attacks
• Using	different	clock	for	sensitive	operations	(	
Firmware	Dogs	)
Defenses	against	glitching attacks
• Enable	Brown-out-detection	against	vcc glitching
Defenses	against	glitching attacks
• Erase	the	flash/eeprom in	case	failure	(Firmware	Dogs,	
pgm_flag)
• Using	bl_configure function,	to	configure	only	once	(	
Firmware	Dogs	)
Firmware	Dogs:	Fill	the	buffer	with	FFs	and	rewrite pgm_flag:	Erase	SRAM,	then	erase	flash
Defenses	against	glitching attacks
• Disable	any	unnecessary	debug	info	(Snorlax)
Snorlax:	no	feedback	on	UART!
Contribution	to	Sprite	team
• Got	all	flags	from	RPI,	using	AVR	Dragon	and	High	
Voltage	Parallel	Programming	(HVPP)
• Hardening	the	hardware	configurations	(Lockbits)
Contribution	to	Sprite	team
• implementing	Clock	Glitching,	and	helped	getting	
all	flags	from	vulnerable	designs.
References
• Gomes,	Ricardo,	“Practical	Analysis	of	Embedded	Microcontrollers	against	Clock	Glitching	
Attacks”,	https://rgsilva.com/Bachelorarbeit.pdf
• Riscure:	https://www.riscure.com/documents/eu-16-timmers-bypassing-secure-boot-using-
fault-injection.pdf?1479193246
• NCC	Group:https://www.blackhat.com/docs/eu-15/materials/eu-15-Giller-Implementing-
Electrical-Glitching-Attacks.pdf
• Chipwhisperer:	https://wiki.newae.com
• Die	Datenkrake:	https://github.com/ddk
• AVR	XMEGA	datasheet:	http://www.atmel.com/images/doc8077.pdf
Thank	you

More Related Content

What's hot

Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and ResearchUsing MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
MITRE - ATT&CKcon
 
Intrusion detection
Intrusion detectionIntrusion detection
Intrusion detection
Umesh Dhital
 

What's hot (20)

MITRE ATT&CKcon 2.0: Zeek-based ATT&CK Metrics and Gap Analysis; Allan Thomso...
MITRE ATT&CKcon 2.0: Zeek-based ATT&CK Metrics and Gap Analysis; Allan Thomso...MITRE ATT&CKcon 2.0: Zeek-based ATT&CK Metrics and Gap Analysis; Allan Thomso...
MITRE ATT&CKcon 2.0: Zeek-based ATT&CK Metrics and Gap Analysis; Allan Thomso...
 
01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swetha01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swetha
 
Buffer overflow attacks
Buffer overflow attacksBuffer overflow attacks
Buffer overflow attacks
 
Syslog Protocols
Syslog ProtocolsSyslog Protocols
Syslog Protocols
 
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
ATTACKers Think in Graphs: Building Graphs for Threat Intelligence
ATTACKers Think in Graphs: Building Graphs for Threat IntelligenceATTACKers Think in Graphs: Building Graphs for Threat Intelligence
ATTACKers Think in Graphs: Building Graphs for Threat Intelligence
 
Certified Ethical Hacker v11 First Look.pdf
Certified Ethical Hacker v11 First Look.pdfCertified Ethical Hacker v11 First Look.pdf
Certified Ethical Hacker v11 First Look.pdf
 
Leveraging MITRE ATT&CK - Speaking the Common Language
Leveraging MITRE ATT&CK - Speaking the Common LanguageLeveraging MITRE ATT&CK - Speaking the Common Language
Leveraging MITRE ATT&CK - Speaking the Common Language
 
Web Hacking
Web HackingWeb Hacking
Web Hacking
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and ResearchUsing MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
Using MITRE PRE-ATTACK and ATTACK in Cybercrime Education and Research
 
Emily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyEmily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum Cryptography
 
System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )
 
8. Clock Tree Synthesis.pdf
8. Clock Tree Synthesis.pdf8. Clock Tree Synthesis.pdf
8. Clock Tree Synthesis.pdf
 
Cryptography in Blockchain
Cryptography in BlockchainCryptography in Blockchain
Cryptography in Blockchain
 
Bypassing Secure Boot using Fault Injection
Bypassing Secure Boot using Fault InjectionBypassing Secure Boot using Fault Injection
Bypassing Secure Boot using Fault Injection
 
Coverage and Introduction to UVM
Coverage and Introduction to UVMCoverage and Introduction to UVM
Coverage and Introduction to UVM
 
Intrusion detection
Intrusion detectionIntrusion detection
Intrusion detection
 
Catch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs Blue
 

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

Fault Injection Attacks