SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Adam Kostrzewa
Who and why should fear hardware
trojans?
Kraków 04.05.2018
Adam Kostrzewa, Kraków 4-5.06.2018
The presented work disseminates the results of the author’s spare tme actiites done solely using his
own, priiate resources. Therefore, the iiews and opinions expressed in this presentaton are those of the
author and author only and do not necessarily refect the ofcial policy or positon of his employer.
Examples of analysis performed within this artcle are only for demonstraton purposes and do not
necessarily refect real-world products.
Disclaimer:
Adam Kostrzewa, Kraków 4-5.06.2018
Can we trust integrated circuits and silicon chips?
Do we have a choice? Due to:
• technological barriers,
• and high producton costs
we must count on manufacturers’ honesty and popularity.
Therefore, we commonly buy/use:
• high volume products from leading producers, which should enable
faster detecton of potental threats,
• and have legal consequences in case of threats.
(possible in mainframe and telecommunicaton, difcult in embedded)
Hardware Security - Motiaton
Adam Kostrzewa, Kraków 4-5.06.2018
●
Is there a reason for concern?
●
Is the equipment from a large supplier safe?
●
What is the threat posed by hardware trojans?
●
Is it worth getng a closer look at them?
This presentaton presents introducton to the domain.
Questons of this Presentaton
Adam Kostrzewa, Kraków 4-5.06.2018
Defniton: functon of a hardware component, hidden from the user,
which can add, remove or modify the functonality of a hardware
component and, therefore, reduce its reliability or create a potental threat
Constructed from:
payload – modifcaton
of a circuit
trigger – signal actvatng
the payload
(combinatonal or sequental)
What are hardware trojans?
Signal S
Not S
Trigger
Payload
Adam Kostrzewa, Kraków 4-5.06.2018
Similarites:
• malicious intenton, e.g., atacks against data confdentality,
integrity and system’s availability
• evasion of detecton, and seldom actvaton,
Diferences:
• cannot be removed post-deployment (no updates)
• do not spread, must be manufactured
• high producton costs (equipment and skilled labor)
Do not forget about HW/SW co-design!
Relaton to Sofware Trojans
Adam Kostrzewa, Kraków 4-5.06.2018
Results gathered by author
„Hardware Trojans“ in Google Scholar (May 2018)
2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
0
500
1000
1500
2000
2500
3000
2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
0
500
1000
1500
2000
2500
3000
Snowden Affair
"
Hot Topic!
500%
increase
Adam Kostrzewa, Kraków 4-5.06.2018
Payload (Physical)
Trigger (Actvaton)
Characteristcs of Trojans
Type Size Distribution Structure
functional
parametric
small
(transistors / wires)
large
(gates, circuits)
tight
loose
modify layout
no changes
Externally Activated
Receiver
Access data
Internally Activated
Always On Condition Based
sensor
(voltage,
temperature,
external)
logic
(internal state,
clock/counter,
Input – data,
instruction, interrupt)
Talk‘s Outline
➔
Motiaton
➔
Work principles and objecties of a HW trojan
➔
CPU Example (+ Demo of an exemplary atack)
➔
Where and when can a hardware trojan be introduced?
➔
Defense methods and their costs
➔
Summary
Adam Kostrzewa, Kraków 4-5.06.2018
The security of an operatng system is based on the assumpton that the
processor is operatng according to a strict specifcaton and a known set of
predefned rules.
Commonly applied: hierarchical protecton domains (protecton rings) -
introduced in the 70’s for MULTICS.
• at least two modes of operaton (hypervisor and user)
• in hypervisor mode, kernel has access to all commands and addresses
• only a subset of commands is available in user mode
• transiton can happen only according to a predefned set of rules
(e.g. syscalls and interrupts)
Hardware Aspects of OS Security
Adam Kostrzewa, Kraków 4-5.06.2018
Modes of Processor Work
Adam Kostrzewa, Kraków 4-5.06.2018
Hardware Implementaton – RISC Pipeline
IF
ID
ME
EX
WBIF ID MEEX
IF ID EX
IF ID
IF WBMEEX
WBME
ME
WBID MEEX
Instruction
Time
(in clock cycles)
Instruction +1
Instruction +2
Instruction +3
Instruction +4
IM Reg RegDM
Processor
Datapath
ALU
CC1 CC2 CC3 CC4 CC5 CC6 CC7CC6 CC8 CC9
Adam Kostrzewa, Kraków 4-5.06.2018
Hardware Implementaton - Pipeline
Decode instruction’s
addressIF
Is the selected
address available in
the processor mode?
Is the selected
instruction allowed in
the processor mode?
Decode Instruction
Fetch Instruction
ID
EXCEPTION
Memory
protection
violation
EXCEPTION
Illegal
Instruction
Execution
ME
EX
Decode memory address
Is the selected
address available in
the processor mode?
Conduct Operation
WB
Is the selected
register available in
the processor mode
Conduct Operation
EXCEPTION
Memory
protection
violation
EXCEPTION
Illegal
Instruction
EXCEPTION
Illegal
Access
Adam Kostrzewa, Kraków 4-5.06.2018
How it is implemented?
Instructions available in USER MODE
Instructions available in SUPERVISOR
(KERNEL) MODE
Example using
Leon3 Sparc Processor
OpenSource VHDL implementation
Adam Kostrzewa, Kraków 4-5.06.2018
Payload
• change the status of the PSR [Prosessor State Register]
• and switch to the hypervisor mode
Trigger
• selected ASM command available in the user mode
• with the selected operands
• e.g., add OP CODE which results in 878787
HW/SW co-design (trigger in SW, payload in HW)
Trojan Design
Adam Kostrzewa, Kraków 4-5.06.2018
Trojan Payload Code (CPU Backdoor, PWNing2017)
access to the processor state register
ALU addition
conditional execution let’s check the key
switching to supervisor mode
Example using
Leon3 Sparc Processor
Adam Kostrzewa, Kraków 4-5.06.2018
Do I need a foundry to test HW trojans?
Example based on QEMU implementaton of the SPARC architecture
(compatble with VHDL from Gaisler)
●
QEMU emulator version 2.12.50 (v2.12.0-rc3-71-g6af2692e86-dirty)
●
buildroot-2018.02.1 for cross compilaton
●
and kernel 4.11.12 #1 Wed May 2 10:20:04 CEST 2018 sparc GNU/Linux
●
Implementation details and sources
https://adamkostrzewa.github.io
Adam Kostrzewa, Kraków 4-5.06.2018
qemu/target/sparc/translate.c
translation of rdpsr
exception if user mode
QEMU
asm
translaton
for
SPARC
Adam Kostrzewa, Kraków 4-5.06.2018
Trojan Payload
in SDIV
(signed diiide)
qemu/target/sparc/helper.c
trigger division
with operands
1024 and 64
Adam Kostrzewa, Kraków 4-5.06.2018
Liie Demo
Talk‘s Outline
➔
Motiaton
➔
Work principles and objecties of a HW trojan
➔
CPU Example (+ Demo of an exemplary atack)
➔
Where and when can a hardware trojan be introduced?
➔
Defense methods and their costs
➔
Summary
Adam Kostrzewa, Kraków 4-5.06.2018
Trojan Implementaton can be done:
 by adding a new functonality, usually in HDL language
(as in the CPU example),
 using a methodology similar to sofware projects.
Relatively cheap – designer is working on a high abstraction level
Difficult to hide – most of developers are included in Phase 1
Obfuscation – code semantically correct but difficult to understand
Easier in big projects with backwards compatibility, e.g. x86
architecture
Phase 1: Logic Design
Adam Kostrzewa, Kraków 4-5.06.2018
Synthesis process (~ code compilaton)
 trojans added as modifcaton of electric circuits
 many hours of work, e.g., usually layouts are heavily optmized
 ~ analogy of “in-compilatonn or post-compilaton modifcaton of code
Easier to hide – less developers than in Phase1
More expensive – requires qualified and experienced personnel
„White-box cryptography“ - produce complicated layouts to hide
malicious circuits or components
Phase 2: Layout (Synthesis)
Source:
wikipedia commons
Adam Kostrzewa, Kraków 4-5.06.2018
Modify masks to add or change behavior of components
 new sets of masks,
 at the far-end of the design process.
Very hard to detect – modifications on very low abstraction level
Very expensive – highly skilled personnel, expensive tools and know-
how, preferably also market position
Each phase is realized by a different entity within a company
or even by different sub-contractors in case of OEMs!
Phase 3: Mask Design
Source:
wikipedia commons
Talk‘s Outline
➔
Motiaton
➔
Work principles and objecties of a HW trojan
➔
CPU Example (+ Demo of an exemplary atack)
➔
Where and when can a hardware trojan be introduced?
➔
Defense methods and their costs
➔
Summary
Adam Kostrzewa, Kraków 4-5.06.2018
The process is difcult and expensive!
Based on the „golden chip“ principle - comparison vs. correct chip
Open the case and use the optcal reverse-engineering:
 typically plastc package (epoxy), smart-card package etc.
Several methods to achieve this goal:
 mechanical grinding easy and cheap

a single scratch can destroy the chip
 chemical acid to dissolve the case

requires resources (personnel, laboratory equipment)
Post-Manufacturing Trojan Detecton
Source:
wikipedia commons
Adam Kostrzewa, Kraków 4-5.06.2018
Size of the chip is a barrier
For amateurs chips from 70s, 80s
early 90s
Highly optmized
 Due to technical & economic reasons
Works in parallel, legacy functons (x86)
Make photos of each layer, e.g. with a scanning electron microscope
Compare them to the layout to detect metal or polysilicon wires
Reading Chip
Z80 processor
Source:
wikipedia commons
Adam Kostrzewa, Kraków 4-5.06.2018
Pros:
 very high reliability of detecton
 if you haie a golden chip
Cons:
 expensive
 tme consuming
 destroys chip under analysis
applicable only to small number of chips ….
 is it enough?
Comparison Against Golden-Chip
Adam Kostrzewa, Kraków 4-5.06.2018
Example Inierter
In Out
Vcc
Vss
Vcc
Vss
IN OUT
Vcc
Vss
IN OUT
Where is the trojan?
a) b)
Optical inspection is not enough!
Vcc
Vss
In Out
In Out
1
0 1
0
Vcc
Vss
In Out
In Out
1
0 1
1
p-dopant
n-dopant
based on [Paar, 2017]
poly
Metal-1
contact
Trojan!
Adam Kostrzewa, Kraków 4-5.06.2018
Can be used to limit the number of cipher combinatons!
Especially important in telecommunicaton, e.g. IEEE 802.11
Example: AES, based on [Paar, 2017]
Dopant-Trojans
AES
010101001010…….000000
crypto key
known bits fixed by trojan
010….001010…….000000
only 32 random bits,
testing them will take several
seconds
random register
counter register
Source:
wikipedia commons
Adam Kostrzewa, Kraków 4-5.06.2018
Requires modifcaton of the dopant mask
Pros:
●
no additonal transistors or wires
●
optcal inspecton is not enough!
●
may be also included in the „golden chip“!
Cons:
●
limits certain functionalities, „damaged chip parts“
●
functional testing will find error right away!
●
necessary anti-test functions for known test inputs!
Dopant-Trojans (Phase 4 - Wafer)
Source:
wikipedia commons
Adam Kostrzewa, Kraków 4-5.06.2018
Once implemented it is hard to change or modify a HW component
Thus, electronic circuits require extensive testng during the design phase
Selected errors could be used as atack vectors, e.g.:
 certain bugs lef on purpose / it’s not a feature, it’s a bug
 interestng in this context Intel Bugs: Meltdown and Spectre
Convenient excuse for the manufacturer
Otherwise high costs and severe consequences!
Error or Trojan? Or both?
Talk‘s Outline
➔
Motiaton
➔
Work principles and objecties of a HW trojan
➔
CPU Example (+ Demo of an exemplary atack)
➔
Where and when can a hardware trojan be introduced?
➔
Defense methods and their costs
➔
Summary
Adam Kostrzewa, Kraków 4-5.06.2018
Who should fear HW trojans?
Everyone
Why?
Very difficult to detect
Leverage all software security mechanisms
What to do?
Build skilled force in HW domain (personnel and tools)
Evaluate HW products, will make attacker’s life more difficult
Summary
Adam Kostrzewa, Kraków 4-5.06.2018
My blog with sources and materials
htps://adamkostrzewa.github.io/
and my twiter for people interested in
hardware hacking
htps://twiter.com/systemWbudowany
Tank you for your atenton!
Questons?
Q&A
Equipment Basic Advanced
Microscope
Simple
New from 300 euro
Used from 50 euro
Stereo
New: about 1500 Euro
Used: from 250 Euro
Tools Mechanical tools
About 20 euros
Microscope camera
New: about 350 Euro
Used: from 150 Euro
Ultrasonic cleaner New 50 euro
Used from 20 euro
Solvents and glassware New: about 20 Euro
Source “Uncaging Microchips Techniques for Chip Preparation” Peter Laackmann
Marcus Janke, CCC2014
Adam Kostrzewa, Kraków 4-5.06.2018
Phases of Chip Design
Phase 1
Logical Design
Hardware Description
Language, HDL
VHDL, Verilog,
systemVerilog
Phase 2
Layout
Phase 3
Mask
Design
Phase 4
Wafer Production
Synthesis of HDL
into the electronic
circuits
Creation of
matrices for serial
productions
Chemical
process, doping
image sources
wikipedia commons
Based on [Laackmann, Janke:2015]
Adam Kostrzewa, Kraków 4-5.06.2018
Where the Processor’s State is Stored?
impl
31:28
ver
27:24
ic
c
23:20
reserved
19:14
EC
1
3
EF
1
2
PIL
11:
8
S
7
PS
6
ET
5
CWP
4:
0
hardwired bits to identify an
implementation or class of implementations
of the architecture
version
(implementation-dependent)
Integer Condition Codes
Reserved bits
Enable Cooprocessor
Enable Floating-Point Unit
Processor State before an exception
Supervisor Bit
if 1 kernel mode
If 0 user mode
Processor Interrupts Level
Current Window Pointer
Enable Traps

Más contenido relacionado

La actualidad más candente

Azure Api Management 俺的マニュアル 2020年3月版
Azure Api Management 俺的マニュアル 2020年3月版Azure Api Management 俺的マニュアル 2020年3月版
Azure Api Management 俺的マニュアル 2020年3月版貴志 上坂
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeVLSI SYSTEM Design
 
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話Nobuhiro Fujita
 
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...VLSI SYSTEM Design
 
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉Mori Ken
 
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみよう
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみようPythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみよう
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみようShinya Takamaeda-Y
 
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale Japan株式会社
 
Elasticsearchの機械学習機能を使ってみた
Elasticsearchの機械学習機能を使ってみたElasticsearchの機械学習機能を使ってみた
Elasticsearchの機械学習機能を使ってみたYuichiArisaka
 
ポアソン画像合成
ポアソン画像合成ポアソン画像合成
ポアソン画像合成Arumaziro
 
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策MITSUNARI Shigeo
 
NW遅延環境(Paas)でのPostgreSQLの利用について
NW遅延環境(Paas)でのPostgreSQLの利用についてNW遅延環境(Paas)でのPostgreSQLの利用について
NW遅延環境(Paas)でのPostgreSQLの利用についてkawarasho
 
Supervised Machine Learning of Elastic Stack
Supervised Machine Learning of Elastic StackSupervised Machine Learning of Elastic Stack
Supervised Machine Learning of Elastic StackHiroshi Yoshioka
 
Rails上でのpub/sub イベントハンドラの扱い
Rails上でのpub/sub イベントハンドラの扱いRails上でのpub/sub イベントハンドラの扱い
Rails上でのpub/sub イベントハンドラの扱いota42y
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosOpenCredo
 
文献紹介:EfficientDet: Scalable and Efficient Object Detection
文献紹介:EfficientDet: Scalable and Efficient Object Detection文献紹介:EfficientDet: Scalable and Efficient Object Detection
文献紹介:EfficientDet: Scalable and Efficient Object DetectionToru Tamaki
 
Spring Cloud Gateway on Kubernetes
Spring Cloud Gateway on KubernetesSpring Cloud Gateway on Kubernetes
Spring Cloud Gateway on KubernetesTakeshi Ogawa
 
第二回CTF勉強会資料
第二回CTF勉強会資料第二回CTF勉強会資料
第二回CTF勉強会資料Asuka Nakajima
 
犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号akakou
 
CUDA 6の話@関西GPGPU勉強会#5
CUDA 6の話@関西GPGPU勉強会#5CUDA 6の話@関西GPGPU勉強会#5
CUDA 6の話@関西GPGPU勉強会#5Yosuke Onoue
 

La actualidad más candente (20)

Azure Api Management 俺的マニュアル 2020年3月版
Azure Api Management 俺的マニュアル 2020年3月版Azure Api Management 俺的マニュアル 2020年3月版
Azure Api Management 俺的マニュアル 2020年3月版
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold time
 
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話コンテナ基盤であるLXC/LXDを 本番環境で運用する話
コンテナ基盤であるLXC/LXDを 本番環境で運用する話
 
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
Define Width and Height of Core and Die (http://www.vlsisystemdesign.com/PD-F...
 
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉
02 第3.1節-第3.5節 ROS2の基本機能(1/2) ROS2勉強合宿 @別府温泉
 
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみよう
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみようPythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみよう
Pythonによる高位設計フレームワークPyCoRAMでFPGAシステムを開発してみよう
 
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
Rescale ScaleX講習会 ~AWSクラウド環境におけるHPC利用
 
Elasticsearchの機械学習機能を使ってみた
Elasticsearchの機械学習機能を使ってみたElasticsearchの機械学習機能を使ってみた
Elasticsearchの機械学習機能を使ってみた
 
ポアソン画像合成
ポアソン画像合成ポアソン画像合成
ポアソン画像合成
 
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策
MS Officeファイル暗号化のマスター鍵を利用したバックドアとその対策
 
NW遅延環境(Paas)でのPostgreSQLの利用について
NW遅延環境(Paas)でのPostgreSQLの利用についてNW遅延環境(Paas)でのPostgreSQLの利用について
NW遅延環境(Paas)でのPostgreSQLの利用について
 
Supervised Machine Learning of Elastic Stack
Supervised Machine Learning of Elastic StackSupervised Machine Learning of Elastic Stack
Supervised Machine Learning of Elastic Stack
 
STA vs DTA.pptx
STA vs DTA.pptxSTA vs DTA.pptx
STA vs DTA.pptx
 
Rails上でのpub/sub イベントハンドラの扱い
Rails上でのpub/sub イベントハンドラの扱いRails上でのpub/sub イベントハンドラの扱い
Rails上でのpub/sub イベントハンドラの扱い
 
muCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David BorsosmuCon 2016: Authentication in Microservice Systems By David Borsos
muCon 2016: Authentication in Microservice Systems By David Borsos
 
文献紹介:EfficientDet: Scalable and Efficient Object Detection
文献紹介:EfficientDet: Scalable and Efficient Object Detection文献紹介:EfficientDet: Scalable and Efficient Object Detection
文献紹介:EfficientDet: Scalable and Efficient Object Detection
 
Spring Cloud Gateway on Kubernetes
Spring Cloud Gateway on KubernetesSpring Cloud Gateway on Kubernetes
Spring Cloud Gateway on Kubernetes
 
第二回CTF勉強会資料
第二回CTF勉強会資料第二回CTF勉強会資料
第二回CTF勉強会資料
 
犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号
 
CUDA 6の話@関西GPGPU勉強会#5
CUDA 6の話@関西GPGPU勉強会#5CUDA 6の話@関西GPGPU勉強会#5
CUDA 6の話@関西GPGPU勉強会#5
 

Similar a CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)

Securing IoT Applications
Securing IoT Applications Securing IoT Applications
Securing IoT Applications WSO2
 
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...mjos
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of ThingsPaul Fremantle
 
Automated prevention of ransomware with machine learning and gpos
Automated prevention of ransomware with machine learning and gposAutomated prevention of ransomware with machine learning and gpos
Automated prevention of ransomware with machine learning and gposPriyanka Aash
 
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOsSPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOsRod Soto
 
Who Is This Guy?
Who Is This Guy?Who Is This Guy?
Who Is This Guy?Chili.CHIPS
 
Introduction to architecture exploration
Introduction to architecture explorationIntroduction to architecture exploration
Introduction to architecture explorationDeepak Shankar
 
Michael_Kogan_portfolio
Michael_Kogan_portfolioMichael_Kogan_portfolio
Michael_Kogan_portfolioMichael Kogan
 
Michael_Kogan_portfolio
Michael_Kogan_portfolioMichael_Kogan_portfolio
Michael_Kogan_portfolioMichael Kogan
 
Performance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based MicroprocessorsPerformance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based MicroprocessorsHannes Tschofenig
 
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayC:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayArik Weinstein
 
The Role of Standards in IoT Security
The Role of Standards in IoT SecurityThe Role of Standards in IoT Security
The Role of Standards in IoT SecurityHannes Tschofenig
 
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationWebinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationDeepak Shankar
 
System On Chip (SOC)
System On Chip (SOC)System On Chip (SOC)
System On Chip (SOC)Shivam Gupta
 
IPv6 Security Talk mit Joe Klein
IPv6 Security Talk mit Joe KleinIPv6 Security Talk mit Joe Klein
IPv6 Security Talk mit Joe KleinDigicomp Academy AG
 
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Boris Adryan
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017Jian-Hong Pan
 

Similar a CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa) (20)

Research Paper
Research PaperResearch Paper
Research Paper
 
Securing IoT Applications
Securing IoT Applications Securing IoT Applications
Securing IoT Applications
 
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...
Simple AEAD Hardware Interface SAEHI in a SoC: Implementing an On-Chip Keyak/...
 
Securing the Internet of Things
Securing the Internet of ThingsSecuring the Internet of Things
Securing the Internet of Things
 
Automated prevention of ransomware with machine learning and gpos
Automated prevention of ransomware with machine learning and gposAutomated prevention of ransomware with machine learning and gpos
Automated prevention of ransomware with machine learning and gpos
 
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOsSPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
SPO2-T11_Automated-Prevention-of-Ransomware-with-Machine-Learning-and-GPOs
 
Who Is This Guy?
Who Is This Guy?Who Is This Guy?
Who Is This Guy?
 
Introduction to architecture exploration
Introduction to architecture explorationIntroduction to architecture exploration
Introduction to architecture exploration
 
vlsi ajal
vlsi ajalvlsi ajal
vlsi ajal
 
Michael_Kogan_portfolio
Michael_Kogan_portfolioMichael_Kogan_portfolio
Michael_Kogan_portfolio
 
Michael_Kogan_portfolio
Michael_Kogan_portfolioMichael_Kogan_portfolio
Michael_Kogan_portfolio
 
Performance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based MicroprocessorsPerformance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based Microprocessors
 
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayC:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
 
The Role of Standards in IoT Security
The Role of Standards in IoT SecurityThe Role of Standards in IoT Security
The Role of Standards in IoT Security
 
H2020-AHTOOLS Use Case 3 Functional Design
H2020-AHTOOLS Use Case 3 Functional DesignH2020-AHTOOLS Use Case 3 Functional Design
H2020-AHTOOLS Use Case 3 Functional Design
 
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based SimulationWebinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
Webinar: Detecting Deadlocks in Electronic Systems using Time-based Simulation
 
System On Chip (SOC)
System On Chip (SOC)System On Chip (SOC)
System On Chip (SOC)
 
IPv6 Security Talk mit Joe Klein
IPv6 Security Talk mit Joe KleinIPv6 Security Talk mit Joe Klein
IPv6 Security Talk mit Joe Klein
 
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
Mehr und schneller ist nicht automatisch besser - data2day, 06.10.16
 
The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017The Considerations for Internet of Things @ 2017
The Considerations for Internet of Things @ 2017
 

Último

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Último (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

CONFidence 2018: Who and why should fear hardware trojans? (Adam Kostrzewa)

  • 1. Adam Kostrzewa Who and why should fear hardware trojans? Kraków 04.05.2018
  • 2. Adam Kostrzewa, Kraków 4-5.06.2018 The presented work disseminates the results of the author’s spare tme actiites done solely using his own, priiate resources. Therefore, the iiews and opinions expressed in this presentaton are those of the author and author only and do not necessarily refect the ofcial policy or positon of his employer. Examples of analysis performed within this artcle are only for demonstraton purposes and do not necessarily refect real-world products. Disclaimer:
  • 3. Adam Kostrzewa, Kraków 4-5.06.2018 Can we trust integrated circuits and silicon chips? Do we have a choice? Due to: • technological barriers, • and high producton costs we must count on manufacturers’ honesty and popularity. Therefore, we commonly buy/use: • high volume products from leading producers, which should enable faster detecton of potental threats, • and have legal consequences in case of threats. (possible in mainframe and telecommunicaton, difcult in embedded) Hardware Security - Motiaton
  • 4. Adam Kostrzewa, Kraków 4-5.06.2018 ● Is there a reason for concern? ● Is the equipment from a large supplier safe? ● What is the threat posed by hardware trojans? ● Is it worth getng a closer look at them? This presentaton presents introducton to the domain. Questons of this Presentaton
  • 5. Adam Kostrzewa, Kraków 4-5.06.2018 Defniton: functon of a hardware component, hidden from the user, which can add, remove or modify the functonality of a hardware component and, therefore, reduce its reliability or create a potental threat Constructed from: payload – modifcaton of a circuit trigger – signal actvatng the payload (combinatonal or sequental) What are hardware trojans? Signal S Not S Trigger Payload
  • 6. Adam Kostrzewa, Kraków 4-5.06.2018 Similarites: • malicious intenton, e.g., atacks against data confdentality, integrity and system’s availability • evasion of detecton, and seldom actvaton, Diferences: • cannot be removed post-deployment (no updates) • do not spread, must be manufactured • high producton costs (equipment and skilled labor) Do not forget about HW/SW co-design! Relaton to Sofware Trojans
  • 7. Adam Kostrzewa, Kraków 4-5.06.2018 Results gathered by author „Hardware Trojans“ in Google Scholar (May 2018) 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 0 500 1000 1500 2000 2500 3000 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 0 500 1000 1500 2000 2500 3000 Snowden Affair " Hot Topic! 500% increase
  • 8. Adam Kostrzewa, Kraków 4-5.06.2018 Payload (Physical) Trigger (Actvaton) Characteristcs of Trojans Type Size Distribution Structure functional parametric small (transistors / wires) large (gates, circuits) tight loose modify layout no changes Externally Activated Receiver Access data Internally Activated Always On Condition Based sensor (voltage, temperature, external) logic (internal state, clock/counter, Input – data, instruction, interrupt)
  • 9. Talk‘s Outline ➔ Motiaton ➔ Work principles and objecties of a HW trojan ➔ CPU Example (+ Demo of an exemplary atack) ➔ Where and when can a hardware trojan be introduced? ➔ Defense methods and their costs ➔ Summary
  • 10. Adam Kostrzewa, Kraków 4-5.06.2018 The security of an operatng system is based on the assumpton that the processor is operatng according to a strict specifcaton and a known set of predefned rules. Commonly applied: hierarchical protecton domains (protecton rings) - introduced in the 70’s for MULTICS. • at least two modes of operaton (hypervisor and user) • in hypervisor mode, kernel has access to all commands and addresses • only a subset of commands is available in user mode • transiton can happen only according to a predefned set of rules (e.g. syscalls and interrupts) Hardware Aspects of OS Security
  • 11. Adam Kostrzewa, Kraków 4-5.06.2018 Modes of Processor Work
  • 12. Adam Kostrzewa, Kraków 4-5.06.2018 Hardware Implementaton – RISC Pipeline IF ID ME EX WBIF ID MEEX IF ID EX IF ID IF WBMEEX WBME ME WBID MEEX Instruction Time (in clock cycles) Instruction +1 Instruction +2 Instruction +3 Instruction +4 IM Reg RegDM Processor Datapath ALU CC1 CC2 CC3 CC4 CC5 CC6 CC7CC6 CC8 CC9
  • 13. Adam Kostrzewa, Kraków 4-5.06.2018 Hardware Implementaton - Pipeline Decode instruction’s addressIF Is the selected address available in the processor mode? Is the selected instruction allowed in the processor mode? Decode Instruction Fetch Instruction ID EXCEPTION Memory protection violation EXCEPTION Illegal Instruction Execution ME EX Decode memory address Is the selected address available in the processor mode? Conduct Operation WB Is the selected register available in the processor mode Conduct Operation EXCEPTION Memory protection violation EXCEPTION Illegal Instruction EXCEPTION Illegal Access
  • 14. Adam Kostrzewa, Kraków 4-5.06.2018 How it is implemented? Instructions available in USER MODE Instructions available in SUPERVISOR (KERNEL) MODE Example using Leon3 Sparc Processor OpenSource VHDL implementation
  • 15. Adam Kostrzewa, Kraków 4-5.06.2018 Payload • change the status of the PSR [Prosessor State Register] • and switch to the hypervisor mode Trigger • selected ASM command available in the user mode • with the selected operands • e.g., add OP CODE which results in 878787 HW/SW co-design (trigger in SW, payload in HW) Trojan Design
  • 16. Adam Kostrzewa, Kraków 4-5.06.2018 Trojan Payload Code (CPU Backdoor, PWNing2017) access to the processor state register ALU addition conditional execution let’s check the key switching to supervisor mode Example using Leon3 Sparc Processor
  • 17. Adam Kostrzewa, Kraków 4-5.06.2018 Do I need a foundry to test HW trojans? Example based on QEMU implementaton of the SPARC architecture (compatble with VHDL from Gaisler) ● QEMU emulator version 2.12.50 (v2.12.0-rc3-71-g6af2692e86-dirty) ● buildroot-2018.02.1 for cross compilaton ● and kernel 4.11.12 #1 Wed May 2 10:20:04 CEST 2018 sparc GNU/Linux ● Implementation details and sources https://adamkostrzewa.github.io
  • 18. Adam Kostrzewa, Kraków 4-5.06.2018 qemu/target/sparc/translate.c translation of rdpsr exception if user mode QEMU asm translaton for SPARC
  • 19. Adam Kostrzewa, Kraków 4-5.06.2018 Trojan Payload in SDIV (signed diiide) qemu/target/sparc/helper.c trigger division with operands 1024 and 64
  • 20. Adam Kostrzewa, Kraków 4-5.06.2018 Liie Demo
  • 21. Talk‘s Outline ➔ Motiaton ➔ Work principles and objecties of a HW trojan ➔ CPU Example (+ Demo of an exemplary atack) ➔ Where and when can a hardware trojan be introduced? ➔ Defense methods and their costs ➔ Summary
  • 22. Adam Kostrzewa, Kraków 4-5.06.2018 Trojan Implementaton can be done:  by adding a new functonality, usually in HDL language (as in the CPU example),  using a methodology similar to sofware projects. Relatively cheap – designer is working on a high abstraction level Difficult to hide – most of developers are included in Phase 1 Obfuscation – code semantically correct but difficult to understand Easier in big projects with backwards compatibility, e.g. x86 architecture Phase 1: Logic Design
  • 23. Adam Kostrzewa, Kraków 4-5.06.2018 Synthesis process (~ code compilaton)  trojans added as modifcaton of electric circuits  many hours of work, e.g., usually layouts are heavily optmized  ~ analogy of “in-compilatonn or post-compilaton modifcaton of code Easier to hide – less developers than in Phase1 More expensive – requires qualified and experienced personnel „White-box cryptography“ - produce complicated layouts to hide malicious circuits or components Phase 2: Layout (Synthesis) Source: wikipedia commons
  • 24. Adam Kostrzewa, Kraków 4-5.06.2018 Modify masks to add or change behavior of components  new sets of masks,  at the far-end of the design process. Very hard to detect – modifications on very low abstraction level Very expensive – highly skilled personnel, expensive tools and know- how, preferably also market position Each phase is realized by a different entity within a company or even by different sub-contractors in case of OEMs! Phase 3: Mask Design Source: wikipedia commons
  • 25. Talk‘s Outline ➔ Motiaton ➔ Work principles and objecties of a HW trojan ➔ CPU Example (+ Demo of an exemplary atack) ➔ Where and when can a hardware trojan be introduced? ➔ Defense methods and their costs ➔ Summary
  • 26. Adam Kostrzewa, Kraków 4-5.06.2018 The process is difcult and expensive! Based on the „golden chip“ principle - comparison vs. correct chip Open the case and use the optcal reverse-engineering:  typically plastc package (epoxy), smart-card package etc. Several methods to achieve this goal:  mechanical grinding easy and cheap  a single scratch can destroy the chip  chemical acid to dissolve the case  requires resources (personnel, laboratory equipment) Post-Manufacturing Trojan Detecton Source: wikipedia commons
  • 27. Adam Kostrzewa, Kraków 4-5.06.2018 Size of the chip is a barrier For amateurs chips from 70s, 80s early 90s Highly optmized  Due to technical & economic reasons Works in parallel, legacy functons (x86) Make photos of each layer, e.g. with a scanning electron microscope Compare them to the layout to detect metal or polysilicon wires Reading Chip Z80 processor Source: wikipedia commons
  • 28. Adam Kostrzewa, Kraków 4-5.06.2018 Pros:  very high reliability of detecton  if you haie a golden chip Cons:  expensive  tme consuming  destroys chip under analysis applicable only to small number of chips ….  is it enough? Comparison Against Golden-Chip
  • 29. Adam Kostrzewa, Kraków 4-5.06.2018 Example Inierter In Out Vcc Vss Vcc Vss IN OUT Vcc Vss IN OUT Where is the trojan? a) b) Optical inspection is not enough! Vcc Vss In Out In Out 1 0 1 0 Vcc Vss In Out In Out 1 0 1 1 p-dopant n-dopant based on [Paar, 2017] poly Metal-1 contact Trojan!
  • 30. Adam Kostrzewa, Kraków 4-5.06.2018 Can be used to limit the number of cipher combinatons! Especially important in telecommunicaton, e.g. IEEE 802.11 Example: AES, based on [Paar, 2017] Dopant-Trojans AES 010101001010…….000000 crypto key known bits fixed by trojan 010….001010…….000000 only 32 random bits, testing them will take several seconds random register counter register Source: wikipedia commons
  • 31. Adam Kostrzewa, Kraków 4-5.06.2018 Requires modifcaton of the dopant mask Pros: ● no additonal transistors or wires ● optcal inspecton is not enough! ● may be also included in the „golden chip“! Cons: ● limits certain functionalities, „damaged chip parts“ ● functional testing will find error right away! ● necessary anti-test functions for known test inputs! Dopant-Trojans (Phase 4 - Wafer) Source: wikipedia commons
  • 32. Adam Kostrzewa, Kraków 4-5.06.2018 Once implemented it is hard to change or modify a HW component Thus, electronic circuits require extensive testng during the design phase Selected errors could be used as atack vectors, e.g.:  certain bugs lef on purpose / it’s not a feature, it’s a bug  interestng in this context Intel Bugs: Meltdown and Spectre Convenient excuse for the manufacturer Otherwise high costs and severe consequences! Error or Trojan? Or both?
  • 33. Talk‘s Outline ➔ Motiaton ➔ Work principles and objecties of a HW trojan ➔ CPU Example (+ Demo of an exemplary atack) ➔ Where and when can a hardware trojan be introduced? ➔ Defense methods and their costs ➔ Summary
  • 34. Adam Kostrzewa, Kraków 4-5.06.2018 Who should fear HW trojans? Everyone Why? Very difficult to detect Leverage all software security mechanisms What to do? Build skilled force in HW domain (personnel and tools) Evaluate HW products, will make attacker’s life more difficult Summary
  • 35. Adam Kostrzewa, Kraków 4-5.06.2018 My blog with sources and materials htps://adamkostrzewa.github.io/ and my twiter for people interested in hardware hacking htps://twiter.com/systemWbudowany Tank you for your atenton! Questons?
  • 36. Q&A
  • 37. Equipment Basic Advanced Microscope Simple New from 300 euro Used from 50 euro Stereo New: about 1500 Euro Used: from 250 Euro Tools Mechanical tools About 20 euros Microscope camera New: about 350 Euro Used: from 150 Euro Ultrasonic cleaner New 50 euro Used from 20 euro Solvents and glassware New: about 20 Euro Source “Uncaging Microchips Techniques for Chip Preparation” Peter Laackmann Marcus Janke, CCC2014
  • 38.
  • 39. Adam Kostrzewa, Kraków 4-5.06.2018 Phases of Chip Design Phase 1 Logical Design Hardware Description Language, HDL VHDL, Verilog, systemVerilog Phase 2 Layout Phase 3 Mask Design Phase 4 Wafer Production Synthesis of HDL into the electronic circuits Creation of matrices for serial productions Chemical process, doping image sources wikipedia commons Based on [Laackmann, Janke:2015]
  • 40. Adam Kostrzewa, Kraków 4-5.06.2018 Where the Processor’s State is Stored? impl 31:28 ver 27:24 ic c 23:20 reserved 19:14 EC 1 3 EF 1 2 PIL 11: 8 S 7 PS 6 ET 5 CWP 4: 0 hardwired bits to identify an implementation or class of implementations of the architecture version (implementation-dependent) Integer Condition Codes Reserved bits Enable Cooprocessor Enable Floating-Point Unit Processor State before an exception Supervisor Bit if 1 kernel mode If 0 user mode Processor Interrupts Level Current Window Pointer Enable Traps