## 2 Security Threats in Zigbee Protocol and the Alleviation Method  
Zigbee security is applied to the Network and Application layers where packages are encrypted with 128-bit Advanced Encryption Standard (AES). Data is encrypted by using a network encryption key and possibly a link encryption key. Devices have to have the same keys to be able to communicate among each other in the network. The network layer security is implemented by using a network key to secure broadcast communication by encrypting the APS layer and application data. If security is enabled in the network, all data packages will encrypt with the network encryption key. Security at the network layer applies to all packages transmitted and is encrypted and decrypted in each node of the network; however, this security does not apply to the medium access layer communication, such as beacon messages. Application layer security is implemented by using a shared link key to secure the unicast communication between the source and the destination devices to encrypt application data [9]. Considering the importance of the security in IoT devices, the security threats in Zigbee communication protocol and the mitigation methods have been researched and proven by many researchers. We have divided security threats of Zigbee protocol into two categories: (1) Attacks Requiring Key Compromise, and (2) Attacks with Unrequired Key Compromise. In each of these categories, we go over scenarios and methods that could expose Zigbee to malicious attacks, and we suggest mitigation methods for each one of them. Figure 1 shows various attack categories in Zigbee protocol.  
Network key or link key in Zigbee protocol can be obtained by a Physical Attack [20; 21]. The keys can be extracted from Zigbee devices' flash memory while a physical access is achieved. Also, when a device is removed from the network, Zigbee does not invalidate the keys. It generates new ones that  
Figure 1: Attack categories in Zigbee protocol.  
allow tempering the whole network. Several researchers gained physical access to the Zigbee devices and have extracted the firmware which contains the encryption keys. Two practical attacks against Zigbee security were demonstrated by [PERSON] et al. [17].  
Using Replay Attacks, an attacker can sniff a packet or record packet traffic in a network and send it back at a later time to cause a malicious attack. Zigbee alliance had put in a good effort to achieve authenticity and confidentiality to the communicated packets; though, Denial of Service (DoS) is still an issue and no effort has been done in this area. Multiple stack layers could be affected by this type of attack and that depends on whether the attacker has joined the network (insider DoS attack) or not (outsider DoS attack). If the attacker has joined the network, the DoS may be conducted at the physical, medium access control, network, and application layers, but in case it is an outsider, the DoS could happen only at the physical and medium access control layers. Figure 2 shows the attacks at several OSI (Open Systems Interconnection) layers.  
We have proposed three alleviation methods which can detect Physical Attack and protect from Replay Attacks and Flooding Attacks efficiently as compared with the current Zigbee protocols. Table 1 shows the proposed alleviation method used in the Security Improvement Framework (SIF) to resolve various Zigbee network threats. Those three security solutions will be discussed in Section 3.