ZIGBEE SMART HOMES A HACKERS OPEN HOUSE ZIGBEE SMART HOMES TOBIAS - - PowerPoint PPT Presentation

zigbee smart homes
SMART_READER_LITE
LIVE PREVIEW

ZIGBEE SMART HOMES A HACKERS OPEN HOUSE ZIGBEE SMART HOMES TOBIAS - - PowerPoint PPT Presentation

TOBIAS ZILLNER ZIGBEE SMART HOMES A HACKERS OPEN HOUSE ZIGBEE SMART HOMES TOBIAS ZILLNER ABOUT ME Senior IS Auditor @ Cognosec in Vienna Penetration Testing, Security Audits & Consulting IoT Security Research, Playing with


slide-1
SLIDE 1

ZIGBEE SMART HOMES

TOBIAS ZILLNER

A HACKER’S OPEN HOUSE

slide-2
SLIDE 2

2

TOBIAS ZILLNER

  • Senior IS Auditor @ Cognosec in Vienna
  • Penetration Testing, Security Audits &

Consulting

  • IoT Security Research, Playing with SDR
  • Owner of a ZigBee based home

automation system :D

ABOUT ME ZIGBEE SMART HOMES

slide-3
SLIDE 3

3

AGENDA

  • Introduction
  • ZigBee Security Measures
  • The good
  • ZigBee Application Profiles
  • The bad
  • ZigBee Implementations
  • The ugly
  • Demonstration
  • Summary

ZIGBEE SMART HOMES

slide-4
SLIDE 4

ZIGBEE SMART HOMES

WHAT IT’S ALL ABOUT

slide-5
SLIDE 5

ZIGBEE SMART HOMES

5

ZigBee

Based on IEEE 802.15.4 Low-cost Low-power Two-way Reliable Wireless

slide-6
SLIDE 6

6

ZigBee Application Domains

Remote Control Building Automation Home Automation Health Care Smart Energy Retail Services Telecom Services ZIGBEE SMART HOMES

slide-7
SLIDE 7

7

ZIGBEE SMART HOMES

http://www.zigbee.org/zigbee-in-space-xbee-rf-modules-launched-by-nasa/

slide-8
SLIDE 8

8

ZIGBEE SMART HOMES

slide-9
SLIDE 9

9

  • Trend is wireless connections
  • Samsung CEO BK Yoon - “Every Samsung

device will be part of IoT till 2019” 3

  • Over 500 smart device per household in

2022 1

1 http://www.gartner.com/newsroom/id/2839717 2 http://www.gartner.com/newsroom/id/2636073 3 http://www.heise.de/newsticker/meldung/CES-Internet-der-Dinge-komfortabel-

vernetzt-2512856.html

0.9 billion 26 billion 5,000,000,000 10,000,000,000 15,000,000,000 20,000,000,000 25,000,000,000 30,000,000,000 2009 2020

Number of IoT Devices

WHY IS IT IMPORTANT?

ZIGBEE SMART HOMES

slide-10
SLIDE 10

ZIGBEE SMART HOMES

10

https://www.praetorian.com/iotmap/

slide-11
SLIDE 11

11

ZIGBEE SMART HOMES

https://www.praetorian.com/iotmap/

slide-12
SLIDE 12

12

ZIGBEE SMART HOMES

slide-13
SLIDE 13

13

ZIGBEE SMART HOMES

slide-14
SLIDE 14

14

WHY SECURITY?

  • HOME automation has high

privacy requirements

  • Huge source of

personalized data Items of interest will be located, identified, monitored, and remotely controlled through technologies such as radio- frequency identification, sensor networks, tiny embedded servers, and energy harvesters - all connected to the next- generation internet1

  • Former CIA Director

David Petraeus"

ZIGBEE SMART HOMES

slide-15
SLIDE 15

ZIGBEE SMART HOMES

ZIGBEE SECURITY MEASURES

slide-16
SLIDE 16

16

ZIGBEE SECURITY MEASURES Security Measures

Symmetric Encryption Message Authentication Integrity Protection Replay Protection

AES-CCM* 128bit MIC 0 - 128 bit Frame Counter 4 Byte ZIGBEE SMART HOMES

slide-17
SLIDE 17

17

OFFICIAL STATEMENT

"To avoid 'bugs' that an attacker can use to his advantage, it is crucial that security be well implemented and tested. […] Security services should be implemented and tested by security experts […]." (ZigBee Alliance 2008, p. 494)

ZIGBEE SMART HOMES

slide-18
SLIDE 18

ZIGBEE SMART HOMES

18

ZIGBEE SECURITY

  • One security level per network
  • Security based on encryption keys
  • Network Key: Used for broadcast communication, Shared among

all devices

  • Link Key: Used for secure unicast communication, Shared only

between two devices

slide-19
SLIDE 19

ZIGBEE SMART HOMES

19

SECURITY ARCHITECTURE

Trust in the security is ultimately reduces to:

  • Trust in the secure initialization of keying material
  • Trust in the secure installation of keying material
  • Trust in the secure processing of keying material
  • Trust in the secure storage of keying material
slide-20
SLIDE 20

20

HOW ARE KEYS EXCHANGED?

Preinstalled ¡Devices Key ¡Transport

  • Out ¡of ¡band ¡

recommended Key ¡Establishment

  • Derived ¡from ¡other ¡keys
  • Also ¡requires ¡preinstalled ¡

keys ZIGBEE SMART HOMES

slide-21
SLIDE 21

ZIGBEE SMART HOMES

ZIGBEE APPLICATION PROFILES

slide-22
SLIDE 22

ZIGBEE SMART HOMES

22

APPLICATION PROFILES

Define communication between devices

  • Agreements for messages
  • Message formats
  • Processing actions

Enable applications to

  • Send commands
  • Request data
  • Process commands
  • Process requests

Startup Attribute Sets (SAS) provide interoperability and compatibility

slide-23
SLIDE 23

ZIGBEE SMART HOMES

23

HOME AUTOMATION PROFILE

Default Trust Center Link Key

  • 0x5A 0x69 0x67 0x42 0x65 0x65 0x41 0x6C 0x6C 0x69 0x61 0x6E 0x63

0x65 0x30 0x39

  • ZigBeeAlliance09

Use Default Link Key Join

  • 0x01(True)
  • This flag enables the use of default link key join as a fallback case

at startup time.

slide-24
SLIDE 24

ZIGBEE SMART HOMES

24

LIGHT LINK PROFILE

  • Devices in a ZLL shall use ZigBee network layer security.
  • “The ZLL security architecture is based on using a fixed secret key,

known as the ZLL key, which shall be stored in each ZLL device. All ZLL devices use the ZLL key to encrypt/decrypt the exchanged network key. “

  • “It will be distributed only to certified manufacturers and is bound

with a safekeeping contract“

slide-25
SLIDE 25

ZIGBEE SMART HOMES

25

LIGHT LINK PROFILE

slide-26
SLIDE 26

ZIGBEE SMART HOMES

26

LIGHT LINK

nwkAllFresh

  • False
  • Do not check frame counter

Trust center link key

  • 0x5a 0x69 0x67 0x42 0x65 0x65 0x41 0x6c 0x6c 0x69 0x61 0x6e 0x63

0x65 0x30 0x39

  • Default key for communicating with a trust center

Use insecure join

  • True
  • Use insecure join as a fallback option.
slide-27
SLIDE 27

ZIGBEE SMART HOMES

27

APPLICATION PROFILES SUMMARY

  • HA Profile requires support of known encryption key as

fallback

  • ZLL Profile uses “secret” key for protecting key exchanges
slide-28
SLIDE 28

ZIGBEE EXPLOITED

ZIGBEE IMPLEMENTATIONS

slide-29
SLIDE 29

ZIGBEE SMART HOMES

29

REQUEST KEY SERVICE

"The request-key service provides a secure means for a device to request the active network key, or an end-to-end application master key, from another device" (ZigBee Alliance 2008, p. 425)

slide-30
SLIDE 30

ZIGBEE SMART HOMES

30

ZBOSS

/** Remote device asked us for key. Application keys are not implemented. Send current network key. Not sure: send unsecured? What is meaning

  • f that command??

Maybe, idea is that we can accept "previous" nwk key? Or encrypt by it? */

slide-31
SLIDE 31

ZIGBEE SMART HOMES

31

ZBOSS

/* Initiate unsecured key transfer. Not sure it is right, but I really have no ideas about request meaning

  • f key for

network key. */

slide-32
SLIDE 32

32

TESTED DEVICES

  • Door Lock
  • Smart Home System
  • Lighting Solutions

ZIGBEE SMART HOMES

slide-33
SLIDE 33

33

RESULTS

ALL tested systems only use the default TC Link Key for securing the initial key exchange No link keys are used or supported

  • Complete compromise after getting network key

No ZigBee security configuration possibilities available No key rotation applied

  • Test period of 14 month

ZIGBEE SMART HOMES

slide-34
SLIDE 34

34

RESULTS

Device reset often difficult

  • Removal of key material not guaranteed
  • One device does not support reset at all

Light bulbs do not require physical interaction for pairing Workarounds like reduced transmission power are used to prevent pairing problems

  • Devices have to be in very close proximity for pairing

ZIGBEE SMART HOMES

slide-35
SLIDE 35

ZIGBEE EXPLOITED

DEMONSTRATION

slide-36
SLIDE 36

ZIGBEE EXPLOITED

SECBEE

ZigBee security testing tool Target audience

  • Security testers
  • Developers

Based on scapy-radio, µracoli and killerbee

https://github.com/Cognosec/SecBee

Raspbee USRP B210

slide-37
SLIDE 37

ZIGBEE EXPLOITED

SECBEE

Provides features for testing of security services as well as weak security configuration and implementation

Raspbee USRP B210

  • Support of encrypted

communication

  • Command injection
  • Scan for weak key transport
  • Reset to factory
  • Join to network
  • Test security services
slide-38
SLIDE 38

ZIGBEE SMART HOMES

38

Coordinator Coordinator End device End device

ACK ACK Data request DATA DATA

timeframe < 0.8ms

DIRECT INDIRECT

slide-39
SLIDE 39

ZIGBEE SMART HOMES

DEMONSTRATION

  • KEY EXTRACTION
slide-40
SLIDE 40

ZIGBEE SMART HOMES

40

NETWORK KEY SNIFFING Fallback key exchange insecure Most vendors only implement fallback solution Same security level as plaintext exchange

slide-41
SLIDE 41

ZIGBEE EXPLOITED

41

slide-42
SLIDE 42

ZIGBEE SMART HOMES

42

VENDOR RESPONSE

slide-43
SLIDE 43

ZIGBEE SMART HOMES

43

NETWORK KEY SNIFFING

So, the

  • Timeframe is limited
  • Proximity is necessary
  • Key extraction works only during pairing

… what would an attacker do?

slide-44
SLIDE 44

44

TYPICAL END-USER

slide-45
SLIDE 45

45

THE SOCIAL ENGINEERS WAY

Wait for users to re-pair the device Jam the communication

It is not only about technology :D

ZIGBEE SMART HOMES

slide-46
SLIDE 46

46

THE HACKER WAY

Sniff over the air key exchange Trigger Key Transport

ZIGBEE SMART HOMES

slide-47
SLIDE 47

ZIGBEE SMART HOMES

47

slide-48
SLIDE 48

48

ZIGBEE SMART HOMES

slide-49
SLIDE 49

ZIGBEE SMART HOMES

49

NETWORK KEY EXTRACTION

No physical access is required No knowledge of the secret key is needed Usability overrules security Fully compromised system

slide-50
SLIDE 50

ZIGBEE EXPLOITED

DEMONSTRATION

  • COMMAND INJECTION
slide-51
SLIDE 51

51

ZIGBEE EXPLOITED

slide-52
SLIDE 52

52

SUMMARY

  • Security measures provided are good
  • Requirements due to interoperability

weaken the security level drastically

  • Vendors only implement the absolute

minimum to be compliant

  • Usability overrules security

ZIGBEE SMART HOMES

slide-53
SLIDE 53

53

DEEPSEC SOUND BYTES

  • Proper implementation of security measures is crucial -

Compliance is not Security

  • Learn from history and do not rely on “Security by Obscurity”
  • There is a world beside TCP/IP

ZIGBEE SMART HOMES

slide-54
SLIDE 54

ZIGBEE EXPLOITED

54

slide-55
SLIDE 55

THANK YOU!

Contact details

Tobias Zillner, BSc MSc MSc tobias.zillner@cognosec.com +43 664 8829 8290

slide-56
SLIDE 56

TIME FOR QUESTIONS AND ANSWERS