Android Security 
Development 
SEAN
Android Security Development
Android Security Development
Sean 
• Developer 
• Developer 
• Developer
Something you need to know 
• USB 
• Screen 
• Clipboard 
• Permission 
• Database 
• Network 
• Cryptography 
• API Management
USB
ANDROID:ALLOWBACKUP = "FALSE"
ANDROID:ALLOWBACKUP = "TRUE" 
It will allow someone can backup databases and 
preferences.
ANDROID:DEBUGGABLE = "FALSE"
ANDROID:DEBUGGABLE = "TRUE" 
It will let someone can see log message and do 
something more …
IF ANDROID:DEBUGGABLE MAKE ERROR 
NOTIFICATION IN ECLIPSE, IT IS ALL ABOUT 
ADT LINT.
CLICK ON "PROBLEMS" TAB
RIGHT CLICK ON ITEM 
AND CHOOSE "QUICK FIX"
CHOOSE "DISABLE CHECK"
SCREEN
GETWINDOW().SETFLAGS(LAYOUTPARAMS.F 
LAG_SECURE, 
LAYOUTPARAMS.FLAG_SECURE); 
It disable screen capture 
• [POWER] + [VOL-DWN] 
• OEM feature like SAMSUNG / HTC
CLIPBOARD
SAVE THE STATE OF APPLICATION 
onResume => FOREGROUND 
onPause => BACKGROUND
USE RUNNABLE AND POSTDELAYED 500 MS 
when onPause is triggered
DETECT STATE AND SETPRIMARYCLIP 
If STATE equals BACKGROUND, execute 
BaseActivity.this.mClipboardManager 
.setPrimaryClip(ClipData.newPlainText("", ""));
PERMISSION
ONLY USE NECESSARY PERMISSIONS
GOOGLE CLOUD MESSAGING 
NEEDS 
ANDROID.PERMISSION.GET_ACCOUNTS
BUT
GOOGLE CLOUD MESSAGING 
NEEDS 
ANDROID.PERMISSION.GET_ACCOUNTS
Database
SQLITE
SQLCipher 
https://www.zetetic.net/sqlcipher/open-source
SQLite Encryption Extension 
http://www.sqlite.org/see/
NETWORK
USE HTTPS WITH SELF-SIGNED CERTIFICATE
BUT
SOMETHING IGNORED ?
HOSTNAME IS VALID ?
VERIFY HOSTNAME
CHECK CERT ?
CLEAR KEYSTORE AND IMPORT SERVER CERT
DOUBLE CHECK CERT ?
VERIFY BINARY CONTENT OF SERVER CERT 
Avoid Man-in-the-Middle attack
WHY ?
SSL MECHANISM IN OS MAY BE WRONG 
APPLE SSL / TLS Bug ( CVE-2014-1266 )
SSL TUNNEL KEEP DATA SAFE ?
NO
YOU STILL NEED ENCRYPT DATA
Android Security Development
DO NOT DO THIS
Android Security Development
CRYPTOGRAPHY
BY ANDROID SDK OR ANDROID NDK ?
ANDROID SDK: JAVA 
DECOMPILE EASY 
ANALYSIS EASY
ANDROID NDK: C AND C++ 
DISASSEMBLE EASY 
ANALYSIS HARD
ANDROID NDK 
OpenSSL Inside
ANDROID NDK 
Customize ?
ANDROID NDK 
PolarSSL 
https://polarssl.org
PolarSSL 
Chang SBOX of AES, ...
SO, ALL KEY GENERATION AND ENCRYPTION MUST 
BE DONE IN ANDROID NDK
EVERYTHING DONE ?
GENERATE KEY ?
RANDOM 
KEY 
HARDWARE 
ID 
USER 
KEY
RANDOM KEY 
One Key – One Encryption
HARDWARE ID 
IMEI / MEID 
WIFI MAC Address 
Bluetooth Address
IMEI / MEID 
ANDROID.PERMISSION.READ_PHONE_STATE 
WIFI MAC Address 
ANDROID.PERMISSION.ACCESS_WIFI_STATE 
Bluetooth Address 
ANDROID.PERMISSION.BLUETOOTH
USER KEY 
Input from user 
Only exist in memory 
Just clear when exit
ONLY CIPHERTEXT ?
SCRAMBLED CIPHERTEXT 
CIPHERTEXT
SCRAMBLE ?
MORE COMPLEX THAN BASE64 
WIKI: Common Scrambling Algorithm 
http://goo.gl/eP6lXj
THEN ?
Android Security Development
Android Security Development
GG
API MANAGEMENT
ACCESS TOKEN 
REFRESH PERIODICALLY 
RANDOM GENERATE
ACCESS TOKEN
ACCESS TOKEN 
↓ 
USER ID
ACCESS TOKEN 
↓ 
USER ID 
↓ 
HARDWARE ID
ACCESS TOKEN 
↓ 
USER ID 
↓ 
HARDWARE ID 
↓ 
ENCRYPT OR DECRYPT
ALL API ACCESS MUST WITH ACCESS TOKEN
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development
Android Security Development

More Related Content

PDF
2015.04.24 Updated > Android Security Development - Part 1: App Development
PDF
Android Security
PPTX
Android Security
PDF
Deep Dive Into Android Security
PDF
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
PDF
Introduction to Android Development and Security
PPTX
Android security
PPT
Analysis and research of system security based on android
2015.04.24 Updated > Android Security Development - Part 1: App Development
Android Security
Android Security
Deep Dive Into Android Security
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Introduction to Android Development and Security
Android security
Analysis and research of system security based on android

What's hot (20)

PPTX
Android security
PPTX
Pentesting Android Applications
PPT
Android Security
PDF
Android Security - Common Security Pitfalls in Android Applications
PDF
Android system security
PDF
Android Security
PPTX
Android sandbox
PPTX
Android Device Hardening
PDF
Andriod Pentesting and Malware Analysis
ODP
Android security in depth
PDF
Mobile Application Pentest [Fast-Track]
PPTX
Hacker Halted 2014 - Reverse Engineering the Android OS
PPTX
Security threats in Android OS + App Permissions
PDF
Hacking your Android (slides)
PDF
Hacking android apps by srini0x00
PPTX
Permission in Android Security: Threats and solution
PDF
Смирнов Александр, Security in Android Application
PDF
Android Security Overview and Safe Practices for Web-Based Android Applications
PDF
Pentesting Mobile Applications (Prashant Verma)
PDF
Android security - an enterprise perspective
Android security
Pentesting Android Applications
Android Security
Android Security - Common Security Pitfalls in Android Applications
Android system security
Android Security
Android sandbox
Android Device Hardening
Andriod Pentesting and Malware Analysis
Android security in depth
Mobile Application Pentest [Fast-Track]
Hacker Halted 2014 - Reverse Engineering the Android OS
Security threats in Android OS + App Permissions
Hacking your Android (slides)
Hacking android apps by srini0x00
Permission in Android Security: Threats and solution
Смирнов Александр, Security in Android Application
Android Security Overview and Safe Practices for Web-Based Android Applications
Pentesting Mobile Applications (Prashant Verma)
Android security - an enterprise perspective
Ad

Viewers also liked (20)

PDF
SQL injection duplicate error principle
PDF
Web2.0 attack and defence
PDF
新手無痛入門Apk逆向
PDF
Python 網頁爬蟲由淺入淺
PDF
Rootkit 101
PDF
Algo/Crypto about CTF
PDF
ROP 輕鬆談
PDF
Dvwa low level
PDF
cmd injection
PPT
Php lfi rfi掃盲大補帖
PDF
Antivirus Bypass
PDF
調試器原理與架構
PDF
Crawler
PDF
Webshell 簡單應用
PDF
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
PDF
Testing Android Security Codemotion Amsterdam edition
PDF
Brief Tour about Android Security
PPTX
Understanding android security model
PPTX
Breakpoints
PPTX
排隊理論_An Exploration of The Optimization of Executive Scheduling in The Cloud ...
SQL injection duplicate error principle
Web2.0 attack and defence
新手無痛入門Apk逆向
Python 網頁爬蟲由淺入淺
Rootkit 101
Algo/Crypto about CTF
ROP 輕鬆談
Dvwa low level
cmd injection
Php lfi rfi掃盲大補帖
Antivirus Bypass
調試器原理與架構
Crawler
Webshell 簡單應用
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Testing Android Security Codemotion Amsterdam edition
Brief Tour about Android Security
Understanding android security model
Breakpoints
排隊理論_An Exploration of The Optimization of Executive Scheduling in The Cloud ...
Ad

Similar to Android Security Development (20)

PDF
CNIT 128 7. Attacking Android Applications (Part 3)
PPTX
Android secure offline storage - CC Mobile
PPTX
Android secure offline storage - CC Mobile
PPTX
Android Application Penetration Testing - Mohammed Adam
PDF
PPTX
[OWASP Poland Day] Saving private token
PDF
CNIT 128 7. Attacking Android Applications (Part 3)
PDF
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
PDF
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
PPTX
Mobile security
PPTX
Security testing of mobile applications
PDF
9 Writing Secure Android Applications
PDF
Android N Security Overview - Mobile Security Saturday at Ciklum
ODP
Android security in depth - extended
PPTX
Untitled 1
PPTX
How to do Cryptography right in Android Part One
PDF
Denis Zhuchinski Ways of enhancing application security
PDF
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
PDF
Voxxed Days Villnius 2015 - Burning Marshmallows
PDF
Security in Android Applications / Александр Смирнов (RedMadRobot)
CNIT 128 7. Attacking Android Applications (Part 3)
Android secure offline storage - CC Mobile
Android secure offline storage - CC Mobile
Android Application Penetration Testing - Mohammed Adam
[OWASP Poland Day] Saving private token
CNIT 128 7. Attacking Android Applications (Part 3)
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Increasing Android app security for free - Roberto Gassirà, Roberto Piccirill...
Mobile security
Security testing of mobile applications
9 Writing Secure Android Applications
Android N Security Overview - Mobile Security Saturday at Ciklum
Android security in depth - extended
Untitled 1
How to do Cryptography right in Android Part One
Denis Zhuchinski Ways of enhancing application security
SE2016 Android Denis Zhuchinski "Ways of enhancing application security"
Voxxed Days Villnius 2015 - Burning Marshmallows
Security in Android Applications / Александр Смирнов (RedMadRobot)

Recently uploaded (20)

PDF
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
PPTX
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
PDF
Top 10 Project Management Software for Small Teams in 2025.pdf
PDF
SOFTWARE ENGINEERING Software Engineering (3rd Edition) by K.K. Aggarwal & Yo...
PPTX
Folder Lock 10.1.9 Crack With Serial Key
PPTX
Chapter 1 - Transaction Processing and Mgt.pptx
PPTX
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
PDF
What Makes a Great Data Visualization Consulting Service.pdf
PPTX
Presentation - Summer Internship at Samatrix.io_template_2.pptx
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PDF
Crypto Loss And Recovery Guide By Expert Recovery Agency.
PPTX
Human-Computer Interaction for Lecture 2
PPTX
Why 2025 Is the Best Year to Hire Software Developers in India
PPTX
AI Tools Revolutionizing Software Development Workflows
PDF
IT Consulting Services to Secure Future Growth
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PDF
Mobile App Backend Development with WordPress REST API: The Complete eBook
PPTX
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB
PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
Building an Inclusive Web Accessibility Made Simple with Accessibility Analyzer
Independent Consultants’ Biggest Challenges in ERP Projects – and How Apagen ...
Top 10 Project Management Software for Small Teams in 2025.pdf
SOFTWARE ENGINEERING Software Engineering (3rd Edition) by K.K. Aggarwal & Yo...
Folder Lock 10.1.9 Crack With Serial Key
Chapter 1 - Transaction Processing and Mgt.pptx
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
What Makes a Great Data Visualization Consulting Service.pdf
Presentation - Summer Internship at Samatrix.io_template_2.pptx
Comprehensive Guide to Digital Image Processing Concepts and Applications
Crypto Loss And Recovery Guide By Expert Recovery Agency.
Human-Computer Interaction for Lecture 2
Why 2025 Is the Best Year to Hire Software Developers in India
AI Tools Revolutionizing Software Development Workflows
IT Consulting Services to Secure Future Growth
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Mobile App Backend Development with WordPress REST API: The Complete eBook
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
HackYourBrain__UtrechtJUG__11092025.pptx

Android Security Development