SlideShare a Scribd company logo
12/19/16 1
ARMv7-M
Memory Protection Unit
(MPU)
eXecution Never (XN) demo
Louie Lu
<me@louie.lu>
12/19/16 2
BitSec Demo
Memory protection using MPU
Each MPU can set 8 region on
Cortex-M4
To achieve program isolation
And, can set the region to
eXecution Never (XN)
12/19/16 3
BitSec Demo
12/19/16 4
BitSec Demo
PC 0x08008000
12/19/16 5
BitSec Demo
PC 0x08008000
If attacker put malicious code at
0x20004000, and set PC to
0x20004000
12/19/16 6
BitSec Demo
Then, CPU will try to fetch
0x20004000 value as next instruction
PC 0x20004000
12/19/16 7
BitSec Demo
Attack done.
PC 0x20004000
12/19/16 8
BitSec Demo
But If we setting MPU region
and set region not to execute
12/19/16 9
BitSec Demo
But If we setting MPU region
and set region not to execute
Base: 0x20004000, Size: 2 ** 12, Attr: 1000
Range: 0x20004000 ~ 0x20005000
MPU protect, XN is true
0x20004000
0x20005000
12/19/16 10
BitSec Demo
When PC value been changed to 0x20004008
CPU try to fetch 0x20004008
as next instruction
MPU protect, XN is true
PC 0x20004008
0x20004000
0x20005000
12/19/16 11
BitSec Demo
This invalid memory access will trigger MPU
then generate a
memory manage fault exception
MPU protect, XN is true
PC 0x20004008
0x20004000
0x20005000
12/19/16 12
BitSec Demo
It will handle by
mem_manage_fault_handler
to avoid attack
MPU protect, XN is true
PC 0x0800605E
mem manage fault handler
0x20004000
0x20005000

More Related Content

Similar to ARMv7-M MPU (Memory Protection Unit) XN example

Bots.pdf
Bots.pdfBots.pdf
Bots.pdf
nomanurrahman2
 
XBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCsXBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCs
Dilshan Jayakody
 
Datasheet of SEN-10061(JPEG Camera)
Datasheet of SEN-10061(JPEG Camera)Datasheet of SEN-10061(JPEG Camera)
Datasheet of SEN-10061(JPEG Camera)
Tsuyoshi Horigome
 
Powerful SoM based on i.MX 8M Mini processor for various embedded applications
Powerful SoM based on i.MX 8M Mini processor for various embedded applicationsPowerful SoM based on i.MX 8M Mini processor for various embedded applications
Powerful SoM based on i.MX 8M Mini processor for various embedded applications
nie, jack
 
Chapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptxChapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptx
WaleedAbdullah2k19EE
 
Lecture 5-Embedde.pdf
Lecture 5-Embedde.pdfLecture 5-Embedde.pdf
Lecture 5-Embedde.pdf
BlackHunter13
 
IP Concept in LTE
IP Concept in LTEIP Concept in LTE
IP Concept in LTESofian .
 
DTMF Mobile Operated Robot using Atmega16
DTMF Mobile Operated Robot using Atmega16DTMF Mobile Operated Robot using Atmega16
DTMF Mobile Operated Robot using Atmega16
Prashant Saini
 
Development Board for NXP i.MX 8M Quad Application Processors
Development Board for NXP i.MX 8M Quad Application ProcessorsDevelopment Board for NXP i.MX 8M Quad Application Processors
Development Board for NXP i.MX 8M Quad Application Processors
Linda Zhang
 
presentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.pptpresentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.ppt
LalithKumar818864
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
KeatonParker2
 
Introduction to Microprocessor lecture 01
Introduction to Microprocessor lecture  01Introduction to Microprocessor lecture  01
Introduction to Microprocessor lecture 01
Md. Murshedul Arifeen
 
MYS-8MMX Single Board Computer
MYS-8MMX Single Board ComputerMYS-8MMX Single Board Computer
MYS-8MMX Single Board Computer
Linda Zhang
 
Microprocessor Presentation.ppt
Microprocessor Presentation.pptMicroprocessor Presentation.ppt
Microprocessor Presentation.ppt
SafiUllah130
 
Microprocessor Presentation.ppt
Microprocessor Presentation.pptMicroprocessor Presentation.ppt
Microprocessor Presentation.ppt
SafiUllah130
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)
Raziuddin Khazi
 
Customizable Microprocessor design on Nexys 3 Spartan FPGA Board
Customizable Microprocessor design on Nexys 3 Spartan FPGA BoardCustomizable Microprocessor design on Nexys 3 Spartan FPGA Board
Customizable Microprocessor design on Nexys 3 Spartan FPGA Board
Bharat Biyani
 
Report (2)
Report (2)Report (2)
Report (2)
Shivangi Dwivedi
 

Similar to ARMv7-M MPU (Memory Protection Unit) XN example (20)

Bots.pdf
Bots.pdfBots.pdf
Bots.pdf
 
XBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCsXBMC USB Controller for Media Center PCs
XBMC USB Controller for Media Center PCs
 
Datasheet of SEN-10061(JPEG Camera)
Datasheet of SEN-10061(JPEG Camera)Datasheet of SEN-10061(JPEG Camera)
Datasheet of SEN-10061(JPEG Camera)
 
Powerful SoM based on i.MX 8M Mini processor for various embedded applications
Powerful SoM based on i.MX 8M Mini processor for various embedded applicationsPowerful SoM based on i.MX 8M Mini processor for various embedded applications
Powerful SoM based on i.MX 8M Mini processor for various embedded applications
 
Chapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptxChapter_01_See_Program_Running.pptx
Chapter_01_See_Program_Running.pptx
 
Multimedia Steganography
Multimedia SteganographyMultimedia Steganography
Multimedia Steganography
 
Lecture 5-Embedde.pdf
Lecture 5-Embedde.pdfLecture 5-Embedde.pdf
Lecture 5-Embedde.pdf
 
utmippt
utmipptutmippt
utmippt
 
IP Concept in LTE
IP Concept in LTEIP Concept in LTE
IP Concept in LTE
 
DTMF Mobile Operated Robot using Atmega16
DTMF Mobile Operated Robot using Atmega16DTMF Mobile Operated Robot using Atmega16
DTMF Mobile Operated Robot using Atmega16
 
Development Board for NXP i.MX 8M Quad Application Processors
Development Board for NXP i.MX 8M Quad Application ProcessorsDevelopment Board for NXP i.MX 8M Quad Application Processors
Development Board for NXP i.MX 8M Quad Application Processors
 
presentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.pptpresentation_microcontroller_1457634560_181219.ppt
presentation_microcontroller_1457634560_181219.ppt
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
Introduction to Microprocessor lecture 01
Introduction to Microprocessor lecture  01Introduction to Microprocessor lecture  01
Introduction to Microprocessor lecture 01
 
MYS-8MMX Single Board Computer
MYS-8MMX Single Board ComputerMYS-8MMX Single Board Computer
MYS-8MMX Single Board Computer
 
Microprocessor Presentation.ppt
Microprocessor Presentation.pptMicroprocessor Presentation.ppt
Microprocessor Presentation.ppt
 
Microprocessor Presentation.ppt
Microprocessor Presentation.pptMicroprocessor Presentation.ppt
Microprocessor Presentation.ppt
 
WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)WiFi mesh network(ESP32 mStar and mesh topology)
WiFi mesh network(ESP32 mStar and mesh topology)
 
Customizable Microprocessor design on Nexys 3 Spartan FPGA Board
Customizable Microprocessor design on Nexys 3 Spartan FPGA BoardCustomizable Microprocessor design on Nexys 3 Spartan FPGA Board
Customizable Microprocessor design on Nexys 3 Spartan FPGA Board
 
Report (2)
Report (2)Report (2)
Report (2)
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 

ARMv7-M MPU (Memory Protection Unit) XN example