<?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>Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61535/custom-authentication-for-mitm-in-le-secure</link><description>Hi, 
 I am working on a product based on an nRF52832 (SDK 15.3, S112 6.1). 
 The device uses the Nordic UART service, modified to force access parameters to JUST_WORKS for now. 
 The device has a couple of switches but no keypad or display. I would like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 May 2020 11:27:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61535/custom-authentication-for-mitm-in-le-secure" /><item><title>RE: Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/thread/250935?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 11:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92481626-81b3-46b5-b5c5-5cf5b1387aff</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I don&amp;#39;t know how easy it would be to perform a MITM attack, but each pairing attempt leaks bits of information, so it is not a one in a million chance to guess the correct key. And as noted in the SD API documentation, &amp;quot;Repeated pairing attempts using the same preprogrammed passkey makes pairing vulnerable to MITM attacks.&amp;quot; Maybe the peer manager PM_RA_PROTECTION feature could help to mitigate the risk.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/thread/250884?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 09:22:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c89ca6fd-d517-4639-b2e3-08bc6913e349</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ll investigate this path then.&lt;/p&gt;
&lt;p&gt;Last question : on the link you posted before, someone mention a &amp;quot;20 attempts hack&amp;quot; available to guess a static passkey. Do you confirm this ? Is there any article / documentation regarding the easyness to hack it ? I would have assumes a hacker to have 1 change in a million to guess it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/thread/250855?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 06:28:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfe9be43-392e-4fe6-97db-077dfd1a13e6</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="nono76352"]Or maybe there is a way to get information related to the bonding and handle a database of &amp;quot;application level authenticated device&amp;quot; on the application side ?[/quote]
&lt;p&gt;&amp;nbsp;It is. You can use the Peer manager &lt;span&gt;&lt;a title="pm_peer_data_app_data_store" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__peer__manager.html?cp=7_1_6_2_16_47#gab9c64a5e774eee3a754e2a0af1ed7cb8"&gt;pm_peer_data_app_data_store&lt;/a&gt;&lt;/span&gt;() function to store app-related data for a bonded device. So this should allow you to make the authentication a one-time operation together with the bonding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/thread/250756?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 13:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31e7de41-56d1-43d7-9bae-c613f594d256</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;From the tests I have made, it seems that anytime I set either DISPLAY or KEYBOARD capability, the smartphone shows automatically either a textbox or a code to enter on the device. I guess with the statis passkey the behavior would be the same ? I could then just tell the user (via the mobile app) to enter a specific static passkey but I don&amp;#39;t see how it would allow me to setup the button press authentication I proposed in my question.&lt;/p&gt;
&lt;p&gt;The objective with doing it via the pairing process was that the user would only have to do it once (on first pairing) and not on each connection. If I move the button press authentication process (steps 4 - 6) to the application layer, then I won&amp;#39;t have a way to identify a smartphone from a previous bonded connection.&lt;/p&gt;
&lt;p&gt;Or maybe there is a way to get information related to the bonding and handle a database of &amp;quot;application level authenticated device&amp;quot; on the application side ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom authentication for MITM in LE Secure</title><link>https://devzone.nordicsemi.com/thread/250727?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 12:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7b65db5-8e3a-4d36-9e77-4bddf3743427</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can define a static passkey to use for pairing through the options API (&lt;span&gt;&lt;a title="sd_ble_opt_set" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html?cp=4_6_2_1_2_0_2_2_4#ga511d431bc3d9ccf9bef09ad20cbf855a"&gt;sd_ble_opt_set&lt;/a&gt;&lt;/span&gt;) then claim to have display capabilities in your security parameters. This should allow you to support numeric comparison or Passkey bonding (&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v7.0.1%2Fgroup___b_l_e___g_a_p___p_e_r_i_p_h___l_e_s_c___m_s_c.html"&gt;MSC&lt;/a&gt;). But as you said, it won&amp;#39;t give proper MITM protection. I recommend you to take a look at the discussions around that here in this thread:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/35856/questions-about-lesc-mitm-and-passkey"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/35856/questions-about-lesc-mitm-and-passkey&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The other alternative you suggested of implementing a custom authentication challenge at the application level should be an option as well. However, I think it may be easier to not interfere&amp;nbsp; with the pairing process&amp;nbsp;(ie let it complete in step 3) but instead, make the FW app limit control access until the custom authentication is complete. Maybe consider deleting the pairing at step 7 if step 4-6 failed.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>