32
1 Samsung Open Source Group IoT meets Security Habib Virji [email protected] Samsung Open Source Group Samsung Research, UK LinuxCon Europe 2015 Dublin, Ireland, October 5 – 7, 2015

IoT Meets Security

Embed Size (px)

Citation preview

Page 1: IoT Meets Security

1Samsung Open Source Group

IoT meets Security

Habib [email protected]

Samsung Open Source GroupSamsung Research, UK

LinuxCon Europe 2015Dublin, Ireland, October 5 – 7, 2015

Page 2: IoT Meets Security

2Samsung Open Source Group

Agenda

Need for IoT Security

Overview of IoTivity

Device Security

– Onboarding– Provisioning – Software Resource Manager– Hardware Hardening

Connectivity

– Local– Remote

Privacy

Page 3: IoT Meets Security

3Samsung Open Source Group

Need for IoT Security

IoT device to be around 26 billion by 2020 [1] Increase in IoT device require strong security. Lots of issues still in current IoT devices:[4]

– 80% of devices had privacy issues.– 70% of devices used unencrypted network.– 90% of device collected personal information.– 70% of device along with their cloud enable

attacker to identify valid user account using account renumeration.

Need for IoT devices to have device, network and privacy concerns addressed.

Page 4: IoT Meets Security

4Samsung Open Source Group

IoTivity Overview

IoTivity is Linux Foundation project to implement the OIC standard.– OIC is an industry consortium to define a IoT (Internet of

Things) standard and certification.

– IoTivity implementation is happening in parallel.

Discovery of device is done by looking for a RESTful interface using multicast communication.

Communication is done using:– CoAP (Constrained Application Protocol) over UDP in local

scenarios.

– XMPP is used in remote scenarios. Support for multiple OSs platforms – Tizen, Android,

Linux, Arduino, etc.

Page 5: IoT Meets Security

5

OIC Server

Samsung Open Source Group

Resource Model

Discovery Control resource Observe

Status: On/Of

Dimming: 0-100

Resource Property:rt=oic.light (Type)ra=192.168.1.1/a/light (Address)obs=1 (Observable)acl=oic/sec/acl/1 (Access Control)

Resource Attributes:{ “status” : on “dimming” : 35}

Discover

Connect & ControlOIC ClientResource

Page 6: IoT Meets Security

7Samsung Open Source Group

IoTivity Security

Protection of resources. Three step in the security mechanism

– Connectivity.– Secure channel.– Privacy permission.

Device needs to be onboarded and provisioned.

Discover

Connect & ControlOIC ClientOIC Server

Resource

Access Control

Page 7: IoT Meets Security

8Samsung Open Source Group

Device Security

Page 8: IoT Meets Security

9

Use Case: Device Provisioning

LAN Network (Home)

LAN Network (Home)

Home Gateway

Smart Device

CloudCloud

IP Camera(Thin Device)

Smart Device

Page 9: IoT Meets Security

10

OWASP Device Security Risks

Physical– Poor physical security

Software– Insecure cloud interface– Insecure mobile interfaces– Insufficient security configuration– Insecure software/firmware

Page 10: IoT Meets Security

11Samsung Open Source Group

Onboarding

Establishes device ownership.– Device becomes part of the user network.– Device cannot onboard other device ownership.

It is a two step process:– Isolated secure communication between physical

device and onboarding tool (OBT).– Then it assigns ownership key and second carrier key

Onboarding relies on ownership transfer protocol. – Ownership credential (OC) establishes OBT and

device communication and authenticate each other. Ownership protocols

– Just Work– Random PIN– Asymmetric (Certificate)

Page 11: IoT Meets Security

12Samsung Open Source Group © SAMSUNG Electronics Co.

Ownership Transfer – Just Works

Onboarding Tool Enrolling DeviceOnboarding Tool

Ownership Transfer Start

GET /oic/sec/doxm?Owned=”False”

RSP [{“OxmType”: “oic.sec.doxm.jw”, “DeviceId”: “UUID”}]

Discovery

Preparing for Ownership transfer using Just Works

Set Ownership transfer Method

PUT /oic/sec/doxm [{“OxmSel”: “oic.sec.doxm.jw”}]

RSP 2.04SRM enables

TLS_ECDH_anon_WITH_AES_12SHA256 cipher suite

DTLS Connection

PUT /oic/sec/doxm [{“Owned”: “T”, “Owner”: “Admin0””}]

RSP 2.04

Ownership Transfer Stops

Page 12: IoT Meets Security

13Samsung Open Source Group © SAMSUNG Electronics Co.

Ownership Transfer – Random PIN

Onboarding Tool Enrolling DeviceOnboarding Tool

Ownership Transfer Start

GET /oic/sec/doxm?Owned=”False”

RSP [{“OxmType”: “oic.sec.doxm.rdp”, “DeviceId”: “UUID”}]

Discovery

Preparing for Ownership transfer using Random PIN

Set Ownership transfer Method

PUT /oic/sec/doxm [{“OxmSel”: “oic.sec.doxm.rdp”}]

RSP 2.04SRM enables

TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 cipher suite

DTLS Connection

PUT /oic/sec/doxm [{“Owned”: “T”, “Owner”: “Admin0””}]

RSP 2.04

Ownership Transfer Stops

Page 13: IoT Meets Security

14Samsung Open Source Group © SAMSUNG Electronics Co.

Owner transfer protocol- Asymmetric certificate

Minimum certificate size (292 bytes) and minimal parser.

Certificate generated with signed certificate and asymmetric key pair.– OBT binary app signed trusted CA to communicate with above certificate.

– Device and OBT authenticate each other using ECDSA.

– Authenticate successful then link exchange over ECDH.

Root CA

Manufacturer1 CA Manufacturer2 CA

Gateway Sub CA

Manufacturer1 Dev Sub-CA

Manufacturer1 Dev Sub-CA2

M1 Dev Cert

M1 Dev Cert

Manufacturer2 Dev Cert

Page 14: IoT Meets Security

15Samsung Open Source Group © SAMSUNG Electronics Co.

8

Onboarding Tool Enrolling DeviceOnboarding Tool

Ownership Transfer Start

GET /oic/sec/doxm?Owned=”False”

RSP [{“OxmType”: “oic.sec.doxm.mfgcert”, “DeviceId”: “UUID”}]

Discovery

Preparing for Ownership transfer using Certificate

Set Ownership transfer Method

PUT /oic/sec/doxm [{“OxmSel”: “oic.sec.doxm.mfgcert”}]

RSP 2.04SRM enables

TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8_SHA256 cipher suite

DTLS ConnectionPOST /oic/sec/doxm [{“credid”: “..”, “sub”: “..”, “credType”: “8”, “pdbdata”: “device and CA in base 64”, “pvdata”: {“x”: “x position of elliptic

curve in base 64”, “y”: “y position of elliptic curve in base 64”, “ownrs”: “” }}]

RSP 2.04

Ownership Transfer Stops

Owner transfer protocol- Asymmetric certificate

Page 15: IoT Meets Security

16Samsung Open Source Group © SAMSUNG Electronics Co.

Provisioning

Credential are transferred from OBT to device. Device needs to engage with bootstrap server to

provision– Client directed: Client update server is in need of provisioning.– Server directed: Server self checks if it is provisioned.

Proper security credential and parameters. Parameters include:

– Security credentials through credential management service.– Access control policies and ACL– Devices are self aware about security provision status.

Page 16: IoT Meets Security

17Samsung Open Source Group © SAMSUNG Electronics Co.

Provisioning

8

Onboarding Tool Enrolling DeviceOnboarding Tool

ACL Provisioning Start

GET /oic/sec/pstat

RSP [{“IsOp”: “False”, “Sm”: “0x11”}]

Status

Client Mode PUT /oic/sec/pstat [{“Om”: “0x11”}]

RSP 2.04

RSP 2.04

ACL Provisioning Stop

DTLS with Owner PSK

RSP 2.04

RSP 2.04

Page 17: IoT Meets Security

18Samsung Open Source Group © SAMSUNG Electronics Co.

Secure Resource Manager (SRM)

Management of the secure virtual resource and ACL [3].

Secure Resource Manager Layer

Resource Manager (RM)

Persistent Storage interface

Policy Engine (PE)

Connection Abstraction (CA) Layer

DTLS Module

Resource Introspection (RI) Layer

Application

Secure Virtual

ResourceDatabase

Page 18: IoT Meets Security

19Samsung Open Source Group

Hardware Hardening

Secure storage is to provided using encryption and hardware security.

Secure execution environment:

– Secure storage– Secure execution engine– Trusted I/O paths– Secure Time Source/Clock– Random number generator– Cryptographic algorithm– Hardware tampering

Page 19: IoT Meets Security

20Samsung Open Source Group

Connectivity

Page 20: IoT Meets Security

21

Use Case: Local and Remote Network Connectivity

21

Smoke & Carbon

Monoxide Detector

Smart Locks

Smart Lights

LAN Network (Home)

LAN Network (Home)

Home Gateway

Smart Device

CloudCloud

Smart Device

Page 21: IoT Meets Security

22

OWASP Network Security Risks

● Insecure network services● Lack of transport encryption● Insecure web interface● Insufficient authentication/authorization

Page 22: IoT Meets Security

23Samsung Open Source Group

Secure Connectivity

DTLS to provide packet by packet protection. OIC client and server communication should be

protected using– Eavesdropping– Message replay– Tampering

Device authentication– Client verifies server using device id– Client if it has match sends server message– Server verifies message exchange

dtls_write

dtls_handle_message

tinyDTLS

tinyDTLS IoTivity

Page 23: IoT Meets Security

24Samsung Open Source Group

Low End Device Secure Connectivity

● Low end device uses extension of DTLS handshake to establish session keys.

● Based on Diffie-Hellman key agreement.● Can be used in owner transfer protocol to

establish keys. ● Breaks down further DTLS handshake to ease

smaller packet transfer and fragmented PDU.– 6 way message protocol instead of 3 message.

tinyDTLS

Page 24: IoT Meets Security

25Samsung Open Source Group

Remote connectivity

OIC device communicate with XMPP server– Authenticates using XMPP roster credential

Device identified using JID– Server: [email protected]/oic/1.0/oic.d.light/FFFFDDDD-

YYYY-4567-JADE-123456789A123

– Client: [email protected]/oic/1.0/client/FFFFDDDD-YYYY-4567-JADE-123456789A123

Remote XMPP server and OIC server have secure connection.

Inband bytestream is used between XMPP and OIC server.

Page 25: IoT Meets Security

26Samsung Open Source Group

Privacy

Page 26: IoT Meets Security

27

Use Case: Controlling Access

Wife's Tablet

LAN Network (Home)

LAN Network (Home)

Child 2 RoomChild 1 Room

X

Page 27: IoT Meets Security

28Samsung Open Source Group

Privacy

Protects resources at the OIC server. ACL are defined via ACE (access control

entities). Every resource should have an ACE. ACE are stored either locally or remotely on

Access manager server (AMS). ACL needs to be secure stored and partitioned

between logical OIC servers. Access control levels is per group, device,

resource or properties.

Page 28: IoT Meets Security

29Samsung Open Source Group

Local Access Control

Is light open?

Request

AcceptResponse

Turn Light Off

Request

RejectResponse

acl[0]

acl[0]

Page 29: IoT Meets Security

30

Remote Access Control

Samsung Open Source Group

Is light open?

Request

AcceptResponse

Turn Light Off

Request

RejectResponse

Requestamacl[0]

amacl[0]Request

AMS1

AMS1

Response

Response

Page 30: IoT Meets Security

31Samsung Open Source Group © SAMSUNG Electronics Co.

Conclusion

IoTivity addresses majority of the OWASP issues.

OIC provides following security functionality:– Onboarding mechanism to get device securely in

user network– Policies control who can read/write on to the

device.– Secure connectivity between device.

Hardening mechanism suggested.

SRM includes security functionality.

Page 31: IoT Meets Security

32Samsung Open Source Group © SAMSUNG Electronics Co.

References

[1] http://www.gartner.com/newsroom/id/2636073

[2] https://www.owasp.org/images/8/8e/Infographic-v1.jpg

[3] https://wiki.iotivity.org/iotivity_security

[4] http://www8.hp.com/h20195/V2/GetPDF.aspx/4AA5-4759ENW.pdf