Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting the most of Android obfuscation tools

Getting the most of Android obfuscation tools

With the increasing use of smartphone in banking and payment industry, we need to build applications more secured. This presentation focuses on one specific part of the App security field: Android app/SDK obfuscation.

Obfuscation makes retro engineering of your system harder and prevents the leak of sensitive information.

During the talk, we will show you how to analyse the result of your obfuscation, propose relevant tools to accomplish that, and present a rigorous methodology to achieve the best possible result.

renaudboulard

April 10, 2017
Tweet

More Decks by renaudboulard

Other Decks in Programming

Transcript

  1. To render obscure To darken To hide Obfuscate To make

    something less clear and harder to understand, especially intentionally Obfuscate * wiktionary.org *dictionary. cambridge.org Obfuscation 4%
  2. Obfuscation goals Makes sensitive assets harder to find Limits cloning

    / app repackaging Protects other security features located on the app Makes inner implementation « more secret » 8%
  3. Security Improper Platform Usage Insecure Data Storage Insecure Communication Insecure

    Authentication Insufficient Cryptography Insecure Authorization Client Code Quality Code Tampering Reverse Engineering Extraneous functionality 9%
  4. Improper Platform Usage Insecure Data Storage Insecure Communication Insecure Authentication

    Insufficient Cryptography Insecure Authorization Client Code Quality Code Tampering Reverse Engineering Extraneous functionality 10% Security
  5. .apk .dex .class Java code javac .class (obfuscated) proguard mapping

    Manifest Resources 16% Build & obfuscation pipeline
  6. Timber lint rules are great ! if you are using

    the android logger instead of timber if you concatenate strings in a log message Will automatically check with lint 61%
  7. Use compile-time code generation Better performance Resists proguard obfuscation Bigger

    APK Dagger 1 vs Dagger 2 Autovalue for serialization 65%
  8. Tip # Understand the @Keep support annotation. -keep class android.support.annotation.Keep

    -keep @android.support.annotation.Keep class * { *; } In sdk/tools/proguard/proguard-android.txt • Resists class refactor • No extra proguard configuration required Use @Keep ! 67%
  9. .apk .dex .class Java code Build & obfuscation pipeline javac

    .class (obfuscated) proguard mapping Manifest Resources 70%
  10. Techniques Renaming Shrinking Repackaging Log/Data leak removal Control flow obfuscation

    String cipher Code encryption /integrity Assets/ressources encryption Dynamic analysis countermeasures 78%
  11. Application steps Choose your tools propertly Proguard conf library Enable

    repackaging Proguard conf application Remove log Decompile Publish Save mapping 92%
  12. SDK steps Choose your tools propertly Proguard conf library Provide

    proguard conf of your dependencies Declare your API Enable repackaging Remove log Decompile Publish Save mapping 94%