3

I am working with a Zigbee system and I have been trying to grab the network key as it is exchanged during pairing. I wasn't having much luck with the combination of TI Packet Sniffer, Wireshark and Killerbee - it kept on failing. This combination has worked for me in the past.

I installed a trial version of Perytons-M4 and captured a pairing using my CC2531 USB stick. To my surprise, this recovered the key automatically and started decrypting the rest of the data.

However, in the APS_CMD_KEY_TRANSPORT message sent to exchange the key, Perytons is showing that the APS layer data is in fact encrypted already, using a key that I have not seen before (4BAB0F173E1434A2D572E1C1EF478782)

The key for many Zigbee devices is "ZigBeeAlliance09", which is the case here for some communications, but this is not the key being used for key exchange.

Once the capture is complete, the Perytons "Keys Management" window shows the "ZigBeeAlliance09" key along with the one sent in the APS_CMD_KEY_TRANSPORT, but not the one used to decrypt the APS data.

The device is a Yale PIR camera (manufacturer's product page). I have been unable to identify the physical Zigbee modules used, but they look like this from the PIR and this from the panel. Unfortunately I can't work out a way of getting Data out of Perytons in a way that is easy to read by others.

Showing the encryption and key on the APS data

Showing the keys recovered during the capture

I've had a google, had a look in the Zigbee specs and had a look in the Perytons documentation, but can't find anything. Any ideas?

4

What is the profile being used?

Home Automation (which is the one used by most devices) uses 'ZigBeeAlliance09' trust center link key to encrypt a random network key in the APS_CMD_KEY_TRANSPORT message. Joining devices decrypt the random network key in the APS_CMD_KEY_TRANSPORT message and then use the network key to encrypt/decrypt further network layer payloads. Most commercial sniffers will see the APS_CMD_KEY_TRANSPORT message and decrypt the network key. There is typically no further encryption at the APS layer for Home Automation.

Light Link Profile (Such as Philips Hue) uses the same security mechanism as HA but does not use the publicly available 'ZigBeeAlliance09' trust center link key, but a secret key only given to manufactures that have devices which have passed the Light Link Profile certification process.

Smart Energy profile uses the same network layer security mechanism as HA, but has further APS layer security which uses a key transferred with certicom certificates which are very secure (as it is typically utility companies using this for metering and do not want the meter reading tampered with).

Regards, TC.

  • It's Home Automation, but it's using a different key. I wonder if this is some kind of hybrid? – Cybergibbons Jun 17 '15 at 18:57
  • Can you post which device it is? – t.c. Jun 17 '15 at 19:09
  • Added more detail above. – Cybergibbons Jun 17 '15 at 22:25
  • This is my mistake - the field "Hash permutation of key" is the ZigbeeAlliance09 key. I'd totally overlooked it. – Cybergibbons Jun 18 '15 at 8:43
0

The key used is simply a hash of ZigBeeAlliance09. You see it in your picture pretty clear.

ZigBee uses the the default key as basis for different hash permutation of "ZigBeeAlliance09". Look it up in the ZigBee specification.

  • Yes, I totally skipped over the "hash permutation of key" field which is "ZigBeeAlliance09". – Cybergibbons Jul 31 '15 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.