honey, i'm home!! · home automation. central control entry control smart appliances home...

53
Honey, I Honey, I Honey, I Honey, I Honey, I Honey, I Honey, I Honey, I m Home!! m Home!! m Home!! m Home!! m Home!! m Home!! m Home!! m Home!! Hacking Z Hacking Z - - Wave Home Automation Systems Wave Home Automation Systems Behrang Fouladi, SensePost UK Sahand Ghanoun

Upload: others

Post on 02-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Honey, IHoney, IHoney, IHoney, IHoney, IHoney, IHoney, IHoney, I’’’’’’’’m Home!!m Home!!m Home!!m Home!!m Home!!m Home!!m Home!!m Home!!Hacking ZHacking Z--Wave Home Automation SystemsWave Home Automation Systems

Behrang Fouladi, SensePost UKSahand Ghanoun

Page 2: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 3: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

HomeHome

AutomationAutomation

Page 4: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 5: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Central Control

EntryControl

SmartAppliances

HomeEntertainment

SystemLighting

HomeSecurity

CCTV

SensorsHVAC

Page 6: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Family Guy from Fox Broadcasting Company

Page 7: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Convenience

Accessibility

Security

Energy Management

Remote Monitoring & Control

Page 8: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 9: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Z-Wave devices to be shipped in 2013

5 million

Page 10: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

How Does It Work?How Does It Work?

Page 11: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Wireless

AES-128 WPA/WPA2

E0

Page 12: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Power Line Dual Band

Proprietary

AES-128

Page 13: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 14: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 15: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Door Lock

Door/Window Sensor

Motion Sensor

Siren

Page 16: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Exploitation FrameworkJoshua Wright. 2009.

Zigbee Wardriving KitTravis GoodSpeed. 2012.

Pen Testing Over Power LinesDave Kennedy, Rob Simon. 2011.

Page 17: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Why ZWhy Z--Wave?Wave?

Page 18: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

According to Z-Wave Alliance…

80% of US home security market is Z-Wave

2012 NAHB survey shows…

Wireless home security tops homeowners’ wishlist

Proprietary protocol

No public research so far...

Page 19: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

ZZ--WaveWave

ProtocolProtocol

Page 20: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Physical

Transport

Network

Application

Security

Error Detection & RetransmissionAcknowledgment

32-bit Home ID8-bits Node ID

Mesh NetworkTopology DiscoveryAutomatic Healing

Encryption, Anti-replay and MAC

Device specific commands & parameters 

Physical868.42 (EU) / 908.42 (US) MHz9.6/40/100 KbpsPhysical

ZZ--Wave Protocol StackWave Protocol Stack

Page 21: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

RF ConfigurationsRF Configurations

FSK Modulation

9.6/40 kbps

868.42/40 MHz (EU)

±20 KHz

Manchester/NRZ

Page 22: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Texas Instruments CC1110Texas Instruments CC1110

SubSub--1 GHz RF 1 GHz RF transcievertransciever SoCSoC

Supports ZSupports Z--Wave configurationsWave configurations

Communication via serialCommunication via serial

SmartRFSmartRF Studio ToolStudio Tool

Page 23: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 24: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 25: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 26: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

ITU-T Rec. G.9959

We identified inconsistencies with

the actual implementation!

Page 27: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

ZZ--Wave Frame FormatWave Frame Format

PHY Frame

SinglecastMAC Frame

ApplicationFrame

Page 28: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

ZZ--ForceForce

Page 29: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 30: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Packetneeded to do network discovery

Page 31: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market
Page 32: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

I Like toI Like to

Move It!!Move It!!

Page 33: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Live DemoLive Demo

Page 34: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

ZZ--WaveWave

SecuritySecurity

Page 35: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Encryption:AES-OFB

Message Freshness:64-bit Nonce

Data Authentication:AES-CBCMAC

128-bit Random Network Key: Kn

CustomKey Establishment Protocol

128-bit Cipher & MAC Keys: Derived From Kn

Page 36: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

CustomKey Establishment Protocol

Page 37: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Get ready for key establishment

Ready

Nonce request

Nonce value 

Encrypted network key – Kn

Nonce request

Nonce value 

Encrypted message (new key is set)

Encrypt & MAC by K0

Encrypt & MAC by Kn

Page 38: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Get ready for key establishment

Ready

Nonce request

Nonce value 

Encrypted network key – Kn

Nonce request

Nonce value 

Encrypted message (new key is set)

Encrypt & MAC by K0

Encrypt & MAC by Kn

Page 39: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Protocol VulnerabilitiesProtocol Vulnerabilities

Page 40: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Passive attack:Passive attack:

Intercept and decrypt the Intercept and decrypt the ““set keyset key”” messagemessage

Happens at system installation time in Happens at system installation time in ““low power transmissionlow power transmission”” modemode

Page 41: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Passive attack:Passive attack:

Intercept and decrypt the Intercept and decrypt the ““set keyset key”” messagemessage

Happens at system installation time in Happens at system installation time in ““low power transmissionlow power transmission”” modemode

Page 42: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

With With ““whomwhom”” key is being key is being 

established?established?

Page 43: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

With someone who knowsWith someone who knows……

temporary key valuetemporary key valueandand……

……key derivation functionskey derivation functions

Page 44: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

)(

)(

mKm

cKc

PasswdECBAESK

PasswdECBAESK

n

n

��

��

}0]{16[0 byteK �

Page 45: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

)||||||||

,(

),(

CLENDSTSRCSH

IVCBCMACAESMAC

PIVOFBAESC

m

c

K

K

��

��

Page 46: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Unauthorized Key Reset Unauthorized Key Reset Attack?Attack?

Page 47: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Honey,Honey,

II’’m Home!!m Home!!

Page 48: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Live DemoLive Demo

Page 49: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Image from boratmakeglorioustributeactto.com

Page 50: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Hmm... Now What?Hmm... Now What?

Page 51: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Critical vulnerability… needs an urgent fix!

Short-term fix (OTA)

Check current key state before it’s set

Actual fix (Next Gen)

Public key cryptography and authentication

Page 52: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

More technical detail in our More technical detail in our 

White PaperWhite Paper

Page 53: Honey, I'm Home!! · Home Automation. Central Control Entry Control Smart Appliances Home Entertainment System Lighting Home Security CCTV Sensors ... 80% of US home security market

Thank You!Thank You!

Behrang FouladiBehrang Fouladi

BehrangFouladi

Sahand GhanounSahand Ghanoun

Sahand__