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
android.support.design False
com.jakewharton.picasso False
org.mockito False
com.jakewharton.rxbinding2 False
android.arch.core False
org.jetbrains.annotations False
com.google.firebase True
com.facebook False
bolts False
android.support.transition False
junit.framework False
org.junit False
android.support.mediacompat False
android.support.localbroadcastmanager False
org.apache.http False
timber.log False
com.zendesk.sdk False
android.support.coreutils False
androidx.versionedparcelable False
android.support.loader False
org.aaronhe.rxgooglemapsbinding False
com.zendesk.service False
com.bumptech.glide False
com.zendesk.util False
com.wootric.androidsdk False
com.nhaarman.mockito_kotlin False
android.support.slidingpanelayout False
com.zendesk.collection False
com.ethanhua.skeleton False
zendesk.suas False
com.google.gson False
android.support.constraint False
android.support.coreui False
kotlin False
junit.extensions False
android.support.print False
com.jakewharton.disklrucache False
com.google.zxing False
android.support.customview False
rx False
io.reactivex False
android.support.compat False
com.squareup.okhttp False
android.support.multidex False
android.support.customtabs False
com.zendesk.logger False
zendesk.core False
com.google.maps False
android.support.asynclayoutinflater False
org.slf4j False
retrofit2 False
dagger False
junit.runner False
android.support.annotation False
androidx.browser.browseractions False
com.getkeepsafe.relinker False
zendesk.support False
io.realm False
javax.inject False
org.objenesis False
android.support.drawerlayout False
org.hamcrest False
org.joda.time False
android.support.interpolator False
com.caverock.androidsvg False
android.arch.lifecycle False
com.squareup.picasso False
android.support.fragment False
org.parceler False
com.sothree.slidinguppanel False
junit.textui False
android.support.coordinatorlayout False
android.support.documentfile False
zendesk.belvedere False
okio False
okhttp3 False
androidx.media False
androidx.core.internal False
android.support.cursoradapter False
net.bytebuddy False
android.support.v4 False
jp.wasabeef.richeditor False
org.reactivestreams False
com.crashlytics.android False
com.jakewharton.rxrelay2 False
com.zendesk.func False
io.supercharge.shimmerlayout False
android.support.swiperefreshlayout False
android.databinding False