<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110959/unable-to-decrypt-zigbee-shell-traffic-in-wireshark</link><description>Hi, 
 I&amp;#39;m using nRF Connect v2.6.2 with Wireshark (3.6) and it is setup with the nRF sniffer + Nordic network keys configured. 
 I can decrypt packets from another Zigbee network (Pi + SkyConnect based using the added Home Assistant network key) 
 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 May 2024 06:43:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110959/unable-to-decrypt-zigbee-shell-traffic-in-wireshark" /><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/484614?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 06:43:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eadd2bae-d15c-42ee-818e-771a552b16af</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thanks for your help, I&amp;#39;m able to see decrypted packets.&lt;/p&gt;
&lt;p&gt;All the best&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482938?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 07:17:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b00d489-9602-4b3e-8993-fea370ec42c6</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Wayne,&lt;/p&gt;
&lt;p&gt;I tested with nRF Connect SDK v2.6.1, Wireshark v4.2.4 on Ubuntu 22.04, and nRF52840 DK.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482565?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 14:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c87be2dc-87c2-4488-ae82-1ad9ab48ae86</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thanks for letting know. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please could you also let me know which&amp;nbsp;version of: the nRF Connect SDK, Wireshark&amp;nbsp;and the nRF MCU you are using to test please ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482540?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 13:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32cff447-dc98-4e1b-96a2-7e2e9c1dfba9</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Wayne,&lt;/p&gt;
&lt;p&gt;Install code is a security feature in Zigbee that allows you to configure the network so that only devices with install codes can join it. When using this, the install code and extended address of a joining device must be added to the coordinator before the device can join, and during joining, the device&amp;#39;s install code is used to generate a unique trust center link key for the device. If you were using this, it could explain why the packets are encrypted since the sniffer would not be able to decrypt the packets of a network using install codes with just the network key.&lt;/p&gt;
&lt;p&gt;With Zigbee shell, you can manually enable and add install codes, but it does not seem like you are doing so, so you can just ignore my question regarding it &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482323?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 14:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f038d3f7-8315-47bb-8520-69f42f2b31e6</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;The network key is set after the erase, I have just tried a test with the sniffer running prior to my testing. I&amp;#39;m going to upgrade to WS 4.x to see if that makes a difference.&lt;/p&gt;
&lt;p&gt;What are &amp;quot;install codes&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482318?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 14:08:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f68f425e-f85d-4aa6-ae27-1c0f47332418</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Wayne,&lt;/p&gt;
&lt;p&gt;The sniffer log is decrypted on my side as well.&lt;/p&gt;
[quote user="waynek"]Prior to trying out the steps you&amp;#39;ve suggested I&amp;#39;ve performed a &amp;#39;recovery&amp;#39; and &amp;#39;erase&amp;#39; flash but&amp;nbsp;the result is the packets remain encrypted in Wireshark, log:&amp;nbsp;[/quote]
&lt;p&gt;Have you tried setting the network key after performing an erase?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why you can&amp;#39;t decrypt the packets in the sniffer log. I&amp;#39;ve tested with the same commands as you, but I can&amp;#39;t reproduce the issue. Are you starting the sniffer before the coordinator starts the network? If the sniffer is running while a device is commissioned to the network, it should be able to pick up the network key and use it to decrypt the packets regardless of the keys you have configured in Wireshark.&lt;/p&gt;
&lt;p&gt;Just to verify, are you using install codes?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482254?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:28:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb468a3a-6d42-42f2-a787-66b75528b211</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Please find attached a&amp;nbsp;log of issuing a light toggle command a few times. (&lt;span&gt;&lt;code&gt;zcl cmd 0x7be2 1 0x0006 0x02&lt;/code&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also tried setting the network key to that of the HomeAssistant one (the Home Assistant network is off), but it still doesn&amp;#39;t decrypt. &amp;nbsp;EDIT: Just to be clear the key being used&amp;nbsp;for the attached log is the &amp;#39;Nordic Examples&amp;#39; key.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/toggle_5F00_light.pcapng.zip"&gt;devzone.nordicsemi.com/.../toggle_5F00_light.pcapng.zip&lt;/a&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_05_2D00_07-at-12.17.57.png" /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zigbee_5F00_pc_5F00_keys.zip"&gt;devzone.nordicsemi.com/.../zigbee_5F00_pc_5F00_keys.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482249?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:12:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3991076-6d01-4bf5-8c58-ebb01c1dc9d3</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Wayne,&lt;/p&gt;
&lt;p&gt;Can you upload your sniffer log here as a pcap file, as well as a screenshot of your pre-configured keys in Wireshark?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482239?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 10:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0831b9e-1101-4c1b-acfc-0584589fe0f6</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also tried setting the network key in the shell main.c hoping this would be the default key instead of any randomly assigned one:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;{&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Starting Zigbee shell application&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;network_key&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;ZB_CCM_KEY_SIZE&lt;/span&gt;&lt;span&gt;] = {&lt;/span&gt;&lt;span&gt;0xab&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xcd&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0xef&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x01&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x23&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x45&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x67&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x89&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0x00&lt;/span&gt;&lt;span&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;zb_secur_setup_nwk_key&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;network_key&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Zigbee shell application started&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Although this doesn&amp;#39;t work either, but it&amp;#39;s not clear to me that this actually takes effect and is not overwritten by any&amp;nbsp;other zigbee startup code.&lt;/p&gt;
&lt;p&gt;All the best&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482229?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 09:48:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0a48e31-1ada-4711-8e6b-ca93e0fc56e7</guid><dc:creator>Wayne</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;The factory reset and nvram commands are&amp;nbsp;there&amp;nbsp;because I wanted a standalone end-to-end test case, as I was&amp;nbsp;getting:&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;uart:~$ bdb nwkkey abcdef01234567890000000000000000&lt;br /&gt;Zigbee stack has been configured in the past.&lt;br /&gt;Please disable NVRAM to change the preconfigured network key.&lt;br /&gt;Error: Can&amp;#39;t change NWK key - NVRAM not empty&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;and also&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;uart:~$ &lt;/b&gt;&lt;/span&gt;&lt;span&gt;nvram disable&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;Error: Stack already started&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;```&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So&amp;nbsp;wanted the NVRAM to be cleared without having to erase the entire flash every time I ran a test.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Prior to trying out the steps you&amp;#39;ve suggested I&amp;#39;ve performed a &amp;#39;recovery&amp;#39; and &amp;#39;erase&amp;#39; flash but&amp;nbsp;the result is the packets remain encrypted in Wireshark, log:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***&lt;br /&gt;[00:00:00.014,739] &amp;lt;inf&amp;gt; app: Starting Zigbee shell application&lt;br /&gt;[00:00:00.014,984] &amp;lt;inf&amp;gt; app: Zigbee shell application started&lt;br /&gt;uart:~$ bdb nwkkey abcdef01234567890000000000000000&lt;br /&gt;Done&lt;br /&gt;uart:~$ bdb role zc&lt;br /&gt;Zigbee shell does not erase the NVRAM between reboots, but is not aware of the previously configured role.&lt;br /&gt;Remember to set the coordinator role after rebooting the device.&lt;br /&gt;Coordinator set&lt;br /&gt;Done&lt;br /&gt;uart:~$ bdb start&lt;br /&gt;Started coordinator&lt;br /&gt;Done&lt;br /&gt;[00:00:07.212,860] &amp;lt;inf&amp;gt; zigbee_app_utils: Production configuration is not present or invalid (status: -1)&lt;br /&gt;[00:00:07.213,409] &amp;lt;inf&amp;gt; zigbee_app_utils: Zigbee stack initialized&lt;br /&gt;[00:00:07.219,604] &amp;lt;inf&amp;gt; zigbee_app_utils: Device started for the first time&lt;br /&gt;[00:00:07.219,635] &amp;lt;inf&amp;gt; zigbee_app_utils: Start network formation&lt;br /&gt;[00:00:07.755,767] &amp;lt;inf&amp;gt; zigbee_app_utils: Unimplemented signal (signal: 54, status: 0)&lt;br /&gt;[00:00:07.758,148] &amp;lt;inf&amp;gt; zigbee_app_utils: Network formed successfully, start network steering (Extended PAN ID: f4ce363f302b9946, PAN ID: 0x8e64)&lt;br /&gt;[00:00:08.221,771] &amp;lt;inf&amp;gt; zigbee_app_utils: Unimplemented signal (signal: 54, status: 0)&lt;br /&gt;[00:00:08.224,761] &amp;lt;inf&amp;gt; zigbee_app_utils: Joined network successfully (Extended PAN ID: f4ce363f302b9946, PAN ID: 0x8e64)&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Wayne&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to decrypt Zigbee Shell traffic in Wireshark</title><link>https://devzone.nordicsemi.com/thread/482225?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 09:31:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ad38304-a87a-45e2-b313-1b38bc354ac3</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Wayne,&lt;/p&gt;
&lt;p&gt;Can you explain why you are starting the network, factory resetting the device, and disabling/enabling NVRAM before starting the network again?&lt;/p&gt;
&lt;p&gt;Are you able to decrypt the packets if you simply configure the network key, configure the device as coordinator, and then start the network?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;bdb nwkkey abcdef01234567890000000000000000&lt;/code&gt;&lt;br /&gt;&lt;code&gt;bdb role zc&lt;/code&gt;&lt;br /&gt;&lt;code&gt;bdb start&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>