SlideShare a Scribd company logo
1 of 14
How Secure
is an Android
App?
Pedro Tavares
11 September, 2017
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Agenda
● Scenario
● APK - What is it? Is it hackable?
● Sandboxing of Android Processes
● Dalvik VM vs Java VM
● Native vs Non-Native Applications
● CPTs and CPMDs
● Reverse Engineering
● Problem of Hybrid Apps
● Best Practices
● Suggestions
# Agenda
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Agenda: Scenario# Agenda
server-side
client-side
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
APK - What is it? Is it hackable?
Android Package
# Agenda
# APK - What is it?
terminal> unzip edpartners.apk
RE is possible
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Sandboxing of Android
Processes
● Dedicated Virtual Machine (VM)
● Process Isolation (UID)
● Not shared resources
● Kernel protection
# Agenda
# APK - What is it?
# Sandboxing of android ...
Dalvik Virtual
Machine
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Dalvik VM vs Java VM# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
Java Source
Code
Java Byte
Code
Dalvik Byte
Code
Dalvik Executable
Dalvik VM
Java Source
Code
Java Byte
Code
Java Byte Code
Java VM
Java Compiler Java Compiler
Dex Compiler
Ant
Gradle
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Dalvik VM vs Java VM# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
CPTs and CPMDs# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
CPTs
(Cross-platform Tools)
CPMDs
(Cross-platform to Mobile Development)
Tools that automate the process
of creation mobile applications.
Web-based platforms which
enable the process of creation
mobile applications through
CPTs on web-browsers.
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Native vs Non-Native
Applications# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
# Native vs Non-Native ...
Native Hybrid Web
Fully Java Based. Direct
communication with the
native API.
HTML5 based. Javascript
provides a bridge with the
native API of mobile
operating system.
Based in HTML5 and on
web-services and online
content.
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
# Native vs Non-Native …
# Reverse Engineering
Reverse Engineering
App on phone
App on
marketplace
.apk files
resource .dex files Manifest
.class
files
Java files
Readable XML
aapt
(Android asset packaging tool)
Dex > jar (dex2jar)
Class > java (Java Decompiler)
Extract APK
HTML, CSS,
Javascript,
Images, assets,
etc.
Hybrid Apps
unzip
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Problem of Hybrid Apps# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
# Native vs Non-Native …
# Reverse Engineering
# Problem of Hybrid Apps ● Best user experience
● Portability (multi-platforms)
● Cheaper origination costs
● Faster (initial) speed to market
● Weak security (obfuscation, encryption, etc.)
● Weak performance (a bridge is needed)
● Creates a lot of junk
Advantages
Know Problems
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Best Practices# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
# Native vs Non-Native …
# Reverse Engineering
# Problem of Hybrid Apps
# Best Practices
● Architecture well-defined
● Obfuscation
○ Native Apps: ProGuard
○ Hybrid: Google Closure Compiler in the level
ADVANCED_OPTIMIZATIONS
● Obfuscation not resolve hardcoded strings
○ Android Keystore System
■ Store keys in Internal Storage
➢ Trusted Execution Environment
○ oauth2
● Javascript files available via remote callbacks
● Minify Javascript files
Increase the
cracking task
Pedro Tavares
pedrotavares@domdigital.com
Av. Rainha D. Amélia, 142 Cave
6300 - 749 Guarda, Portugal
Suggestions# Agenda
# APK - What is it?
# Sandboxing of android …
# Dalvik VM vs Java VM
# CPTs and CPMDs
# Native vs Non-Native …
# Reverse Engineering
# Problem of Hybrid Apps
# Best Practices
#Suggestions
“Meteor.js: um framework além do MVC”
www.meteor.com
Obfuscation
Android Keystore System
(MinSDK 18, Android 4.3 and higher, and Smartphone support)
https://medium.com/@vashisthg/android-secure-shared-preferences-10f8356a4c2b
https://github.com/ophio/secure-preferences
https://developer.android.com/training/articles/keystore.html#UsingAndroidKeyStore
AWS
Cognito, lambda, 3party apps, etc.
https://aws.amazon.com/pt/mobile/
End
Thanks

More Related Content

Similar to How secure is an android app?

WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile ApplicationsWSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
WSO2
 
Dataencryptionsystem
DataencryptionsystemDataencryptionsystem
Dataencryptionsystem
Vibhu Mishra
 

Similar to How secure is an android app? (20)

Cross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE PredixCross Section and Deep Dive into GE Predix
Cross Section and Deep Dive into GE Predix
 
Kubernetes: Increasing velocity without sacrificing quality
Kubernetes: Increasing velocity without sacrificing qualityKubernetes: Increasing velocity without sacrificing quality
Kubernetes: Increasing velocity without sacrificing quality
 
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
DevOpsDays Tel Aviv DEC 2022 | Building A Cloud-Native Platform Brick by Bric...
 
WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile ApplicationsWSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
WSO2Con US 2013 - Using Jaggery in Telecom Web and Mobile Applications
 
Life of a Request by Ana Oprea
Life of a Request by Ana OpreaLife of a Request by Ana Oprea
Life of a Request by Ana Oprea
 
Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019Delivery Pipelines as a First Class Citizen @deliverAgile2019
Delivery Pipelines as a First Class Citizen @deliverAgile2019
 
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuestDisaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
Disaster Recovery Best Practices and Customer Use Cases: CGS and HealthQuest
 
Droidcon London 2021 - Full Stack Dart
Droidcon London 2021   - Full Stack DartDroidcon London 2021   - Full Stack Dart
Droidcon London 2021 - Full Stack Dart
 
GE Predix - The IIoT Platform
GE Predix - The IIoT PlatformGE Predix - The IIoT Platform
GE Predix - The IIoT Platform
 
Disaster Recovery Best Practices and Customer Use Cases: CGS and Health Quest...
Disaster Recovery Best Practices and Customer Use Cases: CGS and Health Quest...Disaster Recovery Best Practices and Customer Use Cases: CGS and Health Quest...
Disaster Recovery Best Practices and Customer Use Cases: CGS and Health Quest...
 
Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014
Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014
Conquer Architectural Challenges with End-to-End JavaScript - enterJS 2014
 
Embarcadero's Connected Development
Embarcadero's Connected DevelopmentEmbarcadero's Connected Development
Embarcadero's Connected Development
 
全面保護企業的關鍵智慧資產
全面保護企業的關鍵智慧資產全面保護企業的關鍵智慧資產
全面保護企業的關鍵智慧資產
 
Continuous Delivery for Cross-Platform Mobile Apps
Continuous Delivery for Cross-Platform Mobile AppsContinuous Delivery for Cross-Platform Mobile Apps
Continuous Delivery for Cross-Platform Mobile Apps
 
What is the best programming language for your web product?
What is the best programming language for your web product?What is the best programming language for your web product?
What is the best programming language for your web product?
 
hirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviewshirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviews
 
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
 
DevOps Fest 2020. Pavlo Repalo. Edge Computing: Appliance and Challanges
DevOps Fest 2020. Pavlo Repalo. Edge Computing: Appliance and ChallangesDevOps Fest 2020. Pavlo Repalo. Edge Computing: Appliance and Challanges
DevOps Fest 2020. Pavlo Repalo. Edge Computing: Appliance and Challanges
 
Virdata: lessons learned from the Internet of Things and M2M Cloud Services @...
Virdata: lessons learned from the Internet of Things and M2M Cloud Services @...Virdata: lessons learned from the Internet of Things and M2M Cloud Services @...
Virdata: lessons learned from the Internet of Things and M2M Cloud Services @...
 
Dataencryptionsystem
DataencryptionsystemDataencryptionsystem
Dataencryptionsystem
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

How secure is an android app?

  • 1. How Secure is an Android App? Pedro Tavares 11 September, 2017
  • 2. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Agenda ● Scenario ● APK - What is it? Is it hackable? ● Sandboxing of Android Processes ● Dalvik VM vs Java VM ● Native vs Non-Native Applications ● CPTs and CPMDs ● Reverse Engineering ● Problem of Hybrid Apps ● Best Practices ● Suggestions # Agenda
  • 3. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Agenda: Scenario# Agenda server-side client-side
  • 4. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal APK - What is it? Is it hackable? Android Package # Agenda # APK - What is it? terminal> unzip edpartners.apk RE is possible
  • 5. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Sandboxing of Android Processes ● Dedicated Virtual Machine (VM) ● Process Isolation (UID) ● Not shared resources ● Kernel protection # Agenda # APK - What is it? # Sandboxing of android ... Dalvik Virtual Machine
  • 6. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Dalvik VM vs Java VM# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM Java Source Code Java Byte Code Dalvik Byte Code Dalvik Executable Dalvik VM Java Source Code Java Byte Code Java Byte Code Java VM Java Compiler Java Compiler Dex Compiler Ant Gradle
  • 7. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Dalvik VM vs Java VM# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM
  • 8. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal CPTs and CPMDs# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs CPTs (Cross-platform Tools) CPMDs (Cross-platform to Mobile Development) Tools that automate the process of creation mobile applications. Web-based platforms which enable the process of creation mobile applications through CPTs on web-browsers.
  • 9. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Native vs Non-Native Applications# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs # Native vs Non-Native ... Native Hybrid Web Fully Java Based. Direct communication with the native API. HTML5 based. Javascript provides a bridge with the native API of mobile operating system. Based in HTML5 and on web-services and online content.
  • 10. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal # Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs # Native vs Non-Native … # Reverse Engineering Reverse Engineering App on phone App on marketplace .apk files resource .dex files Manifest .class files Java files Readable XML aapt (Android asset packaging tool) Dex > jar (dex2jar) Class > java (Java Decompiler) Extract APK HTML, CSS, Javascript, Images, assets, etc. Hybrid Apps unzip
  • 11. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Problem of Hybrid Apps# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs # Native vs Non-Native … # Reverse Engineering # Problem of Hybrid Apps ● Best user experience ● Portability (multi-platforms) ● Cheaper origination costs ● Faster (initial) speed to market ● Weak security (obfuscation, encryption, etc.) ● Weak performance (a bridge is needed) ● Creates a lot of junk Advantages Know Problems
  • 12. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Best Practices# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs # Native vs Non-Native … # Reverse Engineering # Problem of Hybrid Apps # Best Practices ● Architecture well-defined ● Obfuscation ○ Native Apps: ProGuard ○ Hybrid: Google Closure Compiler in the level ADVANCED_OPTIMIZATIONS ● Obfuscation not resolve hardcoded strings ○ Android Keystore System ■ Store keys in Internal Storage ➢ Trusted Execution Environment ○ oauth2 ● Javascript files available via remote callbacks ● Minify Javascript files Increase the cracking task
  • 13. Pedro Tavares pedrotavares@domdigital.com Av. Rainha D. Amélia, 142 Cave 6300 - 749 Guarda, Portugal Suggestions# Agenda # APK - What is it? # Sandboxing of android … # Dalvik VM vs Java VM # CPTs and CPMDs # Native vs Non-Native … # Reverse Engineering # Problem of Hybrid Apps # Best Practices #Suggestions “Meteor.js: um framework além do MVC” www.meteor.com Obfuscation Android Keystore System (MinSDK 18, Android 4.3 and higher, and Smartphone support) https://medium.com/@vashisthg/android-secure-shared-preferences-10f8356a4c2b https://github.com/ophio/secure-preferences https://developer.android.com/training/articles/keystore.html#UsingAndroidKeyStore AWS Cognito, lambda, 3party apps, etc. https://aws.amazon.com/pt/mobile/