SlideShare a Scribd company logo
Security issues
with ARM TrustZone
Andrii Grygoriev
Samsung R&D Institute Ukraine
About me
Andrii Grygoriev
Sr. Engineer
Samsung R&D Institute Ukraine
MSc “Information security in computer systems
and networks”, KNURE, 2010
Samsung, Mobile Security Team, 2015 - now
Major responsibilities:
- software development for ARM TrustZone,
embedded secure element
- security assessment
Agenda
• Motivation
• Briefly about ARM TrustZone
– Example of assets that require protection
– ARM TrustZone
• Review of public CVEs
• Conclusion
Motivation
• Increase awareness of the ARM TrustZone
• Prevent developers from making typical mistakes
• Attract attention to proprietary TEE solutions
ARM TrustZone
• Set of security extensions (present
since in ARMv6)
• Two virtual worlds:
• Normal World (REE)
• Secure World (TEE)
• Sensitive assets isolation from REE
• Small Trusted Computing Base
EXAMPLES OF ASSETS TO
BE PROTECTED ON THE
SMARTPHONE
Asset: fingerprint
Personal data protection: e.g. protect user’s fingerprint from malware
Source: https://arstechnica.com/information-technology/2015/08/severe-weaknesses-in-android-handsets-could-leak-user-fingerprints/
X
NWd SWd
Asset: content
Content provider’s data protection on a user’s device from illegal copying
NWd SWd
Asset: system
Rich OS kernel protection (e.g. Samsung TIMA RKP)
ARM TrustZone
ARM TrustZone architecture is based on:
• AXI Bus
• ARM Core
• TrustZone Address Space Controller (TZASC)
• TrustZone Protection Controller (TZPC)
Protecting memory
and peripherals
ARM
CPU Core
DDR
Touch
Controller
TZASC TZPC
AMBA3 AXI BUS
Crypto
Engine
Communication between
REE and TEE
• CPU Registers
• Shared memory between worlds
REE TEE
Shared
Memory
non-Secure
Memory
Secure Memory
R0, R1-R6
Secure World privileges
Normal World Secure World
TZASC, TZPC, TZIC none yes
Physical memory only non-Secure any
Peripherals only non-Secure any
Registers non-Secure any
Security goals
• Secure world software MUST be protected against
attacks
• Secure world resources MUST be isolated from
Normal world
• Trusted applications MUST be isolated from each
other
• Secure kernel MUST be isolated from trusted
applications
Threats
• Sensitive information leak from Secure world
– Side channel attacks
– World shared buffer
– Debug logs
– Identifiers, handles
• Un-authorized code execution in Secure world
– Bypass signature verification
– Exploit software vulnerability
Threats (cont.)
• Privilege escalation within Secure world
– Elevate privileges from TA to the kernel
– TA breaks
• End user’s privacy violation
– Spying software in TrustZone
– Breaking disk encryption
– Stealing cryptographic keys
TEE app design assumptions
• REE is untrusted
• TA’s are mutually untrusted
• TEE kernel is trusted
Most popular TEE OSes
• Trustonic (Kinibi OS, ex. Mobicore/t-base/G&D)
[https://www.trustonic.com/]
• Qualcomm (QTEE, ex. QSEE)
[https://www.qualcomm.com/solutions/mobile-computing/features/security]
• Samsung (Teegris)
[http://developer.samsung.com/teegris]
• Huawei (TrustedCore)
[http://developer.huawei.com/consumer/cn/wiki/index.php?title=TrustedCore_%E4%B8%9A%E5%8A%A1%E4%BB%8B%E7%BB%8D]
• Linaro (OP-TEE OS)
[https://www.op-tee.org/]
• Google (Trusty)
[https://source.android.com/security/trusty/]
Common mistakes
• Missing or incorrect verification of data on security
boundaries
• Enabled debug functionality in release (e.g. unlock
bootloader)
• TOCTOU (Time Of Check Time Of Use)
• Leak of sensitive information (e.g. keys, addresses,
etc.)
• Incorrect usage of API (e.g. TEE, Crypto, etc.)
Real world examples
• Huawei Trusted Core – CVE-2015-4421,
CVE-2015-4422
• Motorola bootloader unlock
• Vuln. in HTC TZBSP custom API
• QSEE kernel vulnerability
Huawei TrustedCore
Target description:
• Huawei Ascend Mate7-TL10
• HiSilicon Kirin 925 SoC
• Trusted Core
• Android
Protection mechanisms in
TrustedCore OS:
• KASLRASLR – NO
• CODE SECTION – RWX
• DEP – NO
• Stack canaries – NO
Source: https://www.blackhat.com/docs/us-15/materials/us-15-Shen-Attacking-Your-Trusted-Core-Exploiting-Trustzone-On-Android.pdf
Overall Architecture
Normal World
Client Application
Secure World
TZDriver(/dev/tc_ns_client) RTOSck(kernel) Fingerprint driver
GlobalTask TA_Fingerprint TA_SecStorage
TA TA TA
Secure Kernel-space
Secure User-space
Kernel-space
User-space
GlobalTask vulnerability
CVE-2015-4421
• GlobalTask exposes get_sys_time function to
Normal World
• get_sys_time accepts destination physical address
• input address is not verified to be non-secure
memory
• allows to write arbitrary data at arbitrary address
accessible by GlobalTask (not kernel memory)
GlobalTask vulnerable code
TrustedCore kernel vulnerability
CVE-2015-4422
• TrustedCore kernel exposes some syscall which
accepts source and destination addresses
• Missing check of input argument
• Allows attacker to modify TrustedCore kernel
memory with arbitrary data
TrustedCore Kernel vulnerability
Motorola bootloader unlock
Target description:
• Motorola Razr HD, M
• Qualcomm MSM8960
• QSEE
• Android
Source: http://blog.azimuthsecurity.com/2013/04/unlocking-motorola-bootloader.html
Motorola SMC Handler
HTC TZBSP Extension
Target description:
• HTC One M7/XL
• Qualcomm MSM8960/8974
• QSEE
• Android
Protection mechanisms in
TrustedCore OS:
• KASLRASLR – NO
• CODE SECTION – RWX
• DEP – NO
• Memory mapped 1:1
HTC TZBSP Customization
HTC extended TZBSP with functions like this:
• tzbsp_oem_do_something
• tzbsp_oem_enc
• tzbsp_oem_get_rand
• tzbsp_oem_log_operator
• tzbsp_oem_hash
• tzbsp_oem_set_simlock_retry
• tzbsp_oem_get_security_level
• tzbsp_oem_verify_bootloader
• tzbsp_oem_aes
HTC TZBSP Customization
[tzbsp_oem_discretix]
• no input arguments validation
• it is possible to overwrite arbitrary memory with zero
HTC TZBSP Customization
[tzbsp_oem_memcpy]
ZERO opcode on ARM32 is NOP
• 00 00 = MOV r0, r0
• 00 00 00 00 = ANDEQ r0, r0, r0
Since the body of that function is writable
attacker can simply overwrite all checks with
NOPs using tzbsp_oem_discretix function.
As a result, this function turns into memcpy.
QSEE Kernel Vulnerability
Target description:
• Nexus 5
• Qualcomm MSM8974
• QSEE
• Android
QSEE Kernel Vulnerability
[tzbsp_es_is_activated]
• no input arguments validation
• allows to zeroize any writable memory
Boomerang
by ucsb-seclab
Source: https://github.com/ucsb-seclab/boomerang
Boomerang
• NWd and SWd have independent mappings
• SWd has access to any physical memory
• NWd provides physical address of memory for
processing (e.g. buffer to encrypt, destination
buffer)
• Security issue: NWd can trigger SWd to access
target memory, e.g., user-space application can
trigger SWd to modify kernel memory
Boomerang flaw
Boomerang flaw
TEE Name Vendor Impact Bug Details
TrustedCore Huawei Arbitrary write CVE-2016-8762
QSEE Qualcomm Arbitrary write CVE-2016-5349
Trustonic As used by Samsung Arbitrary write PZ-962
Sierra TEE Sierraware Arbitrary write No resposne from
vendor
OP-TEE Linaro Write to other
application’s memory
Github issues 13,14
Conclusions
• If software is executed in Secure World – it doesn’t
mean the software is secured
• TCB is huge and it’s expanding
• Lack of security countermeasures results in easier
exploitation vulnerability in Secure World software
than in Rich OS
• Code execution in TEE gives full control over NWd
• TrustZone is becoming an attractive target for attackers
Questions?
Thank you

More Related Content

What's hot

Applying Memory Forensics to Rootkit Detection
Applying Memory Forensics to Rootkit DetectionApplying Memory Forensics to Rootkit Detection
Applying Memory Forensics to Rootkit Detection
Igor Korkin
 
Leave me alone; app level protection against runtime information gathering on...
Leave me alone; app level protection against runtime information gathering on...Leave me alone; app level protection against runtime information gathering on...
Leave me alone; app level protection against runtime information gathering on...
Joon Young Park
 
RISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzakiRISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzaki
Kuniyasu Suzaki
 
SCADA StrangeLove 2: We already know
SCADA StrangeLove 2:  We already knowSCADA StrangeLove 2:  We already know
SCADA StrangeLove 2: We already know
qqlan
 
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
KTN
 
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected ProcessesNSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NoSuchCon
 

What's hot (6)

Applying Memory Forensics to Rootkit Detection
Applying Memory Forensics to Rootkit DetectionApplying Memory Forensics to Rootkit Detection
Applying Memory Forensics to Rootkit Detection
 
Leave me alone; app level protection against runtime information gathering on...
Leave me alone; app level protection against runtime information gathering on...Leave me alone; app level protection against runtime information gathering on...
Leave me alone; app level protection against runtime information gathering on...
 
RISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzakiRISC-V-Day-Tokyo2018-suzaki
RISC-V-Day-Tokyo2018-suzaki
 
SCADA StrangeLove 2: We already know
SCADA StrangeLove 2:  We already knowSCADA StrangeLove 2:  We already know
SCADA StrangeLove 2: We already know
 
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
Digital Security by Design: Physical Unclonable Functions - Gavin McWilliams,...
 
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected ProcessesNSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
NSC #2 - D3 05 - Alex Ionescu- Breaking Protected Processes
 

Similar to 6 andrii grygoriev - security issues in arm trust zone software

Review of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptxReview of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptx
ssusere142fe
 
Implementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile WorldImplementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile World
LINE Corporation
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
Linaro
 
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Riscure
 
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls shortEuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
Cristofaro Mune
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentation
CHIACHE lee
 
Top 10 secure boot mistakes
Top 10 secure boot mistakesTop 10 secure boot mistakes
Top 10 secure boot mistakes
Justin Black
 
Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
National Cheng Kung University
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kuniyasu Suzaki
 
HiPEAC 2022_Marcelo Pasin presentation
HiPEAC 2022_Marcelo Pasin presentationHiPEAC 2022_Marcelo Pasin presentation
HiPEAC 2022_Marcelo Pasin presentation
VEDLIoT Project
 
[若渴] Preliminary Study on Design and Exploitation of Trustzone
[若渴] Preliminary Study on Design and Exploitation of Trustzone[若渴] Preliminary Study on Design and Exploitation of Trustzone
[若渴] Preliminary Study on Design and Exploitation of Trustzone
Aj MaChInE
 
Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)
Security Weekly
 
iOS application (in)security
iOS application (in)securityiOS application (in)security
iOS application (in)security
iphonepentest
 
Brief Tour about Android Security
Brief Tour about Android SecurityBrief Tour about Android Security
Brief Tour about Android Security
National Cheng Kung University
 
Virtue Security - The Art of Mobile Security 2013
Virtue Security - The Art of Mobile Security 2013Virtue Security - The Art of Mobile Security 2013
Virtue Security - The Art of Mobile Security 2013
Virtue Security
 
Next Generation Embedded Systems Security for IOT: Powered by Kaspersky
Next Generation Embedded Systems Security for IOT:  Powered by KasperskyNext Generation Embedded Systems Security for IOT:  Powered by Kaspersky
Next Generation Embedded Systems Security for IOT: Powered by Kaspersky
L. Duke Golden
 
Kl iot cebit_dg_200317_finalmktg
Kl iot cebit_dg_200317_finalmktgKl iot cebit_dg_200317_finalmktg
Kl iot cebit_dg_200317_finalmktg
L. Duke Golden
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android Data
Michael Smith
 
An overview of the samsung knox platform v1 14
An overview of the samsung knox platform v1 14An overview of the samsung knox platform v1 14
An overview of the samsung knox platform v1 14
Javier Gonzalez
 
HKUST Security Lab Opening Ceremony
HKUST Security Lab Opening CeremonyHKUST Security Lab Opening Ceremony
HKUST Security Lab Opening Ceremony
Kelvin Chan
 

Similar to 6 andrii grygoriev - security issues in arm trust zone software (20)

Review of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptxReview of Hardware based solutions for trusted cloud computing.pptx
Review of Hardware based solutions for trusted cloud computing.pptx
 
Implementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile WorldImplementing Trusted Endpoints in the Mobile World
Implementing Trusted Endpoints in the Mobile World
 
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEEBKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
BKK16-110 A Gentle Introduction to Trusted Execution and OP-TEE
 
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...Secure initialization of Trusted Execution Environments: When Secure Boot fal...
Secure initialization of Trusted Execution Environments: When Secure Boot fal...
 
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls shortEuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
EuskalHack 2017 - Secure initialization of TEEs: when secure boot falls short
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentation
 
Top 10 secure boot mistakes
Top 10 secure boot mistakesTop 10 secure boot mistakes
Top 10 secure boot mistakes
 
Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
 
HiPEAC 2022_Marcelo Pasin presentation
HiPEAC 2022_Marcelo Pasin presentationHiPEAC 2022_Marcelo Pasin presentation
HiPEAC 2022_Marcelo Pasin presentation
 
[若渴] Preliminary Study on Design and Exploitation of Trustzone
[若渴] Preliminary Study on Design and Exploitation of Trustzone[若渴] Preliminary Study on Design and Exploitation of Trustzone
[若渴] Preliminary Study on Design and Exploitation of Trustzone
 
Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)
 
iOS application (in)security
iOS application (in)securityiOS application (in)security
iOS application (in)security
 
Brief Tour about Android Security
Brief Tour about Android SecurityBrief Tour about Android Security
Brief Tour about Android Security
 
Virtue Security - The Art of Mobile Security 2013
Virtue Security - The Art of Mobile Security 2013Virtue Security - The Art of Mobile Security 2013
Virtue Security - The Art of Mobile Security 2013
 
Next Generation Embedded Systems Security for IOT: Powered by Kaspersky
Next Generation Embedded Systems Security for IOT:  Powered by KasperskyNext Generation Embedded Systems Security for IOT:  Powered by Kaspersky
Next Generation Embedded Systems Security for IOT: Powered by Kaspersky
 
Kl iot cebit_dg_200317_finalmktg
Kl iot cebit_dg_200317_finalmktgKl iot cebit_dg_200317_finalmktg
Kl iot cebit_dg_200317_finalmktg
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android Data
 
An overview of the samsung knox platform v1 14
An overview of the samsung knox platform v1 14An overview of the samsung knox platform v1 14
An overview of the samsung knox platform v1 14
 
HKUST Security Lab Opening Ceremony
HKUST Security Lab Opening CeremonyHKUST Security Lab Opening Ceremony
HKUST Security Lab Opening Ceremony
 

More from Ievgenii Katsan

8 andrew kalyuzhin - 30 ux-advices, that will make users love you
8   andrew kalyuzhin - 30 ux-advices, that will make users love you8   andrew kalyuzhin - 30 ux-advices, that will make users love you
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
Ievgenii Katsan
 
5 hans van loenhoud - master-class the 7 skills of highly successful teams
5   hans van loenhoud - master-class the 7 skills of highly successful teams5   hans van loenhoud - master-class the 7 skills of highly successful teams
5 hans van loenhoud - master-class the 7 skills of highly successful teams
Ievgenii Katsan
 
4 alexey orlov - life of product in startup and enterprise
4   alexey orlov - life of product in startup and enterprise4   alexey orlov - life of product in startup and enterprise
4 alexey orlov - life of product in startup and enterprise
Ievgenii Katsan
 
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
3   dmitry gomeniuk - how to make data-driven decisions in saa s products3   dmitry gomeniuk - how to make data-driven decisions in saa s products
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
Ievgenii Katsan
 
7 hans van loenhoud - the problem-goal-solution trinity
7   hans van loenhoud - the problem-goal-solution trinity7   hans van loenhoud - the problem-goal-solution trinity
7 hans van loenhoud - the problem-goal-solution trinity
Ievgenii Katsan
 
1 hans van loenhoud -
1   hans van loenhoud - 1   hans van loenhoud -
1 hans van loenhoud -
Ievgenii Katsan
 
3 denys gobov - change request specification the knowledge base or the task...
3   denys gobov - change request specification the knowledge base or the task...3   denys gobov - change request specification the knowledge base or the task...
3 denys gobov - change request specification the knowledge base or the task...
Ievgenii Katsan
 
5 victoria cupet - learn to play business analysis
5   victoria cupet - learn to play business analysis5   victoria cupet - learn to play business analysis
5 victoria cupet - learn to play business analysis
Ievgenii Katsan
 
5 alina petrenko - key requirements elicitation during the first contact wi...
5   alina petrenko - key requirements elicitation during the first contact wi...5   alina petrenko - key requirements elicitation during the first contact wi...
5 alina petrenko - key requirements elicitation during the first contact wi...
Ievgenii Katsan
 
3 karabak kuyavets transformation of business analyst to product owner
3   karabak kuyavets transformation of business analyst to product owner3   karabak kuyavets transformation of business analyst to product owner
3 karabak kuyavets transformation of business analyst to product owner
Ievgenii Katsan
 
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
Ievgenii Katsan
 
3 zornitsa nikolova - the product manager between decision making and facil...
3   zornitsa nikolova - the product manager between decision making and facil...3   zornitsa nikolova - the product manager between decision making and facil...
3 zornitsa nikolova - the product manager between decision making and facil...
Ievgenii Katsan
 
4 viktoriya gudym - how to effectively manage remote employees
4   viktoriya gudym - how to effectively manage remote employees4   viktoriya gudym - how to effectively manage remote employees
4 viktoriya gudym - how to effectively manage remote employees
Ievgenii Katsan
 
9 natali renska - product and outsource development, how to cook 2 meals in...
9   natali renska - product and outsource development, how to cook 2 meals in...9   natali renska - product and outsource development, how to cook 2 meals in...
9 natali renska - product and outsource development, how to cook 2 meals in...
Ievgenii Katsan
 
7 denis parkhomenko - from idea to execution how to make a product that cus...
7   denis parkhomenko - from idea to execution how to make a product that cus...7   denis parkhomenko - from idea to execution how to make a product that cus...
7 denis parkhomenko - from idea to execution how to make a product that cus...
Ievgenii Katsan
 
6 anton vitiaz - inside the mvp in 3 days
6   anton vitiaz - inside the mvp in 3 days6   anton vitiaz - inside the mvp in 3 days
6 anton vitiaz - inside the mvp in 3 days
Ievgenii Katsan
 
5 mariya popova - ideal product management. unicorns in our reality
5   mariya popova - ideal product management. unicorns in our reality5   mariya popova - ideal product management. unicorns in our reality
5 mariya popova - ideal product management. unicorns in our reality
Ievgenii Katsan
 
2 victor podzubanov - design thinking game
2   victor podzubanov - design thinking game2   victor podzubanov - design thinking game
2 victor podzubanov - design thinking game
Ievgenii Katsan
 
3 sergiy potapov - analyst to product owner
3   sergiy potapov - analyst to product owner3   sergiy potapov - analyst to product owner
3 sergiy potapov - analyst to product owner
Ievgenii Katsan
 
4 anton parkhomenko - how to make effective user research with no budget at...
4   anton parkhomenko - how to make effective user research with no budget at...4   anton parkhomenko - how to make effective user research with no budget at...
4 anton parkhomenko - how to make effective user research with no budget at...
Ievgenii Katsan
 

More from Ievgenii Katsan (20)

8 andrew kalyuzhin - 30 ux-advices, that will make users love you
8   andrew kalyuzhin - 30 ux-advices, that will make users love you8   andrew kalyuzhin - 30 ux-advices, that will make users love you
8 andrew kalyuzhin - 30 ux-advices, that will make users love you
 
5 hans van loenhoud - master-class the 7 skills of highly successful teams
5   hans van loenhoud - master-class the 7 skills of highly successful teams5   hans van loenhoud - master-class the 7 skills of highly successful teams
5 hans van loenhoud - master-class the 7 skills of highly successful teams
 
4 alexey orlov - life of product in startup and enterprise
4   alexey orlov - life of product in startup and enterprise4   alexey orlov - life of product in startup and enterprise
4 alexey orlov - life of product in startup and enterprise
 
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
3   dmitry gomeniuk - how to make data-driven decisions in saa s products3   dmitry gomeniuk - how to make data-driven decisions in saa s products
3 dmitry gomeniuk - how to make data-driven decisions in saa s products
 
7 hans van loenhoud - the problem-goal-solution trinity
7   hans van loenhoud - the problem-goal-solution trinity7   hans van loenhoud - the problem-goal-solution trinity
7 hans van loenhoud - the problem-goal-solution trinity
 
1 hans van loenhoud -
1   hans van loenhoud - 1   hans van loenhoud -
1 hans van loenhoud -
 
3 denys gobov - change request specification the knowledge base or the task...
3   denys gobov - change request specification the knowledge base or the task...3   denys gobov - change request specification the knowledge base or the task...
3 denys gobov - change request specification the knowledge base or the task...
 
5 victoria cupet - learn to play business analysis
5   victoria cupet - learn to play business analysis5   victoria cupet - learn to play business analysis
5 victoria cupet - learn to play business analysis
 
5 alina petrenko - key requirements elicitation during the first contact wi...
5   alina petrenko - key requirements elicitation during the first contact wi...5   alina petrenko - key requirements elicitation during the first contact wi...
5 alina petrenko - key requirements elicitation during the first contact wi...
 
3 karabak kuyavets transformation of business analyst to product owner
3   karabak kuyavets transformation of business analyst to product owner3   karabak kuyavets transformation of business analyst to product owner
3 karabak kuyavets transformation of business analyst to product owner
 
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...4   andrii melnykov - stakeholder management for pd ms and b-as and why it is...
4 andrii melnykov - stakeholder management for pd ms and b-as and why it is...
 
3 zornitsa nikolova - the product manager between decision making and facil...
3   zornitsa nikolova - the product manager between decision making and facil...3   zornitsa nikolova - the product manager between decision making and facil...
3 zornitsa nikolova - the product manager between decision making and facil...
 
4 viktoriya gudym - how to effectively manage remote employees
4   viktoriya gudym - how to effectively manage remote employees4   viktoriya gudym - how to effectively manage remote employees
4 viktoriya gudym - how to effectively manage remote employees
 
9 natali renska - product and outsource development, how to cook 2 meals in...
9   natali renska - product and outsource development, how to cook 2 meals in...9   natali renska - product and outsource development, how to cook 2 meals in...
9 natali renska - product and outsource development, how to cook 2 meals in...
 
7 denis parkhomenko - from idea to execution how to make a product that cus...
7   denis parkhomenko - from idea to execution how to make a product that cus...7   denis parkhomenko - from idea to execution how to make a product that cus...
7 denis parkhomenko - from idea to execution how to make a product that cus...
 
6 anton vitiaz - inside the mvp in 3 days
6   anton vitiaz - inside the mvp in 3 days6   anton vitiaz - inside the mvp in 3 days
6 anton vitiaz - inside the mvp in 3 days
 
5 mariya popova - ideal product management. unicorns in our reality
5   mariya popova - ideal product management. unicorns in our reality5   mariya popova - ideal product management. unicorns in our reality
5 mariya popova - ideal product management. unicorns in our reality
 
2 victor podzubanov - design thinking game
2   victor podzubanov - design thinking game2   victor podzubanov - design thinking game
2 victor podzubanov - design thinking game
 
3 sergiy potapov - analyst to product owner
3   sergiy potapov - analyst to product owner3   sergiy potapov - analyst to product owner
3 sergiy potapov - analyst to product owner
 
4 anton parkhomenko - how to make effective user research with no budget at...
4   anton parkhomenko - how to make effective user research with no budget at...4   anton parkhomenko - how to make effective user research with no budget at...
4 anton parkhomenko - how to make effective user research with no budget at...
 

Recently uploaded

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 

Recently uploaded (20)

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 

6 andrii grygoriev - security issues in arm trust zone software

  • 1. Security issues with ARM TrustZone Andrii Grygoriev Samsung R&D Institute Ukraine
  • 2. About me Andrii Grygoriev Sr. Engineer Samsung R&D Institute Ukraine MSc “Information security in computer systems and networks”, KNURE, 2010 Samsung, Mobile Security Team, 2015 - now Major responsibilities: - software development for ARM TrustZone, embedded secure element - security assessment
  • 3. Agenda • Motivation • Briefly about ARM TrustZone – Example of assets that require protection – ARM TrustZone • Review of public CVEs • Conclusion
  • 4. Motivation • Increase awareness of the ARM TrustZone • Prevent developers from making typical mistakes • Attract attention to proprietary TEE solutions
  • 5. ARM TrustZone • Set of security extensions (present since in ARMv6) • Two virtual worlds: • Normal World (REE) • Secure World (TEE) • Sensitive assets isolation from REE • Small Trusted Computing Base
  • 6. EXAMPLES OF ASSETS TO BE PROTECTED ON THE SMARTPHONE
  • 7. Asset: fingerprint Personal data protection: e.g. protect user’s fingerprint from malware Source: https://arstechnica.com/information-technology/2015/08/severe-weaknesses-in-android-handsets-could-leak-user-fingerprints/ X NWd SWd
  • 8. Asset: content Content provider’s data protection on a user’s device from illegal copying NWd SWd
  • 9. Asset: system Rich OS kernel protection (e.g. Samsung TIMA RKP)
  • 10. ARM TrustZone ARM TrustZone architecture is based on: • AXI Bus • ARM Core • TrustZone Address Space Controller (TZASC) • TrustZone Protection Controller (TZPC)
  • 11. Protecting memory and peripherals ARM CPU Core DDR Touch Controller TZASC TZPC AMBA3 AXI BUS Crypto Engine
  • 12. Communication between REE and TEE • CPU Registers • Shared memory between worlds REE TEE Shared Memory non-Secure Memory Secure Memory R0, R1-R6
  • 13. Secure World privileges Normal World Secure World TZASC, TZPC, TZIC none yes Physical memory only non-Secure any Peripherals only non-Secure any Registers non-Secure any
  • 14. Security goals • Secure world software MUST be protected against attacks • Secure world resources MUST be isolated from Normal world • Trusted applications MUST be isolated from each other • Secure kernel MUST be isolated from trusted applications
  • 15. Threats • Sensitive information leak from Secure world – Side channel attacks – World shared buffer – Debug logs – Identifiers, handles • Un-authorized code execution in Secure world – Bypass signature verification – Exploit software vulnerability
  • 16. Threats (cont.) • Privilege escalation within Secure world – Elevate privileges from TA to the kernel – TA breaks • End user’s privacy violation – Spying software in TrustZone – Breaking disk encryption – Stealing cryptographic keys
  • 17. TEE app design assumptions • REE is untrusted • TA’s are mutually untrusted • TEE kernel is trusted
  • 18. Most popular TEE OSes • Trustonic (Kinibi OS, ex. Mobicore/t-base/G&D) [https://www.trustonic.com/] • Qualcomm (QTEE, ex. QSEE) [https://www.qualcomm.com/solutions/mobile-computing/features/security] • Samsung (Teegris) [http://developer.samsung.com/teegris] • Huawei (TrustedCore) [http://developer.huawei.com/consumer/cn/wiki/index.php?title=TrustedCore_%E4%B8%9A%E5%8A%A1%E4%BB%8B%E7%BB%8D] • Linaro (OP-TEE OS) [https://www.op-tee.org/] • Google (Trusty) [https://source.android.com/security/trusty/]
  • 19. Common mistakes • Missing or incorrect verification of data on security boundaries • Enabled debug functionality in release (e.g. unlock bootloader) • TOCTOU (Time Of Check Time Of Use) • Leak of sensitive information (e.g. keys, addresses, etc.) • Incorrect usage of API (e.g. TEE, Crypto, etc.)
  • 20. Real world examples • Huawei Trusted Core – CVE-2015-4421, CVE-2015-4422 • Motorola bootloader unlock • Vuln. in HTC TZBSP custom API • QSEE kernel vulnerability
  • 21. Huawei TrustedCore Target description: • Huawei Ascend Mate7-TL10 • HiSilicon Kirin 925 SoC • Trusted Core • Android Protection mechanisms in TrustedCore OS: • KASLRASLR – NO • CODE SECTION – RWX • DEP – NO • Stack canaries – NO Source: https://www.blackhat.com/docs/us-15/materials/us-15-Shen-Attacking-Your-Trusted-Core-Exploiting-Trustzone-On-Android.pdf
  • 22. Overall Architecture Normal World Client Application Secure World TZDriver(/dev/tc_ns_client) RTOSck(kernel) Fingerprint driver GlobalTask TA_Fingerprint TA_SecStorage TA TA TA Secure Kernel-space Secure User-space Kernel-space User-space
  • 23. GlobalTask vulnerability CVE-2015-4421 • GlobalTask exposes get_sys_time function to Normal World • get_sys_time accepts destination physical address • input address is not verified to be non-secure memory • allows to write arbitrary data at arbitrary address accessible by GlobalTask (not kernel memory)
  • 25. TrustedCore kernel vulnerability CVE-2015-4422 • TrustedCore kernel exposes some syscall which accepts source and destination addresses • Missing check of input argument • Allows attacker to modify TrustedCore kernel memory with arbitrary data
  • 27. Motorola bootloader unlock Target description: • Motorola Razr HD, M • Qualcomm MSM8960 • QSEE • Android
  • 29. HTC TZBSP Extension Target description: • HTC One M7/XL • Qualcomm MSM8960/8974 • QSEE • Android Protection mechanisms in TrustedCore OS: • KASLRASLR – NO • CODE SECTION – RWX • DEP – NO • Memory mapped 1:1
  • 30. HTC TZBSP Customization HTC extended TZBSP with functions like this: • tzbsp_oem_do_something • tzbsp_oem_enc • tzbsp_oem_get_rand • tzbsp_oem_log_operator • tzbsp_oem_hash • tzbsp_oem_set_simlock_retry • tzbsp_oem_get_security_level • tzbsp_oem_verify_bootloader • tzbsp_oem_aes
  • 31. HTC TZBSP Customization [tzbsp_oem_discretix] • no input arguments validation • it is possible to overwrite arbitrary memory with zero
  • 32. HTC TZBSP Customization [tzbsp_oem_memcpy] ZERO opcode on ARM32 is NOP • 00 00 = MOV r0, r0 • 00 00 00 00 = ANDEQ r0, r0, r0 Since the body of that function is writable attacker can simply overwrite all checks with NOPs using tzbsp_oem_discretix function. As a result, this function turns into memcpy.
  • 33. QSEE Kernel Vulnerability Target description: • Nexus 5 • Qualcomm MSM8974 • QSEE • Android
  • 34. QSEE Kernel Vulnerability [tzbsp_es_is_activated] • no input arguments validation • allows to zeroize any writable memory
  • 36. Boomerang • NWd and SWd have independent mappings • SWd has access to any physical memory • NWd provides physical address of memory for processing (e.g. buffer to encrypt, destination buffer) • Security issue: NWd can trigger SWd to access target memory, e.g., user-space application can trigger SWd to modify kernel memory
  • 38. Boomerang flaw TEE Name Vendor Impact Bug Details TrustedCore Huawei Arbitrary write CVE-2016-8762 QSEE Qualcomm Arbitrary write CVE-2016-5349 Trustonic As used by Samsung Arbitrary write PZ-962 Sierra TEE Sierraware Arbitrary write No resposne from vendor OP-TEE Linaro Write to other application’s memory Github issues 13,14
  • 39. Conclusions • If software is executed in Secure World – it doesn’t mean the software is secured • TCB is huge and it’s expanding • Lack of security countermeasures results in easier exploitation vulnerability in Secure World software than in Rich OS • Code execution in TEE gives full control over NWd • TrustZone is becoming an attractive target for attackers