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

Commonly Overlooked Areas of Security Revisited

Commonly Overlooked Areas of Security Revisited

From AndroidMakers 2018 in Paris, France.

(Revised content from the Droidcon London 2017!)

Clive Lee

April 23, 2018
Tweet

More Decks by Clive Lee

Other Decks in Technology

Transcript

  1. Hi!

  2. -assumenosideeffects class_specification Specifies methods that don't have any side effects

    (other than maybe returning a value). With some care, you can also use the option to remove logging code.
  3. proguard-android-optimize.txt Adding optimization introduces certain risks.... The following flags turn

    off various optimizations known to have issues, but the list may not be complete or up to date. ... Make sure you test thoroughly if you go this route.
  4. build.gradle release {
 proguardFiles 
 //DON'T CHANGE THIS LINE
 getDefaultProguardFile(


    ‘proguard-android-optimize.txt’),
 'your-proguard-rules.pro'
 }
  5. build.gradle release {
 proguardFiles 
 //DON'T CHANGE THIS LINE
 getDefaultProguardFile(


    ‘proguard-android-optimize.txt’),
 'your-proguard-rules.pro'
 }
  6. app @Module public abstract class SomeModule { @Binds abstract Logger

    bindLogger( MyLogger logger); } public class MyApp { @Inject Logger myLogger; }
  7. app if (BuildConfig.DEBUG) {...} @Module public abstract class SomeModule {

    @Binds abstract Logger bindLogger( MyLogger logger); } public class MyApp { @Inject
  8. app public class MyApplication { @Override public void onCreate() {

    //after planting... Timber.i("LOGGING ENABLED”); }
  9. Organization with @Keep com.feature1.model @Keep public class SomeClass1 {} @Keep

    public class SomeClass2 {} @Keep public class SomeClass3 {}
  10. Organization with @Keep com.feature1.model com.feature2.model @Keep public class CoolClass1 {}

    @Keep public class CoolClass2 {} @Keep public class CoolClass3 {}
  11. Build Process / CI Don’t Trust the Interwebz Use Google

    Play App signing Don’t Add Your Key in Source Control
  12. Build Process / CI Don’t Trust the Interwebz Use Google

    Play App signing Don’t Add Your Key in Source Control Encrypt if Needed for CI