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
md52b3e82a767a7bcefccb42dd2b387de2e False
md5fd54a09cc155ec7ea857d08c96bec77e False
com.xamarin.java_interop False
md56aabda7acd4abaa2b1d1169cd8c7c6ee False
mono False
md555551e25803a98e55063f2b38b2cbdf9 False
md55ba505dee0a4656b5e4362d48a9a5c8b False
android.support.coordinatorlayout False
android.support.mediacompat False
android.support.multidex False
md57052de67843bc3cc4ad964075ca2a2cf False
md5f373feb05a6c42aa74ac459c9f9bd90e False
android.runtime False
xamarin.android.net False
md52784b6b6564df579ab09ba8bad5c54dd False
android.arch.core False
com.laerdal.qcprinstructor False
android.support.design False
android.arch.lifecycle False
md51558244f76c53b6aeda52c8a337f2c37 False
androidx.core.internal False
md56465496e2cc2a0b092289073b109b898 False
android.app False
md5fbd5cb67a919f906a494b9232afaa0dd False
androidx.versionedparcelable False
md583c97a0310bc1a6b1fc391803d3b5925 False
md5ffbf54d85730058f1cacee7eb2f6acf1 False
android.support.customtabs False
androidx.browser.browseractions False
com.microsoft.appcenter False
opentk False
android.support.compat False
md55e9288f07ab677f44aafdc66fd49fe16 False
okio False
android.support.annotation False
md51520e9e243a9b7c692b205c5cc5e5f61 False
md58432a647068b097f9637064b8985a5e0 False
md5b8e219349a3a851be52bc5d80b65760d False
android.support.transition False
com.squareup.picasso False
androidx.media False
md53e4ac548bc3721eeebe854457838c06c False
com.squareup.okhttp False
md55543d394c0d6e6cc56a986c8177f7a97 False
com.google.gson False
com.xamarin.formsviewgroup False
md5da8f1717e3941699edde27d65446341c False
md56d83ad15c03d68231453c44f0d0d8320 False
md5f92e0daf340890c9667469657ee2ece8 False