Info Obfuscated methods

Description

Obfuscation refers to methods to obscure code and make it hard to understand. Compiled Java classes can be decompiled if there is no obfuscation during compilation step.

Adversaries can steal code and repurpose it and sell it in a new application or create a malicious fake application based on the initial one.

Code obfuscation only slows the attacker from reverse engineering but does not make it impossible.

Recommendation

Design the application to add the following protections and slow reverse engineering of the application:

  • Obfuscate Java source code with tools like Proguard or Dexguard
  • buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
            }
        }
  • Verification application signing certificate during runtime by checking context.getPackageManager().signature
  • Check application installer to ensure it matches the Android Market by calling context.getPackageManager().getInstallerPackageName
  • Check running environment at runtime
  • private static String getSystemProperty(String name) throws Exception {
        Class systemPropertyClazz = Class.forName("android.os.SystemProperties");
        return (String) systemPropertyClazz.getMethod("get", new Class[] { String.class }).invoke(systemPropertyClazz, new Object[] { name });
    }
    
    public static boolean checkEmulator() {
    
        try {
            boolean goldfish = getSystemProperty("ro.hardware").contains("goldfish");
            boolean qemu = getSystemProperty("ro.kernel.qemu").length() > 0;
            boolean sdk = getSystemProperty("ro.product.model").equals("sdk");
    
            if (qemu || goldfish || sdk) {
                return true;
            }
    
        } catch (Exception e) {
        }
    
        return false;
      }
  • Check debug flag at runtime
  • context.getApplicationInfo().applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE;

Technical details
PackageObfuscated
okhttp3 False
android.support.multidex False
io.reactivex False
javax.annotation False
android.arch.lifecycle False
android.support.coreui False
javax.inject False
com.adobe.xmp False
android.support.media False
com.babisoft.ReactNativeLocalization False
com.drew.imaging False
android.arch.core False
com.facebook.imageformat False
com.facebook.imagepipeline False
com.facebook.jni False
com.RNFetchBlob False
com.flurry.sdk True
com.facebook.fbcore False
bolts False
android.support.annotation False
me.relex.photodraweeview False
org.reactnative.facedetector False
okio False
android.support.v4 False
com.facebook.react False
proguard.canary False
org.reactnative.camera False
com.rnfs False
android.support.design False
android.support.exifinterface False
com.facebook.cipher False
com.drew.lang False
com.facebook.perftest False
org.apache.http False
com.imagepicker False
com.facebook.datasource False
com.bumptech.glide False
com.google.zxing False
com.google.gson False
com.crashlytics.android False
org.joda.time False
org.reactnative.frame False
com.reactlibrary False
com.facebook.soloader False
android.support.transition False
com.facebook.binaryresource False
org.webkit.android_jsc False
com.facebook.systrace False
com.reactnative.photoview False
com.facebook.crypto False
org.slf4j False
com.flurry.android False
android.support.coreutils False
com.facebook.drawee False
com.facebook.yoga False
com.cmcewen.blurview False
com.drew.metadata False
com.drew.tools False
android.support.compat False
org.reactivestreams False
com.google.firebase True
com.lwansbrough.RCTCamera False
io.fixd.rctlocale False
org.reactnative.barcodedetector False
android.support.fragment False
com.facebook.imageutils False