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
md5e32bd075c73a03c2bfeac127b7a61608 False
md5a459c909169f8a1dd4fa5864379a38cb False
android.support.percent False
md52b800c416bae465fed194b4cef405b3a False
com.here.services False
md564d67dd3cf87b5167bcc1f718c9425bb False
md51a7804f72d6110664b24ba54c70d957c False
mono False
md556ef6b296c7d04587b3c5f388160a3f9 False
md5f004aff136445f06e77143b6f2aa6802 False
md50d9a1cd1fdb4965646f6a3c89e40d324 False
md50ad4be25e60409461fa549bf9b85b326 False
android.support.fragment False
com.google.gson False
md59874767f662cc6e39f77b13570a50930 False
com.nokia.maps True
android.support.mediacompat False
md5116476b8847c1bb765ae0008edebf774 False
android.support.coreui False
md59aafc5155b920909626c4b2153ff2e13 False
md5f40b6eb016e7c9ae61a00cfd498e6ed9 False
md52fb1a3a615e9db2a4379715fffe8c648 False
md547b7c743c61b314c0004a08d1e572577 False
md5adac4c2ac45c7e60a430c29f90e745de False
md5c3f6dfd839601ed6a2b1ba63294c22a8 False
android.support.compat False
com.here.posclient False
md511ae327f54587ae3f5824458bbe7b8b3 False
md5d06a077489831141efe6f537ac3ef2f5 False
android.app False
md5162963d6511914ab6b20ba68a078b2eb False
com.here.network False
md5f2fc5f0c2498cf7001fc720d6c59f7b4 False
md5e6cf530f33b2c89f7f3cd519b9504f90 False
md57167948ef1cbb31898ff35489fa199eb False
opentk False
md5b659133aa867a93f31116e98a1299ca5 False
md5458bba6d2aed696fe6bdecc8f52bdcf7 False
android.support.v4 False
android.runtime False
md5f086449e9592113dc42c2eae1734e364 False
com.xamarin.java_interop False
md5bb098716dd46c8e113564e6b42b7cde9 False
md568dba76042fbbcdd43a6c8d4d3639d93 False
android.support.coreutils False
md59ec47706c77830248501341798252bd7 False
md58565eeb785c4bf68a896155f8ad38823 False
md5f611baa24e7f361e50986920f92d81ca False