SlideShare a Scribd company logo
Mysterious Crypto in Android
Biometrics
Responsible: Mr. Pongsakorn Sommalai
Version (Date): 1.0 (2019-10-02)
Confidentiality class: Public
บจก.สยามถนัดแฮก
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Mr. Pongsakorn (Bongtrop) Sommalai
Penetration Tester
Siam Thanat Hack Company Limited
Whoami
It’s me.
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Overview
3
- Introduction
- Android Biometrics (Authentication) Security
- Android Keystore
- Cryptographic Library in Android
- Biometric Prompt
- Example Applications
- AndroidKeyStore
- The better way (let's discuss)
Introduction
บจก.สยามถนัดแฮก
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
What is Biometrics (Authentication)?
5
http://fintechnews.sg/18096/mobile-payment/singaporeans-interested-in-biometrics-authentication-and-payments/
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Password & PIN
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Password & PIN
000000
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
8
1 2
Celeb’s Opinion
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Today’s Scenario
10
Scenario: The sophisticated threat actors or APT malware with access to the
victim’s device.
Not these:
Android Biometric
Implementation
บจก.สยามถนัดแฮก
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
What is Keystore ?
12
A safe box which can store cryptographic keys.
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
FriendZone Technology and the Trusted Execution Environment (TEE)
13
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
TrustZone Technology and the Trusted Execution Environment (TEE)
14
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
AndroidKeyStore and his Friend
15
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Key Material in AndroidKeyStore
16
- Generate in secure world
- Encrypt in secure world
- Decrypt in secure world
- XXX in secure world
Can you gimme a key? Can you decrypt for me?
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Cryptographic Library in Android
17
https://developer.android.com/guide/topics/security/cryptography
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Biometric Prompt
18
https://android-developers.googleblog.com/2018/06/better-biometrics-in-android-p.html
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #1
19
// For the "insecure" method, the app relies on onAuthenticationSucceeded function being called
btInsecureActivity.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new BiometricPrompt(MainActivity.this, executor, new BiometricPrompt.AuthenticationCallback() {
@Override
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
i = new Intent(MainActivity.this, InsecureActivity.class);
startActivity(i);
}
}).authenticate(promptInfo);
}
});
Let’s play !!
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #1
20
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #2
21
KeyStore + Cryptographic + BiometricPrompt
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #2
22
Generate Key
Init Phrase
Encrypt a Secret Store it Somewhere
Fetch Key
Access Phrase
Authenticate Decrypt a Secret
Secure
World
Secure
World
Secure
World
Only
Object
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #2
23
Take a Look at the Source Code !!
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Interesting Property of a Key
24
- isInsideSecureHardware
- isInvalidatedByBiometricEnrollment
- isUserAuthenticationRequired
- isUserAuthenticationRequirementEnforcedBySecureHardware
- isUserAuthenticationValidWhileOnBody
- userAuthenticationValidityDurationSeconds
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Example Application #SDHMobile
25
Let’s play with this scenario !!
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Store encrypted PIN or TOKEN for authentication.
Is it secure ?
26
Possible Attacks on
AndroidKeyStore
บจก.สยามถนัดแฮก
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
AndroidKeyStore Recap
28
- Generate in secure world
- Encrypt in secure world
- Decrypt in secure world
- XXX in secure world
Can you gimme a key? Can you decrypt it for me?
However, the key must be stored in somewhere right?
The better ways (let’s discuss)
บจก.สยามถนัดแฮก
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Challenge Response Authentication (Symmetric)
30
บจก.สยามถนัดแฮก
Responsible / Version: Mr. Pongsakorn Sommalai / 1.0 (2019-10-02)
Confidentiality class: Public
Challenge Response Authentication (Asymmetric)
31
Q & A
บจก.สยามถนัดแฮก
Contact us:
pentest@sth.sh

More Related Content

PDF
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
Pichaya Morimoto
 
PDF
Securing and Hacking LINE OA Integration
Pichaya Morimoto
 
PDF
Docker Plugin For DevSecOps
Pichaya Morimoto
 
PDF
Web Hacking with Object Deserialization
Pichaya Morimoto
 
PDF
Burp Extender API for Penetration Testing
Pichaya Morimoto
 
PDF
Bug Bounty แบบแมว ๆ
Pichaya Morimoto
 
PDF
Pentest 101 @ Mahanakorn Network Research Laboratory
Pichaya Morimoto
 
PDF
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Pichaya Morimoto
 
ยกระดับศักยภาพของทีม IT Security องค์กรด้วย CTF & Cybersecurity Online Platfo...
Pichaya Morimoto
 
Securing and Hacking LINE OA Integration
Pichaya Morimoto
 
Docker Plugin For DevSecOps
Pichaya Morimoto
 
Web Hacking with Object Deserialization
Pichaya Morimoto
 
Burp Extender API for Penetration Testing
Pichaya Morimoto
 
Bug Bounty แบบแมว ๆ
Pichaya Morimoto
 
Pentest 101 @ Mahanakorn Network Research Laboratory
Pichaya Morimoto
 
Security Misconfiguration (OWASP Top 10 - 2013 - A5)
Pichaya Morimoto
 

More from Pichaya Morimoto (7)

PDF
Exploiting Blind Vulnerabilities
Pichaya Morimoto
 
PDF
From Web Vulnerability to Exploit in 15 minutes
Pichaya Morimoto
 
PDF
Exploiting WebApp Race Condition Vulnerability 101
Pichaya Morimoto
 
PDF
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
Pichaya Morimoto
 
PDF
Vulnerable Active Record: A tale of SQL Injection in PHP Framework
Pichaya Morimoto
 
PDF
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
Pichaya Morimoto
 
PDF
Art of Web Backdoor - Pichaya Morimoto
Pichaya Morimoto
 
Exploiting Blind Vulnerabilities
Pichaya Morimoto
 
From Web Vulnerability to Exploit in 15 minutes
Pichaya Morimoto
 
Exploiting WebApp Race Condition Vulnerability 101
Pichaya Morimoto
 
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
Pichaya Morimoto
 
Vulnerable Active Record: A tale of SQL Injection in PHP Framework
Pichaya Morimoto
 
SQL Injection 101 : It is not just about ' or '1'='1 - Pichaya Morimoto
Pichaya Morimoto
 
Art of Web Backdoor - Pichaya Morimoto
Pichaya Morimoto
 
Ad

Recently uploaded (20)

PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Doc9.....................................
SofiaCollazos
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Software Development Methodologies in 2025
KodekX
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Doc9.....................................
SofiaCollazos
 
Ad

Mysterious Crypto in Android Biometrics