SlideShare a Scribd company logo
The global reference
in mobile application protection
Securing Mobile Apps,
From the Inside Out
Eric Lafortune, CTO, Guardsquare
Securing Mobile Apps, from the Inside Out
Impossible?
Useful?
Guardsquare
Leuven – Boston – San Francisco
Guardsquare
ProGuard – optimization of Java bytecode
DexGuard – optimization and protection for Android
iXGuard – protection for iOS
Mobile threats
OS
App architecture
Mobile device
Service
App store
OS
Attack scenarios
Mobile device
Service
App store
API attack
OS
Attack scenarios
Mobile device
Service
App store
MITM
attack
OS
Attack scenarios
Computer
Mobile device
Service
App store
OS
Attack scenarios
Computer
Mobile device
Service
App store
Dynamic
analysis
Tampering
OS
Attack scenarios
Computer
Mobile device
Service
App store
Static
analysis
OS
Attack scenarios
Computer
Mobile device
Service
App store
MITM
attack
Static
analysis
&
tampering
OS
Attack scenarios
Computer
Mobile device
Service
App store
Cloning
Static
analysis
&
tampering
OS
Attack scenarios
Mobile device
Service
App store
OS
The app as a gateway
for many attacks
Computer
Mobile device
Service
App store
What to protect?
Mobile threats
App
Authentication
Key loggers
Advertisements
Malware
Keys
Intellectual property
Protocols
Advertisements
In-app purchases
License checks
High level threats
Mobile applications
Piracy API key extraction Cloning & IP theft
Financial fraud Malware insertion Credential harvesting
Consequences
Fines and retributions Incident handling cost
Revenue loss Reputational damage
Mobile applications
Layers of protection
Layers of protection
Hardened app
Secure implementation
Secure architecture
V8: Resilience
V7: Code quality
V1-V6: Architecture, storage, crypto, authentication,
networking, platform integrity
OWASP Mobile Application Security Verification Standard
Layers of protection
Harden apps against tampering
Techniques:
• Certificate checking
• Re-packaging detection
• File integrity
Application
integrity
Platform
integrity
Application code
protection
Layers of protection
Detect apps running in a compromised environment
Techniques:
• Root detection
• Root hiding detection
• Hook detection
• Debug detection
• Emulator detection
Application
integrity
Platform
integrity
Application code
protection
• SSL pinning
Layers of protection
Prevent reverse engineering and tampering
Techniques:
• Name obfuscation
• Removal of logging
and meta data
• Optimization techniques
Platform
integrity
Application
protection
Application
integrity
• Call hiding
• Control flow obfuscation
• Code virtualization
• Arithmetic obfuscation
• String encryption
• Class encryption
• Native code obfuscation
• Javascript obfuscation
• Code packing
Application
processing
Processing applications
DexGuard processing steps
1. Shrinking 2. Optimization 3. Obfuscation
1. Shrinking
Also called treeshaking, minimizing, shrouding
DexGuard processing steps
1. Shrinking
2. Optimization
3. Obfuscation
1. Shrinking
• Classes, fields, methods
• Native libraries
• Resources
• Resource files
• Asset files
DexGuard processing steps
1. Shrinking
2. Optimization
3. Obfuscation
2. Optimization
Resources and bytecode instructions:
• Resource inlining
• Metadata inlining
• Constant propagation
• Dead code elimination
• Method inlining
• Devirtualization
• etc.
Also:
• Remove logging code
DexGuard processing steps
1. Shrinking
2. Optimization
3. Obfuscation
3. Obfuscation and detection
● Rename identifiers: names of classes, fields, methods,
resources, resource files, asset files, native libraries
● Remove debug information: line numbers, local variable
names, etc.
● String encryption
● Asset encryption
● Control flow obfuscation
● Code virtualization
● Arithmetic obfuscation
● Root detection
● etc.
DexGuard processing steps
1. Shrinking
2. Optimization
3. Obfuscation
Name obfuscation
Obfuscation techniques
public class a {
private b a;
private c b;
private int c;
public int a(int a) {
…
return c;
}
}
public class MyComputationClass {
private MySettings settings;
private MyAlgorithm algorithm;
private int answer;
public int computeAnswer(int input) {
…
return answer;
}
}
BEFORE AFTER
String encryption
Obfuscation techniques
String KEY = decrypt(“U2VjcmV0IGtleQo”);String KEY = “Secret key”;
BEFORE AFTER
Reflection
Obfuscation techniques
Class clazz =
Class.forName(“java.io.PrintStream”);
Method method =
clazz.getMethod(“println”,
new Class[] { String.class });
method.invoke(null, new Object[]{
“Hello world!”
});
System.out.println(“Hello world!”);
BEFORE AFTER
Code obfuscation
Obfuscation techniques
Control flow obfuscation
BEFORE AFTER
Code obfuscation
Obfuscation techniques
Opaque predicates
boolean flag =
System.currentTimeMillis() > 0;
boolean flag = true;
BEFORE AFTER
Code obfuscation
Obfuscation techniques
Arithmetic obfuscation
int c = (a ^ b) + 2 * (a & b);int c = a + b;
BEFORE AFTER
Obfuscation example
Original code
Obfuscation example
Decompiled
unprotected code
Obfuscation example
Decompiled
obfuscated code
Obfuscation techniques
BEFORE AFTER
Code encryption
Alternative
bytecode
BEFORE AFTER
Alternative
VM
Dalvik bytecode
Code virtualization
Obfuscation techniques
Securing Mobile Apps, from the Inside Out
Practically possible
Very useful
Matter of economics
The global reference
in mobile application protection
Thank you!
Any questions?
To learn more, go to guardsquare.com

More Related Content

PPTX
Using Disposable Mailboxes for Research
DOCX
Ceh certified ethical hacker
PDF
iPhone forensics course overview
PPTX
Another Side of Hacking
PPTX
Mobile application security
PPTX
Sans phish-orlando
PDF
DexGuard
PDF
ProGuard vs DexGuard
Using Disposable Mailboxes for Research
Ceh certified ethical hacker
iPhone forensics course overview
Another Side of Hacking
Mobile application security
Sans phish-orlando
DexGuard
ProGuard vs DexGuard

Similar to Securing Mobile Apps, From the Inside Out (20)

PDF
Testing Android Security Codemotion Amsterdam edition
PDF
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
PDF
iXGuard
PPTX
Reverse engineering android apps
PPTX
Mobile security recipes for xamarin
PDF
михаил дударев
PPTX
Untitled 1
PPTX
Security testing of mobile applications
PPTX
Fabrizio Cornelli - Securing Android Apps by Reversing - Codemotion Milan 2018
PPTX
Code Obfuscation for Android & WP7
PPTX
Proguard android
PDF
Brief Tour about Android Security
PDF
Mobile Security Training, Mobile Device Security Training
PDF
Attacking and Defending Mobile Applications
PPTX
Android security
PPT
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
PDF
YOW! Connected 2014 - Developing Secure iOS Applications
PPTX
From java to android a security analysis
PDF
Cracking the mobile application code
PDF
Droidcon it-2014-marco-grassi-viaforensics
Testing Android Security Codemotion Amsterdam edition
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
iXGuard
Reverse engineering android apps
Mobile security recipes for xamarin
михаил дударев
Untitled 1
Security testing of mobile applications
Fabrizio Cornelli - Securing Android Apps by Reversing - Codemotion Milan 2018
Code Obfuscation for Android & WP7
Proguard android
Brief Tour about Android Security
Mobile Security Training, Mobile Device Security Training
Attacking and Defending Mobile Applications
Android security
Steelcon 2015 Reverse-Engineering Obfuscated Android Applications
YOW! Connected 2014 - Developing Secure iOS Applications
From java to android a security analysis
Cracking the mobile application code
Droidcon it-2014-marco-grassi-viaforensics
Ad

More from SBWebinars (20)

PPTX
SAP Concur’s Cloud Journey
PDF
Top Cybersecurity Threats and How SIEM Protects Against Them
PPTX
Software-Defined Segmentation Done Easily, Quickly and Right
PDF
Don’t Get Stuck in The Encryption Stone Age: Get Decrypted Visibility with Am...
PDF
Taking Open Source Security to the Next Level
PPTX
The Next Generation of Application Security
PDF
You're Bleeding. Exposing the Attack Surface in your Supply Chain
PDF
Demystifying PCI Software Security Framework: All You Need to Know for Your A...
PDF
Top 10 Threats to Cloud Security
PDF
Deploying Secure Modern Apps in Evolving Infrastructures
PDF
Reduce the Burden Of Managing SAP With Enterprise Identity Management
PDF
Maturing DevSecOps: From Easy to High Impact
PDF
How to Kickstart Security and Compliance for Your AWS, Azure, and GCP Clouds
PDF
Reducing Risk of Credential Compromise at Netflix
PDF
2018 Black Hat Hacker Survey Report: What Hackers Really Think About Your Cyb...
PDF
The State of Open Source Vulnerabilities Management
PDF
Flow Metrics: What They Are & Why You Need Them
PDF
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
PDF
Building Blocks of Secure Development: How to Make Open Source Work for You
PDF
Take a Bite Out of the Remediation Backlog
SAP Concur’s Cloud Journey
Top Cybersecurity Threats and How SIEM Protects Against Them
Software-Defined Segmentation Done Easily, Quickly and Right
Don’t Get Stuck in The Encryption Stone Age: Get Decrypted Visibility with Am...
Taking Open Source Security to the Next Level
The Next Generation of Application Security
You're Bleeding. Exposing the Attack Surface in your Supply Chain
Demystifying PCI Software Security Framework: All You Need to Know for Your A...
Top 10 Threats to Cloud Security
Deploying Secure Modern Apps in Evolving Infrastructures
Reduce the Burden Of Managing SAP With Enterprise Identity Management
Maturing DevSecOps: From Easy to High Impact
How to Kickstart Security and Compliance for Your AWS, Azure, and GCP Clouds
Reducing Risk of Credential Compromise at Netflix
2018 Black Hat Hacker Survey Report: What Hackers Really Think About Your Cyb...
The State of Open Source Vulnerabilities Management
Flow Metrics: What They Are & Why You Need Them
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Building Blocks of Secure Development: How to Make Open Source Work for You
Take a Bite Out of the Remediation Backlog
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Getting Started with Data Integration: FME Form 101
PPTX
1. Introduction to Computer Programming.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
MYSQL Presentation for SQL database connectivity
Assigned Numbers - 2025 - Bluetooth® Document
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A comparative analysis of optical character recognition models for extracting...
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Digital-Transformation-Roadmap-for-Companies.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Getting Started with Data Integration: FME Form 101
1. Introduction to Computer Programming.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25-Week II
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools

Securing Mobile Apps, From the Inside Out