Top Banner
Building a different sort of WebRTC app Tim Panton - Protocol Droid - westhawk Ltd @steely_glint
27

Kranky geek15 - securing IoT with webrtc

Jan 28, 2018

Download

Internet

Tim Panton
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Kranky geek15 - securing IoT with webrtc

Building a different sort of

WebRTC appTim Panton - Protocol Droid - westhawk Ltd

@steely_glint

Page 2: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 3: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 4: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 5: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 6: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 7: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Page 8: Kranky geek15 - securing IoT with webrtc

Security isn’t what it was.

Page 9: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Ideal Internet of everything

Protocol would beStandardized

Secure

Widely deployed

Peer-to-Peer (NAT traversal)

Realtime

Strong on Identity management

Mobile capable (and smaller)

User-centric

Page 10: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

RTCweb Protocol is

Standardized

Secure

Widely deployed

Peer-to-Peer (NAT traversal)

Realtime

Strong on Identity management

Mobile capable (and smaller) ?

User-centric

Page 11: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

What we will build today

Realtime

Authenticated

P2P communication

Between a small device

and a webRTC browser

- using the DataChannel but no passwords.

Page 12: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Components we need

WebRTC (datachannel) app in my smartphone

WebRTC (datachannel) embedded in a device

WebRTC service for rendevous

Some sort of pairing

Page 13: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Components we will use

Chrome on android (well Mac - for easy AV)

Lightweight stack on device

Simple websockets message hub

(https://github.com/steely-glint/fingersmith)

QRcode pairing

Page 14: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Duckling protocol

Described by Ross Anderson in

1990s

Device trusts first thing it sees

We flip this and the device shows

QRcode

Smartphone then calls this address

First to connect claims ownership

https://www.flickr.com/photos/bunnygoth/14021732859/

Page 15: Kranky geek15 - securing IoT with webrtc

Demo of QR using yoPet.us

Page 16: Kranky geek15 - securing IoT with webrtc

Code walk through of

Fingersmith

Page 17: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Which address token?

WebRTC has no built in identity so …

Random key

Generated server side (like XMPP anon)

Generated client side and asserted to service

(As in Respoke, Twillio etc)

Exchanged over QR code at ‘hatching’

Stored locally and reused for ‘life’

Page 18: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

But wait…Full disclosure:

this is such a good idea I filed a patent on it

Whats this fingerprint thing ?

Hash of the x509 cert used in DTLS exchange

Can we use that as an address ?

Yes - it means the duckling can tell that it is mommy calling

and ignore all other distractions.

More on this at IIT RTC conference in October…

Page 19: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Javascript walkthrough

Dummy offer to find it at start-up

Phono.sdp.js parse SDP to extract fingerprint

(open source - thanks tropo)

Ipseorama to set up DataChannel

via Fingersmith

generateCertificate + IndexDB to make firefox use

stable identity

Page 20: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Device Code options

Javascript

Use google’s webrtc wrapped in node

C/C++

Use Janus codebase etc….

Java

DIY

Page 21: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Yep, you guessed it,

I took the Java way.

STUN/TURN/ICE

Ice4j - Jitsi

DTLS

BouncyCastle - Tropo (now Cisco)

SCTP/DCEP

in progress….

Page 22: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Demo on Beaglebone

Think of it as an American Pi :-)

Typical of future devices

Small footprint

Low power

Linux

ARM (see Intel Edison)

Page 23: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

What, that’s not small enough

Arm 9

300Mhz

64 Mb

Linux

Page 24: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Lego EV3

Lego EV3

Arm 9

300Mhz

64 Mb

Linux

LeJos Java ;-)

Page 25: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

Demo

Page 26: Kranky geek15 - securing IoT with webrtc

@steely_glint - Westhawk Ltd

By using webRTC

data channel we haveStandardized

Secure

Widely deployed

Peer-to-Peer (NAT traversal)

Realtime

Strong on Identity management

Mobile capable (and smaller)

User-centric

Page 27: Kranky geek15 - securing IoT with webrtc

tldr;

WebRTC isn’t just for video calls - it

can solve Internet of Everything

problems too.Tim Panton - Protocol Droid - Westhawk Ltd

@steely_glint