<?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>Read  APPROTECTSTATUS via firmware</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62650/read-approtectstatus-via-firmware</link><description>Is it possible to read the value of APPROTECTSTATUS via the firmware? It seems like the AP register in not memory mapped, so maybe not. But maybe there is some kind of work around. Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jun 2020 14:55:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62650/read-approtectstatus-via-firmware" /><item><title>RE: Read  APPROTECTSTATUS via firmware</title><link>https://devzone.nordicsemi.com/thread/255317?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 14:55:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a0b838d-07c3-4c46-ac92-d211c62a0bf9</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;you cannot read APPROTECTSTATUS but you can check whether MCU is under debug session, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12517/knowing-that-a-swd-probe-is-connected"&gt;here&lt;/a&gt;. In any case you can&amp;nbsp;make hacker&amp;#39;s life harder but cannot stop him from dumping you fw, disassembling it and disabling this check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read  APPROTECTSTATUS via firmware</title><link>https://devzone.nordicsemi.com/thread/255309?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 14:39:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3570f5c3-9046-4374-8be1-7edc73f5a18c</guid><dc:creator>Barry</dc:creator><description>&lt;p&gt;I guess that is something that is&amp;nbsp;dictated by the hardware. If there was a way for the CPU to read this register, then that seems like it could be part of a software mitigation for this vulnerability,&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/in_133_v1.0.pdf"&gt;https://infocenter.nordicsemi.com/pdf/in_133_v1.0.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the exploit described, the attacker read this value after his exploit and it was true to the status. It showed enabled before the exploit, and disabled after the exploit. So in my code if I could read this value, I could compare it to the UICR value for approtect and if there was a mismatch I could chose to do something like restart or erase flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read  APPROTECTSTATUS via firmware</title><link>https://devzone.nordicsemi.com/thread/255307?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 14:29:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:465d9dc8-f012-4421-9111-f74e7e876b76</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Is it possible to read the value of&amp;nbsp;&amp;nbsp;APPROTECTSTATUS via the firmware?[/quote]
&lt;p&gt;No.&amp;nbsp;&amp;nbsp;APPROTECTSTATUS is a register that is only visible to the debugger. It cannot be read by the CPU / firmware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>