eclipsecon eu 2016 iot security in action! · iot security in action! julien vermillard, ... device...

39
IoT Security in Action! Julien Vermillard, Sierra Wireless @vrmvrm - [email protected] EclipseCON EU 2016

Upload: nguyenliem

Post on 31-Mar-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

IoT Security in Action!

Julien Vermillard, Sierra Wireless

@vrmvrm - [email protected]

EclipseCON EU 2016

Page 2: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Introduction

Page 3: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Managing connected devices

Why it is simple to exploit non-secured systems

How simple to have the minimum security

Page 4: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Network security

Page 5: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Deep dive: demo setup

IoT Device(MangOH)

Attacker

Internet Gateway(Linux PC)

Local network

Internet

Page 6: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Man-in-the-Middle?

IoT Device(MangOH)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

Page 7: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Before attack

IoT Device(RaspberryPI)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

Traffic to Internet

Page 8: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

ARP poisoning

IoT Device(MangOH)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

I’m the gateway!

Route everything to the gateway

Traffic to Internet

Page 9: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

DNS spoofing

IoT Device(MangOH)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

Fake DNS response

DNS queryiot.eclipse.org

LWM2M connection

Page 10: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

With TLS/DTLS?

IoT Device(RaspberryPI)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

Fake DNS response

DNS queryiot.eclipse.org

DTLS handshakefailure

Page 11: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Security with gateways

Sensor network(ex: Zigbee)

Gateway:collect data and push to cloud

cable, 4G, etc..

Secure transportLow or no security

public network

Page 12: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Security with gateways

public network

Sensor network(ex: Zigbee)

cable, 4G, etc..

Attack gatewayget access to all the network

Local wireless sniffing

Page 13: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

End-to-end security

public network

Low power nodes:security starts here

Sensor network(ex: Thread)

Router

cable, 4G, etc..

See only encrypted communicationNot your Achilles’ heel

Page 14: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Other benefits of IP to the edge device

Simplicity: only IP networks

Topology flexibility compared to gateway

Scaling IP routing is something well known

Page 15: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Can we trust wireless network?

Wifi password?

GPRS encryption?

3G/4G femtocell?

Zigbee?

Bluetooth?

Not talking of plain text wireless network :)

Page 16: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Example: GPRS

https://discourse.criticalengineering.org/t/howto-gsm-base-station-with-the-beaglebone-black-debian-gnu-linux-and-a-usrp/56

Page 18: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Key Management

Page 19: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Key management

You will have a fleet of device

They needs secrets (key, password, etc..)

Unique across devices

You need to be able to change those secrets

You will probably don’t trust your factory

Page 20: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Lightweight M2M Bootstrap

Flash bootstrap credentials

Page 21: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

I only have bootstrap credentials or I can’t reach final server

Lightweight M2M Bootstrap

Page 22: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Lightweight M2M Bootstrap

Give me key and my server(s)

Bootstrap Server

Page 23: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Lightweight M2M Bootstrap

New keys and server(s) URLsand ACL

Bootstrap Server

Page 24: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Lightweight M2M Bootstrap

Registration

Bootstrap Server

Registration

Home AutomationServer

Device Manag.Server

Page 25: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Secret key rotation using bootstrap?

Renew or upgrade your secret:

1 - Device authenticate with the bootstrap server2 - Bootstrap server rewrite the bootstrap secret

Next bootstrap the device use the new bootstrap secrets

Page 26: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Public Key Infrastructure?

Root CA

Intermediate CA

End entity 1 End entity 2 End entity3

Page 27: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

How to verify a certificate

Root trustIdentity to verify Intermediate

Issuer Signature

Expiration ~3 y

Public Key

Issuer Identity

Issuer Signature

Expiration ~5 y

Public Key

Issuer Identity

Root Signature

Root CA Identity

Root Public Key

Find

Verify Find

Verify

Identity

Identity

Page 28: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Enrollment with PKI

Generate

Private Public

Page 29: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Enrollment with PKI

Private Public

Certification Authority

Certificate Request

Page 30: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Enrollment with PKI

Generate

Private Public

Certification Authority

Certificate

CA Private

Sign using CA private key a X.509 certificate

Page 31: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Enrollment with PKI

Generate

Private Public

Service

CA Public

Sign using certificate for authentication

Page 32: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Still not IoT friendly

A lot of enterprise protocols:

IKE: Internet Key Exchange RFC2409

CMP: Certificate Management Protocol RFC4210

SCEP: Simple Certificate Enrollment Protocol draft-gutmann-scep-02

EST: Enrollment Over Secure Transport RFC7030

IEEE 802.1AR: Secure Device Identity 802.1AR

But still nothing ready to use for constrained networks & devices

Page 33: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Firmware download

Page 34: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Firmware download

IoT Device(RaspberryPI)

Attacker PCLinuxEttercap

Internet Gateway(Linux PC)

Local network

Internet

Send firmware with backdoor

HTTP GET

Page 35: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

CMS (Cryptograpic Message Syntax)

See RFC5652 (replaces PKCS #7)

Used to digitally sign, digest, authenticate, or encrypt arbitrary message content.

Supported by OpenSSL (CLI: openssl cms)

Page 36: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Secure boot

Hardware (ROM) enforces booting only correctly signed code

Often based on ECDSA signature

Hardware based ⇒ no algorithm agility

Page 37: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Open-source solutions are there

Eclipse IoT:

Leshan, Wakaama, TinyDTLS, Scandium, Paho,

Mosquitto, Hono

OpenSSL, Mbed TLS

CFSSL

GnuPG

U-Boot

Page 39: EclipseCON EU 2016 IoT Security in Action! · IoT Security in Action! Julien Vermillard, ... Device authenticate with the bootstrap server 2 - Bootstrap server rewrite the ... Leshan,

Credits

Tom Medley - The Noun ProjectGuilhem - The Noun ProjectGiuditta Valentina Gentile - The Noun ProjectSergey Krivoy - The Noun ProjectJon Anderson - The Noun ProjectRyan Beck - The Noun ProjectEdward Boatman - The Noun Project