1 of 30

Matt Galvin

Elixir, Erlang - Americas�matthew.galvin@erlang-solutions.com

www.erlang-solutions.com

©2021 Erlang Solutions

Nerves

Datacenter application

2 of 30

Hacking is fun

Whether hardware, software, or both!

3 of 30

1. Hacking

Hardware hacking terms

  • SoftwareConsists of bits
  • HardwareConsists of atoms
  • FirmwareCode that is embedded in the embedded device, so basically software

4 of 30

Targets vs Attacks

Software Attack�Hardware Attack��We can flip bits in memory by running Rowhammer code on the CPU.

Hardware Attack�Hardware Target

Attack a ring oscillator by glitching supply voltage.

Hardware Attack �Software Target

Inject a voltage glitch on a CPU that influences an executing program.

Software Attack�Software Target��We can perform a buffer overflow on a network daemon.

5 of 30

Side Channel Attack�

�“It is easy for an attacker to measure the execution time, down to the resolution of a single clock cycle!” �O’Flynn, Woudenberg 14

6 of 30

Timing Attack

Code: 1337

7 of 30

Rigol

DS1054Z

8 of 30

Other side channel attacks

Power Analysis

  • Differential Power Analysis
  • Simple Power Analysis

9 of 30

You have probably heard about quantum computing and its ability to break cryptographic algorithms….��

10 of 30

In the news…

11 of 30

Spycraft

One of the images has the entire text of Hamlet encoded in it. Can you tell any difference?

  • Boady, boadycs.gitlab.io

12 of 30

‘a’ in ASCII is 97�97 in binary is 0110 0001�So, we need 3 pixels to fit a whole letter, with one extra bit.��R: 1111 1111 = 255 , G: 0000 0000 = 0, B: 0000 0000 = 0

Pixel 1 Color

Pixel 1 Color

Pixel 2 Color

Pixel 3 Color

Pixel 2 Color

Pixel 3 Color

R: 1111 1110 = 254, G: 0000 0001 = 1, B: 0000 0001 = 1

R: 1111 1110 = 254, G: 0000 0000 = 0, B: 0000 0000 = 0

R: 1111 1111 = 255, G: 0000 0000 = 0, B: 0000 0001 = 1

13 of 30

Simple Power Analysis (SPA) can break real cryptographic systems, including RSA.

O’Flynn, Woudenberg 264

14 of 30

www.erlang-solutions.com

©2021 Erlang Solutions

RSA:

m = message

c = ciphertext

mod n = modulus operation

me = c mod n

15 of 30

16 of 30

SM,S,S,S,SM,SM,S,S,S,SM

10001100010

17 of 30

18 of 30

Sound interesting?��How I got started…�and you can too

19 of 30

Learning to:�SPA attack

  • CodeArduino/Embedded C
  • MicrocontrollerATmega328
  • Shunt Resistor100 ohms

20 of 30

21 of 30

22 of 30

23 of 30

24 of 30

25 of 30

SPA Attack

26 of 30

SPA Attack

27 of 30

28 of 30

29 of 30

Opportunities

for the BEAM?

Genetic Programming

30 of 30

Learning resources