<?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>How to decrypt a Wireshark capture of an MQTTS connect from nRF9160 to AWS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118540/how-to-decrypt-a-wireshark-capture-of-an-mqtts-connect-from-nrf9160-to-aws</link><description>Hi, 
 We have a pcap file of a MQTTS connection to AWS, provided by the Soracom SIM console. I will print the first lines of the Wireshark trace so you can see what I am working with. 
 
 What technique can I use--and it is fine if I have to rebuild my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Feb 2025 14:48:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118540/how-to-decrypt-a-wireshark-capture-of-an-mqtts-connect-from-nrf9160-to-aws" /><item><title>RE: How to decrypt a Wireshark capture of an MQTTS connect from nRF9160 to AWS</title><link>https://devzone.nordicsemi.com/thread/521160?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 14:48:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35b321e4-f602-4e59-923e-5aeb40705422</guid><dc:creator>Burt</dc:creator><description>&lt;p&gt;Thanks, but no, I don&amp;#39;t believe so; the server is the AWS IoT broker.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to decrypt a Wireshark capture of an MQTTS connect from nRF9160 to AWS</title><link>https://devzone.nordicsemi.com/thread/521080?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2025 11:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d30899a3-138d-43db-8ef2-752b088d4916</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;I&amp;#39;d also recommend encrypting your Data via PSK so it can be decrypted directly in wireshark using the method Achim describes. Is this an option?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to decrypt a Wireshark capture of an MQTTS connect from nRF9160 to AWS</title><link>https://devzone.nordicsemi.com/thread/520960?ContentTypeID=1</link><pubDate>Sat, 01 Feb 2025 07:08:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbdae95a-ff9d-4a2f-b26d-15503ec39a99</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;To see the decrypted messages depends on the selected cipher suite.&lt;/p&gt;
&lt;p&gt;If a PSK without ??DHE cipher suite is used, it&amp;#39;s quite easy to add the secret to the &amp;quot;settings-&amp;gt;protocols-&amp;gt;TLS&amp;quot; in the field &amp;quot;Pre-Shared Key&amp;quot;. But your capture shows certificates, so that will not apply.&lt;/p&gt;
&lt;p&gt;With certificates usually ??DHE (Diffie&amp;ndash;Hellman Ephemeral Key Exchange) is used, so decryption only works, if one of the sides is able to export the &amp;quot;Pre-Master-Secret&amp;quot;. I don&amp;#39;t know, if AWS endpoints provide that data. Nor, if the device is able to provide that. (I run my own CoAP/DTLS 1.2 CID endpoints, and for such tests I&amp;#39;m usually switch to PSK.)&lt;/p&gt;
&lt;p&gt;(An not too easy alternative would be to run a own cloud vm with an TLS-TCP-TLS-forward. That will come with it&amp;#39;s own certificates and the device must redirect the connection to that and update the trust store as well.&amp;nbsp; Then you may be able to do &amp;quot;the man in the middle attack&amp;quot; (that&amp;#39;s only possible, because you add the trust to that &amp;quot;man in the middle&amp;quot;).)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>