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

Secure Development - Lviv IT Arena

Secure Development - Lviv IT Arena

Secure Development - Lviv IT Arena

September 2016.

Enrique López Mañas

September 30, 2016
Tweet

More Decks by Enrique López Mañas

Other Decks in Programming

Transcript

  1. Agenda • File Storage • Securing network communications • Reverse

    Engineering and Obfuscation • Databases • Demo • Misc
  2. External Storage vs Internal Storage • getExternalStorageDirectory() is like parking

    your car on the street • All apps can access your files • Files may not be removed or uninstalled • SD Card can be removed
  3. External Storage vs Internal Storage • getFilesDir() is like parking

    in your own garage • Other apps are generally not able to get in your sandbox • Root phones and emulator can access it • Files get removed during uninstall
  4. Why Java? • Java is partially compiled, and then interpreted

    • JVM and opcodes are fixed • Few instructions • No real protection
  5. Why Android? • APKs are easily downloadable • Obfuscation does

    not happen by default • APK to Jar Translation is easy
  6. Legal issues recipes • Don’t decompile, recompile, and pass it

    off as your own • Don’t try to sell it as your own • If License Agreement forbids decompiling, do not decompile • Don’t decompile to remove protection mechanisms
  7. Legal issues recipes YES • Understand interoperatibility • Create a

    program interface NO • Create a copy and sell it
  8. Obtain APKs • Pulling from device • Using GooglePlay Python

    API • Alternative sources • Sniffer transfers
  9. Protecting against Reverse Engineering 1. Writing two versions of the

    app 2. Obfuscation (When obfuscation is outlawed, only outlaws will sifjdifdm wofiefiemfeifm) 3. Webservices 4. FingerPrinting code 5. Native methods
  10. Misc • Minimize permission usage • Perform Input Validation (buffer

    overflow, etc) • Do not load code dynamically