OUR ROAD TO IOT: SECURE DEVICE GRID 5 October 2015 Kresten Krab - - PowerPoint PPT Presentation

our road to iot secure device grid
SMART_READER_LITE
LIVE PREVIEW

OUR ROAD TO IOT: SECURE DEVICE GRID 5 October 2015 Kresten Krab - - PowerPoint PPT Presentation

OUR ROAD TO IOT: SECURE DEVICE GRID 5 October 2015 Kresten Krab Thorup @drkrab Introduction IoT and SSL/TLS landscape Secure Device Grid design Lessons Learned ABOUT THE SPEAKER Kresten Krab Thorup, Ph.D. Trifork CTO - since 1999


slide-1
SLIDE 1

5 October 2015

OUR ROAD TO IOT:
 SECURE DEVICE GRID

Kresten Krab Thorup @drkrab

slide-2
SLIDE 2

Introduction IoT and SSL/TLS landscape Secure Device Grid design Lessons Learned

slide-3
SLIDE 3

ABOUT THE SPEAKER

Kresten Krab Thorup, Ph.D. Trifork CTO - since 1999 JAOO, QCon, YOW!, GOTO Conferences Language Hacker

slide-4
SLIDE 4

HOW TO REMOTE CONTROL YOUR IOT DEVICES?

slide-5
SLIDE 5

IOT REMOTE CONTROL

ACCESS Device/Mobile behind NAT SECURITY Secure Traffic (Secrecy, Integrity) Authentication Privacy

slide-6
SLIDE 6

DESIGN #1

GATEWAY MOBILE DEVICE

TRUSTED?

MAN IN THE MIDDLE

FIREWALL FIREWALL

slide-7
SLIDE 7

DESIGN #2

GATEWAY MOBILE DEVICE

END-TO-END TRUST

FIREWALL FIREWALL

slide-8
SLIDE 8

DESIGN #2

GATEWAY MOBILE DEVICE

PAIRING


KEY EXCHANGE PIN

slide-9
SLIDE 9

DESIGN #2

GATEWAY MOBILE DEVICE Secure Authenticated Private

slide-10
SLIDE 10

HOW TO SECURE THIS?

slide-11
SLIDE 11

PUBLIC KEY CRYPTOGRAPHY

SecretKey PublicKey

Alice Bob

I’m Home! SecretKey PublicKey

slide-12
SLIDE 12

ENCRYPTION

Alice Bob

ciphertext

encode(“I’m Home!”, PublicKey) decode(ciphertext, SecretKey)

Only Bob can decode it

Eve

slide-13
SLIDE 13

SIGNING

Alice Bob

signed

sign(“I’m Home!”, SecretKey) verify(signed, PublicKey)

Only Alice could have created the signed message

Eve

slide-14
SLIDE 14

TRUST

Alice Bob Eve Carl

PublicKey PublicKey sign(PublicKey, 
 SecretKey) sign(PublicKey, 
 SecretKey)

slide-15
SLIDE 15

SSL/TLS

slide-16
SLIDE 16

SSL/TLS

Standardized approach to Public Key Crypto Public Key Infrastructure (CA’s) Standard Protocols 15+ years of history

slide-17
SLIDE 17

SSL/TLS

iOS Android Windows OpenSSL ARM Broadcom WinCE GATEWAY

slide-18
SLIDE 18

Many platforms ⇒ weakest link defines level PROBLEMS Implementation errors / limitations Protocol errors Configuration/use errors

SSL/TLS WOES

slide-19
SLIDE 19

NATIVE STACK LIMITATIONS

Client certificate capability Validate/control connection status? Who are you connected to? Support proper (modern) ciphers

slide-20
SLIDE 20

WELL KNOWN SSL/TLS BUGS

FREAK - downgrade to ‘export grade’ crypto POODLE - downgrade makes keys guessable HeartBleed (OpenSSL)- expose contents of server memory Logjam - Exploits standard config (DH) params Many individual implementation bugs

slide-21
SLIDE 21
slide-22
SLIDE 22

TLS VULNERABILITIES

slide-23
SLIDE 23

SSL VULNERABILITIES

slide-24
SLIDE 24

LESSON #1 IMPLEMENT UPGRADE OF SOFTWARE IN THE FIELD

slide-25
SLIDE 25

LESSON #2 OPENSSL IS A ATTACK TARGET
 BECAUSE IT IS POPULAR

(Just like Windows)

slide-26
SLIDE 26

COMPLEXITY

slide-27
SLIDE 27

TLS COMPLEXITY

Creeps in as standards develop 15+ years backwards compatible ASN.1, X509 Certificates, Revocations, … Protocol negotiation (and renegotiations) Diversity of features available on platforms Diversity of configurations

slide-28
SLIDE 28

DIVERSITY

iOS Android Windows OpenSSL ARM Broadcom WinCE

slide-29
SLIDE 29

OUR TLS SOLUTION

OpenSSL OpenSSL OpenSSL OpenSSL OpenSSL OpenSSL OpenSSL

ONE CONFIGURATION: TLS 1.2 ECC BrainPool P384 One cipher ECDH_ECDSA_AES

slide-30
SLIDE 30

LESSON #3 ANY SSL/TLS IMPLEMENTATION
 IS LARGE AND COMPLEX

(ARM JUST OPEN SOURCED 
 A NEW STACK ‘mbed TLS’)

slide-31
SLIDE 31

A NEW START:

GOING SMALL

slide-32
SLIDE 32

A NEW START: NACL (CURVE 25519)

Crypto library from Daniel Bernstein (of qmail fame) Used in ZeroMQ, Tor, SSH, HomeKit, AirPlay, Chrome/QUIC, countless open source tools. 
 “An attacker who spends a billion dollars on special- purpose chips to attack Curve25519, using the best attacks available today, has about 1 chance in 1027 of breaking Curve25519 after a year of computation.”

slide-33
SLIDE 33
slide-34
SLIDE 34

NACL: CRYPTO SIMPLIFIED

One way to do things ECC crypto (Curve25519) Stream cipher (Salsa20) SHA25 CurveCP: Control Protocol (like SSL/TLS)

slide-35
SLIDE 35

NACL: CRYPTO SIMPLIFIED

Multiple implementations NaCl, the original (compiles to ~30k ARM code) libsodium (with fast ASM for popular platforms) TweetNacl, compiles to 10k ARM code Java, .NET, JavaScript, … you name it.

slide-36
SLIDE 36

NACL: WHAT’S NOT THERE?

Key Management Certificate Chains / X509 / ASN.1 Protocol negotiation, downgrade, … Many ciphers, hashes, … RANDOM SOURCE

slide-37
SLIDE 37

LESSON #4 WHEN YOU CONTROL BOTH ENDS, CONSIDER SIMPLIFYING

slide-38
SLIDE 38

RANDOM

slide-39
SLIDE 39
slide-40
SLIDE 40
slide-41
SLIDE 41

LESSON #5 RANDOMNESS IS HARD IN
 EMBEDDED DEVICES

slide-42
SLIDE 42

RANDOM IS HARD

Initialize when product is ‘installed’ at factory product’s public key entropy data file Recent JEEP hack was lack of entropy Android also had a serious random bug in 2013

slide-43
SLIDE 43

PRIVACY

slide-44
SLIDE 44

PRIVACY

GATEWAY MOBILE DEVICE

slide-45
SLIDE 45

NEED-TO-KNOW

Gateway/router has no knowledge of peer identity — It only knows that they trust each other A break-in of cloud infrastructure does not compromise peers Individual peers being compromised will not compromise other peers.

slide-46
SLIDE 46

LESSON #6 SAVE ONLY WHAT’S NECESSARY

(PRIVACY BY DESIGN)

slide-47
SLIDE 47

TRUST SCHEMES?

Establish trust by means of a 3rd party SMS 3rd party SSO Certificate authority Trust direct between devices

slide-48
SLIDE 48

TRUST

Alice Bob Eve Carl

PublicKey PublicKey sign(PublicKey, 
 SecretKey) sign(PublicKey, 
 SecretKey)

Carl2

sign(PublicKey, 
 SecretKey) sign(PublicKey, 
 SecretKey)

Carl3

sign(PublicKey, 
 SecretKey) sign(PublicKey, 
 SecretKey)

slide-49
SLIDE 49

TRUST

SecretKey PublicKey

Alice Bob

SecretKey PublicKey OTP OTP

slide-50
SLIDE 50

LESSON #7 AVOID CERTIFICATE AUTHORITIES
 (CA’S) WHEN POSSIBLE

slide-51
SLIDE 51

TRUST ON FIRST USE

SSH shows a fingerprint to verify on first use Our product you enter a PIN to verify the peer Henceforth, trust the holder of that key

slide-52
SLIDE 52

END-TO-END LIMITATIONS

Sometimes you want an OPEN API

  • Most web-enabled IOT devices do that

IFTTT (open programmable interation platform)

  • Holds on to all your credentials
  • Email, google, facebook, devices, …
  • Ideal targt for a hacker

Make this a special case, not the default.

slide-53
SLIDE 53

SUMMARY

slide-54
SLIDE 54

SUMMARY

SSL/TLS is more complex than you think CA’s introduce trust in 3rd parties Implement software upgrade Control both ends? Consider a simpler solution. Randomness is hard Remember (log/store) only what’s necessary

slide-55
SLIDE 55 Aarhus Copenhagen Zurich Amsterdam Berlin Budapest Buenos Aires Krakow Leeds London San Francisco Seattle Stockholm
  • ur product

securedevicegrid.com

slide-56
SLIDE 56 Aarhus Copenhagen Zurich Amsterdam Berlin Budapest Buenos Aires Krakow Leeds London San Francisco Seattle Stockholm

Kresten Krab Thorup

krab@trifork.com @drkrab