<?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>&amp;quot;Encrypted packet decrypted incorrectly (bad MIC)&amp;quot; - how to get LTK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113465/encrypted-packet-decrypted-incorrectly-bad-mic---how-to-get-ltk</link><description>Hi, 
 
 I am trying to sniff between my phone and a BLE device. 
 When I put the device in pairing mode, I can see it in the &amp;quot;advertising&amp;quot; list. Then I select it (but I don&amp;#39;t know if I should select anything from the &amp;quot;legacy passkey&amp;quot;, &amp;quot;legacy ltk&amp;quot;, &amp;quot;follow</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 17 Aug 2024 09:26:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113465/encrypted-packet-decrypted-incorrectly-bad-mic---how-to-get-ltk" /><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498716?ContentTypeID=1</link><pubDate>Sat, 17 Aug 2024 09:26:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7622bd69-5fff-4a4c-8ebd-18ac9adc9112</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;sorry but you support people don&amp;#39;t understand my scenario, I believe.&lt;/p&gt;
&lt;p&gt;I am not using your devices to simulate or develop something.&lt;/p&gt;
&lt;p&gt;I am using your device ONLY to sniff traffic between 2 other devices. In this scenario, using nRF Connect SDK will not help me. So why are you frequently mentioning it ? It is useless for me.&lt;/p&gt;
&lt;p&gt;I am just looking for help (if there&amp;#39;s any possibility) to sniff traffic between and Android app and a custom BLE device.&lt;/p&gt;
&lt;p&gt;If that&amp;#39;s not possible in my scenario, just let me know and close this question.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498478?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2024 13:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b847a66-8e4e-453e-8e7b-90cda4b61c8e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;NCS is our &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/index.html"&gt;nRF Connect SDK&lt;/a&gt;&lt;span&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498363?ContentTypeID=1</link><pubDate>Wed, 14 Aug 2024 21:03:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de9a3366-3086-4dec-b463-549bac9962f5</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;I am sorry, I don&amp;#39;t understand. What is NCS ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498130?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 20:01:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4757c2de-64e2-4d71-86c2-c24be9cfe6e4</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="ilker Aktuna"]if it would be possible to get the LTK , or decrypt using hci sniff on the android phone.[/quote]
&lt;p&gt;I think it cannot get LTK from your sniffer log, but you can refer to that course to get LTK if you are using NCS.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498118?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 16:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a73a79f-db94-441c-a8d3-084ef6f6e81b</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;which tool ? and in what situation ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/498117?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 16:38:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09087162-d23a-4c1c-9946-5f9fc5f98de1</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;I have read through that tutorial/course, but as you can see in my scenario, LTK is not transferred in pairing phase (or am I missing it ?)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have already provided you pcap output, so you can see from there.&lt;/p&gt;
&lt;p&gt;So what is the point of following that tutorial in my case ?&lt;/p&gt;
&lt;p&gt;If the LTK is not provided while pairing , I won&amp;#39;t be able to decrypt packets.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I asked you if it would be possible to get the LTK , or decrypt using hci sniff on the android phone.&lt;/p&gt;
&lt;p&gt;I could not get an answer to this.&lt;/p&gt;
&lt;p&gt;So what is the purpose of suggesting me to read the tutorial (which I already did) ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496745?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2024 02:33:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eefacecb-c328-42ef-957c-d22eb00be103</guid><dc:creator>billtsai</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure the tool will provide enough information or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496712?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 19:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dde79614-63b3-4d69-8255-dfb7a890bc71</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]all I see is &amp;quot;empty PDU&amp;quot; or&amp;nbsp;&amp;quot;Encrypted packet decrypted incorrectly (bad MIC)&amp;quot;[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;It is most commonly caused by the sniffer not having the private keys for the connection, so it can not decrypt the packages it intercepts.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please check&amp;nbsp;&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/topic/blefund-lesson-6-exercise-3/"&gt;Exercise 3 Follow and decrypt a paired connection&lt;/a&gt;&amp;nbsp;on how to get the LTK if you are using NCS. It cannot&amp;nbsp;decrypt without a LTK.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496640?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 13:09:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f4cdeb-feb4-4b65-9a2e-b33326ef97e5</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;thank you. Would that be possible to sniff from the phone (on the phone , using hci snoop ?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496485?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 01:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c67d301-4bd6-4558-9852-a413d768f168</guid><dc:creator>billtsai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The device actually uses lesc.&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;you can&amp;#39;t read the device&amp;#39;s flash,&amp;nbsp;It&amp;#39;s impossible to get the LTK throug sniffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496481?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 21:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7216b872-df16-472e-b391-40d6acd9cc4c</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;I checked it now but it does not match with my scenario.&lt;/p&gt;
&lt;p&gt;First of all I am not using that board. I am trying to sniff some 3rd party device. And the communication is different. If you had checked my file mb.pcapng that I had attached in my previous post, you could understand. One side requests LTK but the other side does not send LTK.&lt;/p&gt;
&lt;p&gt;In this case how shall I get the LTK or how shall I decrypt without a LTK ?&lt;/p&gt;
&lt;p&gt;Please download my file and check.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496446?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 15:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19e6cb00-3972-476a-b37f-ae83804155c3</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please&lt;span&gt;&amp;nbsp;check out&amp;nbsp;&lt;/span&gt;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/topic/blefund-lesson-6-exercise-3/"&gt;Exercise 3 Follow and decrypt a paired connection&lt;/a&gt;&lt;span&gt;&amp;nbsp;in the&amp;nbsp;&lt;/span&gt;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/"&gt;Bluetooth Low Energy Fundamentals&lt;/a&gt;&lt;span&gt;&amp;nbsp;course (which is highly recommended).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496386?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 10:26:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4792c05b-0352-45f0-acd9-aa369b3d1b0c</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;this traffic is between a BLE device and an app on Android phone.&lt;/p&gt;
&lt;p&gt;Probably the app has an hardcoded LTK and without it I won&amp;#39;t be able to decrypt the traffic for investigation.&lt;/p&gt;
&lt;p&gt;Would it be possible to get the LTK on the Android phone ? Is it possible to sniff on the phone itself and get an unencrypted trace ?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496385?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 10:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4015624e-b9a7-47aa-a3a8-ea16f1537f19</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mb.pcapng"&gt;devzone.nordicsemi.com/.../mb.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you please check this file ? My sniff session is not like your example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496308?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 02:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:151ae147-c0e7-4d9b-bd83-69409c8a7e6f</guid><dc:creator>billtsai</dc:creator><description>&lt;p&gt;I can&amp;#39;t download your file.&lt;/p&gt;
&lt;p&gt;You can refer to my sniffer file. My wireshark version is v4.0.6.&lt;/p&gt;
&lt;p&gt;In packet 2134, the device responses host that device does not support secure connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In packet 2433, the device sends LTK to host.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can use the same method to find more information.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/desktop_5F00_dfu_5F00_sniffer_5F00_log.pcapng"&gt;devzone.nordicsemi.com/.../desktop_5F00_dfu_5F00_sniffer_5F00_log.pcapng&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/Wireshark-_B700_-Packet-2134-_B700_-desktop_5F00_dfu_5F00_sniffer_5F00_log.pcapng-2024_5F00_7_5F00_31-_0A4E4853_-10_5F00_27_5F00_08.png" /&gt;&lt;/p&gt;
&lt;p&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/Wireshark-_B700_-Packet-2433-_B700_-desktop_5F00_dfu_5F00_sniffer_5F00_log.pcapng-2024_5F00_7_5F00_31-_0A4E4853_-10_5F00_28_5F00_10.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496295?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 21:00:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8da0e113-8e15-4257-bdd1-f45816e7c309</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;I am not sure if I&amp;#39;m using any of these SDKs because I am not developing anything. I am just using the sniffer to understand the traffic.&lt;/p&gt;
&lt;p&gt;I am attaching the capture from sniffer. Maybe you can help me extract the LTK from this capture.&lt;/p&gt;
&lt;p&gt;Which packet should I look at ? And then how to format the LTK and use it for other sniff sessions ?&lt;/p&gt;
&lt;p&gt;I am also attaching a sreenshot of my Wireshark screen so that you can tell me what option to use on Wireshark.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://tmpfiles.org/10219552/mb.cap"&gt;https://tmpfiles.org/10219552/mb.cap&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;a href="https://tmpfiles.org/10219552/mb.cap"&gt;tmpfiles.org/.../mb.cap&lt;/a&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://tmpfiles.org/dl/10219416/capture.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496103?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 01:01:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ea6e339-a9d4-4949-9680-b944e16a77f7</guid><dc:creator>billtsai</dc:creator><description>&lt;p&gt;Nordic has two general sdk now.&lt;/p&gt;
&lt;p&gt;NCS SDK :&amp;nbsp;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/index.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;nRF5x SDK :&amp;nbsp;&lt;a id="" href="https://developer.nordicsemi.com/nRF5_SDK/"&gt;https://developer.nordicsemi.com/nRF5_SDK/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lesc is low energy secure connection. This function can be enabled or disabled by your application code.&lt;/p&gt;
&lt;p&gt;Sniffer will auto get LTK throung pairing process if you use just work and without lesc.&lt;/p&gt;
&lt;p&gt;You can attach your sniffer log, that will show more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/496081?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 18:52:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84a493b5-1f7f-4ba1-8048-ab5bc683efbe</guid><dc:creator>ilker Aktuna</dc:creator><description>&lt;p&gt;thanks for your response. But I am not a professional and the terms you use&amp;nbsp; , I am not familiar with them.&lt;/p&gt;
&lt;p&gt;&amp;quot;if your devişce has no lesc&amp;quot; -&amp;gt; what is lesc , and how do I know if my device has lesc ?&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;then you can sniff LTK in pairing process&lt;/span&gt;&amp;quot; -&amp;gt; how can I do that ?&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;which sdk you use.&lt;/span&gt;&amp;quot; -&amp;gt; I don&amp;#39;t know. I have a laptop with Wireshark installed and 2 years ago I had installed extensions to sniff using nRF52840. I had followed official guides that time. But I&amp;#39;m not sure where the guide is now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h1 class="name"&gt;&lt;/h1&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "Encrypted packet decrypted incorrectly (bad MIC)" - how to get LTK</title><link>https://devzone.nordicsemi.com/thread/495908?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 03:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fad224f-ab58-431b-ac80-3c8e4ab7ae07</guid><dc:creator>billtsai</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If your device has no lesc, then you can sniff LTK in pairing process.&lt;/p&gt;
&lt;p&gt;Otherwise, you need a LTK to decrypt packet.&lt;/p&gt;
&lt;p&gt;LTK will store in flash if you use bonding.&lt;/p&gt;
&lt;p&gt;But you need to provide which sdk you use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>