ZIGBEE EXPLOITED the Good, the Bad and the Ugly
Total Page:16
File Type:pdf, Size:1020Kb
08 ZIGBEE EXPLOITED The good, the bad and the ugly Tobias Zillner – August 6th 2015 Cognosec © 2015 | Castellezgasse 16/2 | 1020 Vienna, Austria ZigBee Exploited Version 1.0 TABLE OF CONTENTS ABSTRACT ..................................................................................................................................................... 1 INTRODUCTION ............................................................................................................................................. 1 THE ZIGBEE STANDARD .............................................................................................................................. 1 ZIGBEE SECURITY ........................................................................................................................................ 2 Network Layer Security ................................................................................................................................ 2 Application Support Sublayer Security ......................................................................................................... 2 ZIGBEE APPLICATION PROFILES ............................................................................................................... 3 ZigBee Home Automation Public Application Profile (HAPAP) .................................................................... 3 ZigBee Light Link Profile (ZLL) ..................................................................................................................... 4 SECBEE – A NEW ZIGBEE SECURITY TESTING TOOL ............................................................................. 4 REAL WORLD ASSESSMENTS AND IDENTIFIED VULNERABILITIES ..................................................... 5 CONCLUSION ................................................................................................................................................. 5 BIBLIOGRAPHY ............................................................................................................................................. 6 Cognosec Gmbh Classification: Confidential ii ZigBee Exploited Version 1.0 which pose security risks. With the availability of ABSTRACT consumer-ready, programmable radio systems and low-cost devices with sufficient computational The Internet of Things (IoT) is an emerging power, the field of Software-defined-radio (SDR) trend. IoT involves the integration of digital is experiencing rapid growth enabling researchers and wireless technologies in physical objects to audit wireless communication beside traditional and systems, especially those historically Wifi. unconnected, which are supposed to make our everyday life easy and convenient. One of This paper highlights the main security risks in the most widespread used wireless ZigBee implementations, which devices are technologies to connect IoT devices is the affected and describes the results of a practical ZigBee standard. This emerging technology assessments of ZigBee enabled device. needs to keep pace with customer demands for cheap, long-living and available devices. One of the major challenges besides user and THE ZIGBEE STANDARD industry acceptance is security. However, ZigBee is a standard for personal-area networks security is very often sacrificed or neglected due to fear of reduced or limited usability or developed by the ZigBee Alliance (including fear of breaking backwards compatibility. companies like Samsung, Philips, Motorola, Texas Instruments and many others) with the aim This paper describes the actual applied of providing low-cost, low-power consumption, security measures in ZigBee, highlight the two-way, reliable, wireless communications included weaknesses and introduces a standard for short range applications. (ZigBee software framework that can be used to Alliance 2008, p. 29) The standard is completely automatically audit ZigBee communication open and gained ratification by the Institute of and the implementation of ZigBee security Electrical and Electronics Engineer (IEEE) in services for various vulnerabilities and exploit 2003. The protocol stack of ZigBee is based on them. IEEE 802.15.4. Advantages of choosing ZigBee are the provision of long battery lifetime, the support of a large number of nodes (up-to 65000) INTRODUCTION in a network, the easy deployment, the low costs and global usage. (Kaur & Sharma 2013)(ZigBee IoT is considered to be the next phase of the Alliance 2014) Internet revolution. Linking physical objects in the real world to the virtual world and enabling ZigBee is used for example in following areas anytime, anyplace and anything communication. (ZigBee Alliance 2014): (Santucci 2010, p. 11) Communication between devices is mainly carried out using wireless Remote Control channels, which introduces various security Input Devices issues. Some of these weaknesses are new, but most have actually been around for a long time. A Home Automation desired short time-to-market, as well as backward compatibility and future proofing considerations Building Automation lead to the persistence of known problems. The Health Care ZigBee standard is one of the dominating standards for wireless communication between Telecom Services IoT devices. Even though the ZigBee standard was created with security in mind, low per-unit- Retail Services costs and usability as well as compatibility factors lead to poor implementation of security controls, Smart Energy Cognosec Gmbh Classification: Confidential PAGE 1 OF 6 ZigBee Exploited Version 1.0 number and may be used by the NWK and APL layers of a device. A device must The ZigBee stack consists of four layers: (ZigBee acquire a network key via key-transport or Alliance 2008, p. 35) pre-installation. Physical Layer (PHY) Link key is used to secure unicast communication on Application layer. This Medium Access Control Layer (MAC) 128-bit key is shared only between two devices. Link keys are acquired either via Network Layer (NWK) key-transport, key- establishment, or pre- installation (for example, during factory Application Layer (APL) installation) and may be used only by the APS sub-layer. The IEEE 802.15.4-2003 standard is used for the two lowest layers, the physical layer (PHY) and Network Layer Security the medium access control layer (MAC). The other two layers are defined by the ZigBee The ZigBee Network Layer ensures the integrity Protocol Stack. and encryption of the transmitted frames by applying AES encryption (AES CCM mode) with a From a security perspective, the network and the key length of 128 bit, and ensures its integrity by application layer are of highest relevance and are using a cipher block chaining message therefore described in more detail in the next authentication code (CBC-MAC). (ZigBee Alliance chapter. 2008, p. 423) ZIGBEE SECURITY Application Support Sublayer Security The ZigBee standard includes complex security measures to ensure key establishment, secure If a frame originated by the APS layer needs to be networks, key transport and frame security. secured, the APS layer is responsible for the (ZigBee Alliance 2008, p. 419 f). Those services proper protection of the frame. The APS layer are implemented at the Network and the allows frame security to be based on link keys or Application Support Sublayer (APS), a sub layer the network key. If the active network key should of the Application Layer. The ZigBee protocol is be used for frame protection, the APS layer first based on an "open trust" model. This means all checks if the frame gets protected on NWK layer. protocol stack layers trust each other. Therefore If so the frame just gets passed to the NWK layer cryptographic protection only occurs between and the frame protection is performed on the devices. Every layer is responsible for the security NWK layer. The APS layer is also responsible for of their respective frames. providing applications and the ZDO with key establishment, key transport, and device The security of ZigBee networks is based on their management services. (ZigBee Alliance 2008, p. encryption keys. It is possible to distinguish 424) between two types of security keys. (ZigBee Alliance 2008, p. 422) The ZigBee standard states the following about the security of ZigBee installations: “The level of Network key is used to secure broadcast security provided by the ZigBee security communication. This 128-bit key is shared architecture depends on the safekeeping of the among all devices in the network. Usually symmetric keys, on the protection mechanisms multiple network keys are stored by the employed, and on the proper implementation of Trust Center, but only one network key is the cryptographic mechanisms and associated the active network key. The current active security policies involved. Trust in the security network key is identified by a sequence Cognosec Gmbh Classification: Confidential PAGE 2 OF 6 ZigBee Exploited Version 1.0 architecture ultimately reduces to trust in the ZigBee device might be a multi-purpose-device, secure initialisation and installation of keying different profiles are created to allow devices of material and to trust in the secure processing and various vendors to properly communicate with storage of keying material.” (ZigBee Alliance each other using those predefined profiles. 2008, p. 420). ZigBee Home Automation Public As stated above, the ZigBee Security is based on the assumption that keys are securely stored, and Application Profile (HAPAP) devices are pre-loaded with symmetric keys so An example of a profile would be