SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Code Protection In Android
Arman Kabiri
1
• Introduction
• Android Architecture
• Reverse Engineering
• Code Obfuscation
• Conclusion
Index
2
• what is Android Platform
• what need to protect Code
• Reverse Engineering
• Code Obfuscation
Introduction
3
Android Architecture
• apps are written in java
• java code transfer into bytecode
• deployed as file called APK (zip compressed file)
• dex file containing code in form of Dalvik bytecode
4
DalvikVirtual Machine
• Dvm will execute dalvik bytecode on device
5
Reverse Engineering
• process of gaining information about a program
• its implementation
• its meta data
• ideal result is to recover correct java source code
6
Disassembler
is a tool which gets bytecode as input and produce
equivalent mnemonics
most of the reverse engineering process are based on this
7
Code Obfuscation
8
Obfuscation Goals
• protect apps against software piracy
• guard intellectual property
• guard implemented sensitive algorithm
• protect app from trojanized version publication
• protect malware apps from antivirus detection
9
ObfuscationTechniques
• well-known techniques under X86
• makes reverse engineering harder and more time consumer
• apps behavior must not be altered
• each technique target specific reverse engineering
• drawback: impact on execution speed
• popular techniques has mentioned in continue…
10
Identifier mangling
identifier : name for packages , classes , methods , fields
11
String Obfuscation
• using encryption algorithm such as AES
• the original content must be available
• feasible with function F which is invertible
• can be defeated by dynamic analysis
12
Dynamic Code Loading
• not only encrypting data but also code
• feasible with encryption stub and decryption stub
• better implementation in native code
13
Junkbytes
• used to confuse disassemblers
• inserting junkbytes within the bytecode
• junkbytes must never be executed
• can defeats many disassemblers tools
14
Conclusion
• code protection is an interesting field of research
• dalvik bytecode , main interest for this topic
• Still there are problems with transforming d_bytecode into
mnemonics correctly
• efficient obfuscation approaches are hardware dependent
and its such a ideal future work
15
Any Question …?
Thanks for your attention
16

Weitere ähnliche Inhalte

Ähnlich wie android code protection

Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
lqi
 
java-card20232024999999999999999999999999999999999999999999999999999999999999...
java-card20232024999999999999999999999999999999999999999999999999999999999999...java-card20232024999999999999999999999999999999999999999999999999999999999999...
java-card20232024999999999999999999999999999999999999999999999999999999999999...
ouahibakellou
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptx
Sameer Sapra
 
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
Stephan Chenette
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
DefconRussia
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011
Brian LeRoux
 

Ähnlich wie android code protection (20)

CrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash CourseCrikeyCon 2015 - iOS Runtime Hacking Crash Course
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Started In Security Now I'm Here
Started In Security Now I'm HereStarted In Security Now I'm Here
Started In Security Now I'm Here
 
Wahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash CourseWahckon[2] - iOS Runtime Hacking Crash Course
Wahckon[2] - iOS Runtime Hacking Crash Course
 
java-card20232024999999999999999999999999999999999999999999999999999999999999...
java-card20232024999999999999999999999999999999999999999999999999999999999999...java-card20232024999999999999999999999999999999999999999999999999999999999999...
java-card20232024999999999999999999999999999999999999999999999999999999999999...
 
CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)
 
CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)CNIT 128 7. Attacking Android Applications (Part 3)
CNIT 128 7. Attacking Android Applications (Part 3)
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptx
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
 
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
 
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
TDC2018SP | Trilha Mobile - Case VC+: Como tornar seguro um aplicativo mobile...
 
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
Case VC+: Como tornar seguro um aplicativo mobile payment sem penalizar a exp...
 
Outsmarting SmartPhones
Outsmarting SmartPhonesOutsmarting SmartPhones
Outsmarting SmartPhones
 
Understanding container security
Understanding container securityUnderstanding container security
Understanding container security
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Demystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels CampDemystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels Camp
 
Android : How Do I Code Thee?
Android : How Do I Code Thee?Android : How Do I Code Thee?
Android : How Do I Code Thee?
 
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS appsDmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
Dmitry 'D1g1' Evdokimov - BlackBox analysis of iOS apps
 
Mobeers waterloo-2011
Mobeers waterloo-2011Mobeers waterloo-2011
Mobeers waterloo-2011
 
Top 10 Threats to Cloud Security
Top 10 Threats to Cloud SecurityTop 10 Threats to Cloud Security
Top 10 Threats to Cloud Security
 

android code protection

  • 1. Code Protection In Android Arman Kabiri 1
  • 2. • Introduction • Android Architecture • Reverse Engineering • Code Obfuscation • Conclusion Index 2
  • 3. • what is Android Platform • what need to protect Code • Reverse Engineering • Code Obfuscation Introduction 3
  • 4. Android Architecture • apps are written in java • java code transfer into bytecode • deployed as file called APK (zip compressed file) • dex file containing code in form of Dalvik bytecode 4
  • 5. DalvikVirtual Machine • Dvm will execute dalvik bytecode on device 5
  • 6. Reverse Engineering • process of gaining information about a program • its implementation • its meta data • ideal result is to recover correct java source code 6
  • 7. Disassembler is a tool which gets bytecode as input and produce equivalent mnemonics most of the reverse engineering process are based on this 7
  • 9. Obfuscation Goals • protect apps against software piracy • guard intellectual property • guard implemented sensitive algorithm • protect app from trojanized version publication • protect malware apps from antivirus detection 9
  • 10. ObfuscationTechniques • well-known techniques under X86 • makes reverse engineering harder and more time consumer • apps behavior must not be altered • each technique target specific reverse engineering • drawback: impact on execution speed • popular techniques has mentioned in continue… 10
  • 11. Identifier mangling identifier : name for packages , classes , methods , fields 11
  • 12. String Obfuscation • using encryption algorithm such as AES • the original content must be available • feasible with function F which is invertible • can be defeated by dynamic analysis 12
  • 13. Dynamic Code Loading • not only encrypting data but also code • feasible with encryption stub and decryption stub • better implementation in native code 13
  • 14. Junkbytes • used to confuse disassemblers • inserting junkbytes within the bytecode • junkbytes must never be executed • can defeats many disassemblers tools 14
  • 15. Conclusion • code protection is an interesting field of research • dalvik bytecode , main interest for this topic • Still there are problems with transforming d_bytecode into mnemonics correctly • efficient obfuscation approaches are hardware dependent and its such a ideal future work 15
  • 16. Any Question …? Thanks for your attention 16