SlideShare une entreprise Scribd logo
1  sur  29
Android applications in the cruel
world
Defence Against the Dark Forces or how
to save an Android application from
threats?
Mikhail Dudarev, Ivan Kinash
Licel, 2014, DroidCon Moscow 2014
• Mikhail Dudarev is an old-school java
security guy, co-founder of Licel, founder
of jCardSim, a Java Card simulator, which
has won the 2013 Duke's Choice Award
• Ivan Kinash is a co-founder & CEO at Licel
• Licel creates application protection
solutions for Java and Android platforms
About
Report
Mobile Techworld Report:
Looking at a total of 230 apps – the top 100 paid
apps and top 15 free apps for Android and iOS –
Arxan found that 100 percent of the top paid apps
on Android and 56 percent on iOS were being
impersonated in a compromised form on grey
markets.
http://goo.gl/mW1WxZ
Android Application Security Model
• There is no standard EULA, each publisher is sole
responsible for one (Google Play)
• Installed APK is stored on a device
• It is signed with a publisher’s signature
• There is a privilege system (users do not take it
seriously, or they simply have no choice)
• APKs stored on devices are accessible even without
root privileges (Jelly Bean Encrypted Containers – root
needed)
Android Application Security Model
• Signature is designed to confirm integrity of an
application
• Truth is that it gives you absolutely nothing
• A couple of minutes needed to resign an
application
• Then put it to grey markets, p2p, warez sites… Or
even to the same market where original one is
(was)
APK Structure
classes.dex
(dalvik
bytecode)
resources.arsc
(compiled
resources)
META-INF/
(signatures)
res/
(resources)
assets/
(assets)
lib/
(native libs)
AndroidManifest.xml
(name, version, access rights,
referenced libs)
Dalvik bytecode
• Is it protected?
• Is it hard to reverse engineer?
No and no once again…
Example
• Imagine you have an application with ads
• What malicious person have to do to own your app?
• Apktool disassemble -> change ad id -> Apktool
assemble -> add its own signature -> zipalign ->
distribute (p2p, grey markets, official markets, warez
sites) = 10 mins
• If you are using just name obfuscation technique, it will
require one extra minute to hack…
Short funny
demo
Existing threats
• Application cloning
• Sensitive information (user) theft
• Licensing system cracking
• Reverse engineering
Application cloning
• Illegal publishing on alternative app stores
– App sales revenue loss
• Rerouting of Ad/IAP revenue streams
– Lost revenue from ads and purchases
• Malicious code injection
– Loss of reputation and harm to the app’s users
Stealing sensitive information from an
application
• User’s Data
– Logins/Passwords/Keys/Credit
card info…
– IM, Social Network data,…
– Location
• Application Data
– Unique multimedia resources
– Information from embedded
databases
– Business Logic
• Corporate Data
– DBs/Confidential files/…
Cracking tools (free): ApkTool, Androguard, Dex2jar
Licensing system cracking. Google Play
LVL
• The main app licensing service in Google Play
• Based on asymmetric cryptography
– Secret keys are stored on the licensing server,
public keys are in an application’s code
Automatic cracking tool: AntiLVL
Reverse-engineering
• Analysis of weak/critical places in apps in order to
detect vulnerabilities
• Application’s internal logic analysis
– OTP-generator for a banking solution
http://goo.gl/0Dauve
Cracking tools: ApkTool, Androguard, Dex2jar
Reverse engineering my bank's
security token
• Original mobile banking application that
generates OTP (One Time Password) codes
• After decompiling with Dex2Jar
– Detected OTP generation algorithm – TOTP
TOTP = HOTP(SecretKey, TimeCounter)
– Secret key extracted from code
– Arduino clone created 
Reverse engineering my bank's
security token
Standard protection and licensing
techniques
• Name obfuscation (in particular Proguard)
• Licensing services provided by app store
– Google Play Licensing
– Amazon DRM
• Custom native libraries for license checking, string/class
encryption
• Server-side computation
• Mathematical Jigsaw Puzzle Obfuscation (keep ProGuard
optimizer away from this parts of code)
Useful, but do not work…
Active and Strong Integrity Protection
Techniques and set of other great
approaches
They do not work without…
Cracking methods
• Automatic
– AntiLVL
• Tools for analysis and modification
– ApkTool
– Androlib
– Dex2Jar
– JD-GUI/JEB/…
• Text editor and grep 
Advanced protection techniques
• String Encryption (e.g. whiteboxcrypto)
• Hiding of API calls
• Class Encryption
• Resource Encryption
• Strong and active integrity
protection
Protection goal
• Have bytecode (even if it is dumped) as hard
to reverse engineer as possible (strings are
encrypted, valuable algorithms are hidden,
API calls are hidden)
• Have strong integrity protection mechanism in
order to block repackaging ability
• Have unique resources encrypted
Protection scheme
APK
Bytecode
• String Encryption
• Class Encryption
• Hide API calls
Resources
• Resource encryption
Signature
• Active Integrity Protection (Repackaging protection)
If an app has
network
abilities, you
can also
change
communicati
on protocol
from version
to version…
A few important tips
If you are developing mobile banking/financial/corporate/secure app:
• Device fingerprint
• Device-related One time passwords via second communication channel
(SMS)
• Use secured communication protocols and strong cryptography if it is
possible
• Sensitive information stored on a device should be encrypted (SQLCipher),
keys must be hidden via String Encryption
• Keep in mind that the balance between usability/performance and
security is important
• Think about protection and do protect in advance, BEFORE RELEASE
A few important tips #2
After applying strong protection techniques you
might think then about:
• App cert check (just in case)
• Debug mode check
• Rooted device check
• Emulator check
DexProtector
• Having a huge expertize we implemented String Encryption,
Class Encryption, Resource Encryption, Hide Access and
Integrity Control mechanisms on a technology leading level
• That is why I would love to recommend DexProtector for
protecting your apps from threats
• If you are applying additional security practices
DexProtector will help you to protect them from being
reverse engineered
• It can be used together with ProGuard
Conclusion
• Nobody will give you 100% guarantee that your app
will not be hacked
• Relevance of piracy is increasing day by day as the
Android market growth
• Standard protection techniques are not stand any more
against current methods of analysis and cracking
• Must have a set of protection techniques applied
• Integrity Protection is very important
Conclusion #2
• If you applied security measures intelligently you are safe
from more than 90% of potential hackers. It is hoped that
the remaining 10 percent will not be interested in breaking
you app
• Google is in a difficult situation with Android security now.
Definitely there should be some changes, especially in
securing boot-loader, in creating secure app execution
environment and storage also. They tried in Jelly Bean, but
with no luck. On the other hand I see Nexus series has
ability to be legally rooted and do not know what to think
Contacts
Email: dudarev@licelus.com, kinash@licelus.com
Twitter: @MikhailDudarev, @ivan_kinash
Web: http://dexprotector.com, http://licelus.com

Contenu connexe

Dernier

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Android applications in the cruel world, how to save them from threats?

  • 1. Android applications in the cruel world Defence Against the Dark Forces or how to save an Android application from threats? Mikhail Dudarev, Ivan Kinash Licel, 2014, DroidCon Moscow 2014
  • 2. • Mikhail Dudarev is an old-school java security guy, co-founder of Licel, founder of jCardSim, a Java Card simulator, which has won the 2013 Duke's Choice Award • Ivan Kinash is a co-founder & CEO at Licel • Licel creates application protection solutions for Java and Android platforms About
  • 3. Report Mobile Techworld Report: Looking at a total of 230 apps – the top 100 paid apps and top 15 free apps for Android and iOS – Arxan found that 100 percent of the top paid apps on Android and 56 percent on iOS were being impersonated in a compromised form on grey markets. http://goo.gl/mW1WxZ
  • 4. Android Application Security Model • There is no standard EULA, each publisher is sole responsible for one (Google Play) • Installed APK is stored on a device • It is signed with a publisher’s signature • There is a privilege system (users do not take it seriously, or they simply have no choice) • APKs stored on devices are accessible even without root privileges (Jelly Bean Encrypted Containers – root needed)
  • 5. Android Application Security Model • Signature is designed to confirm integrity of an application • Truth is that it gives you absolutely nothing • A couple of minutes needed to resign an application • Then put it to grey markets, p2p, warez sites… Or even to the same market where original one is (was)
  • 7. Dalvik bytecode • Is it protected? • Is it hard to reverse engineer? No and no once again…
  • 8. Example • Imagine you have an application with ads • What malicious person have to do to own your app? • Apktool disassemble -> change ad id -> Apktool assemble -> add its own signature -> zipalign -> distribute (p2p, grey markets, official markets, warez sites) = 10 mins • If you are using just name obfuscation technique, it will require one extra minute to hack…
  • 10.
  • 11. Existing threats • Application cloning • Sensitive information (user) theft • Licensing system cracking • Reverse engineering
  • 12. Application cloning • Illegal publishing on alternative app stores – App sales revenue loss • Rerouting of Ad/IAP revenue streams – Lost revenue from ads and purchases • Malicious code injection – Loss of reputation and harm to the app’s users
  • 13. Stealing sensitive information from an application • User’s Data – Logins/Passwords/Keys/Credit card info… – IM, Social Network data,… – Location • Application Data – Unique multimedia resources – Information from embedded databases – Business Logic • Corporate Data – DBs/Confidential files/… Cracking tools (free): ApkTool, Androguard, Dex2jar
  • 14. Licensing system cracking. Google Play LVL • The main app licensing service in Google Play • Based on asymmetric cryptography – Secret keys are stored on the licensing server, public keys are in an application’s code Automatic cracking tool: AntiLVL
  • 15. Reverse-engineering • Analysis of weak/critical places in apps in order to detect vulnerabilities • Application’s internal logic analysis – OTP-generator for a banking solution http://goo.gl/0Dauve Cracking tools: ApkTool, Androguard, Dex2jar
  • 16. Reverse engineering my bank's security token • Original mobile banking application that generates OTP (One Time Password) codes • After decompiling with Dex2Jar – Detected OTP generation algorithm – TOTP TOTP = HOTP(SecretKey, TimeCounter) – Secret key extracted from code – Arduino clone created 
  • 17. Reverse engineering my bank's security token
  • 18. Standard protection and licensing techniques • Name obfuscation (in particular Proguard) • Licensing services provided by app store – Google Play Licensing – Amazon DRM • Custom native libraries for license checking, string/class encryption • Server-side computation • Mathematical Jigsaw Puzzle Obfuscation (keep ProGuard optimizer away from this parts of code)
  • 19. Useful, but do not work… Active and Strong Integrity Protection Techniques and set of other great approaches They do not work without…
  • 20. Cracking methods • Automatic – AntiLVL • Tools for analysis and modification – ApkTool – Androlib – Dex2Jar – JD-GUI/JEB/… • Text editor and grep 
  • 21. Advanced protection techniques • String Encryption (e.g. whiteboxcrypto) • Hiding of API calls • Class Encryption • Resource Encryption • Strong and active integrity protection
  • 22. Protection goal • Have bytecode (even if it is dumped) as hard to reverse engineer as possible (strings are encrypted, valuable algorithms are hidden, API calls are hidden) • Have strong integrity protection mechanism in order to block repackaging ability • Have unique resources encrypted
  • 23. Protection scheme APK Bytecode • String Encryption • Class Encryption • Hide API calls Resources • Resource encryption Signature • Active Integrity Protection (Repackaging protection) If an app has network abilities, you can also change communicati on protocol from version to version…
  • 24. A few important tips If you are developing mobile banking/financial/corporate/secure app: • Device fingerprint • Device-related One time passwords via second communication channel (SMS) • Use secured communication protocols and strong cryptography if it is possible • Sensitive information stored on a device should be encrypted (SQLCipher), keys must be hidden via String Encryption • Keep in mind that the balance between usability/performance and security is important • Think about protection and do protect in advance, BEFORE RELEASE
  • 25. A few important tips #2 After applying strong protection techniques you might think then about: • App cert check (just in case) • Debug mode check • Rooted device check • Emulator check
  • 26. DexProtector • Having a huge expertize we implemented String Encryption, Class Encryption, Resource Encryption, Hide Access and Integrity Control mechanisms on a technology leading level • That is why I would love to recommend DexProtector for protecting your apps from threats • If you are applying additional security practices DexProtector will help you to protect them from being reverse engineered • It can be used together with ProGuard
  • 27. Conclusion • Nobody will give you 100% guarantee that your app will not be hacked • Relevance of piracy is increasing day by day as the Android market growth • Standard protection techniques are not stand any more against current methods of analysis and cracking • Must have a set of protection techniques applied • Integrity Protection is very important
  • 28. Conclusion #2 • If you applied security measures intelligently you are safe from more than 90% of potential hackers. It is hoped that the remaining 10 percent will not be interested in breaking you app • Google is in a difficult situation with Android security now. Definitely there should be some changes, especially in securing boot-loader, in creating secure app execution environment and storage also. They tried in Jelly Bean, but with no luck. On the other hand I see Nexus series has ability to be legally rooted and do not know what to think
  • 29. Contacts Email: dudarev@licelus.com, kinash@licelus.com Twitter: @MikhailDudarev, @ivan_kinash Web: http://dexprotector.com, http://licelus.com