Info Call to dynamic code loading API

Description

List of all dynamic code loading API calls in the application. Loading code from untrsuted sources could allow the execution of malicious code in the context of the current application.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method kotlin.text.SystemProperties.<init>() calling method java.lang.System.getProperty()


    private SystemProperties()
    {
        kotlin.text.SystemProperties.INSTANCE = ((kotlin.text.SystemProperties) this);
        String v0_1 = System.getProperty("line.separator");
        if (v0_1 == null) {
            kotlin.jvm.internal.Intrinsics.throwNpe();
        }
        kotlin.text.SystemProperties.LINE_SEPARATOR = v0_1;
        return;
    }

Method kotlin.internal.PlatformImplementationsKt.getJavaVersion() calling method java.lang.System.getProperty()


    private static final int getJavaVersion()
    {
        int v6 = 65542;
        String v12 = System.getProperty("java.specification.version");
        if (v12 != null) {
            int v8 = kotlin.text.StringsKt.indexOf$default(((CharSequence) v12), 46, 0, 0, 6, 0);
            if (v8 >= 0) {
                int v10 = kotlin.text.StringsKt.indexOf$default(((CharSequence) v12), 46, (v8 + 1), 0, 4, 0);
                if (v10 < 0) {
                    v10 = v12.length();
                }
                if (v12 != null) {
                    String v9 = v12.substring(0, v8);
                    kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v9, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)");
                    if (v12 != null) {
                        String v11 = v12.substring((v8 + 1), v10);
                        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v11, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)");
                        try {
                            v6 = ((Integer.parseInt(v9) * 65536) + Integer.parseInt(v11));
                        } catch (NumberFormatException v7) {
                        }
                    } else {
                        throw new kotlin.TypeCastException("null cannot be cast to non-null type java.lang.String");
                    }
                } else {
                    throw new kotlin.TypeCastException("null cannot be cast to non-null type java.lang.String");
                }
            } else {
                try {
                    v6 = (Integer.parseInt(v12) * 65536);
                } catch (NumberFormatException v7) {
                }
            }
        }
        return v6;
    }

Method com.bumptech.glide.load.model.LazyHeaders$Builder.getSanitizedUserAgent() calling method java.lang.System.getProperty()


    static String getSanitizedUserAgent()
    {
        String v1 = System.getProperty("http.agent");
        if (!android.text.TextUtils.isEmpty(v1)) {
            int v3 = v1.length();
            StringBuilder v4_0 = new StringBuilder(v1.length());
            int v2 = 0;
            while (v2 < v3) {
                char v0 = v1.charAt(v2);
                if (((v0 <= 31) && (v0 != 9)) || (v0 >= 127)) {
                    v4_0.append(63);
                } else {
                    v4_0.append(v0);
                }
                v2++;
            }
            v1 = v4_0.toString();
        }
        return v1;
    }

Method android.support.multidex.MultiDex.install() calling method java.lang.System.getProperty()


    public static void install(android.content.Context p11)
    {
        android.util.Log.i("MultiDex", "install");
        if (!android.support.multidex.MultiDex.IS_VM_MULTIDEX_CAPABLE) {
            if (android.os.Build$VERSION.SDK_INT >= 4) {
                try {
                    android.content.pm.ApplicationInfo v1 = android.support.multidex.MultiDex.getApplicationInfo(p11);
                } catch (RuntimeException v3_0) {
                    android.util.Log.e("MultiDex", "Multidex installation failure", v3_0);
                    throw new RuntimeException(new StringBuilder().append("Multi dex installation failed (").append(v3_0.getMessage()).append(").").toString());
                }
                if (v1 != null) {
                    String v0 = v1.sourceDir;
                    if (!android.support.multidex.MultiDex.installedApk.contains(v0)) {
                        android.support.multidex.MultiDex.installedApk.add(v0);
                        if (android.os.Build$VERSION.SDK_INT > 20) {
                            android.util.Log.w("MultiDex", new StringBuilder().append("MultiDex is not guaranteed to work in SDK version ").append(android.os.Build$VERSION.SDK_INT).append(": SDK version higher than ").append(20).append(" should be backed by ").append("runtime with built-in multidex capabilty but it\'s not the ").append("case here: java.vm.version=\"").append(System.getProperty("java.vm.version")).append("\"").toString());
                        }
                        try {
                            ClassLoader v5 = p11.getClassLoader();
                        } catch (RuntimeException v3_1) {
                            android.util.Log.w("MultiDex", "Failure while trying to obtain Context class loader. Must be running in test mode. Skip patching.", v3_1);
                        }
                        if (v5 != null) {
                            try {
                                android.support.multidex.MultiDex.clearOldDexDir(p11);
                            } catch (Throwable v6) {
                                android.util.Log.w("MultiDex", "Something went wrong when trying to clear old MultiDex extraction, continuing without cleaning.", v6);
                            }
                            java.io.File v2_1 = new java.io.File(v1.dataDir, android.support.multidex.MultiDex.SECONDARY_FOLDER_NAME);
                            java.util.List v4_0 = android.support.multidex.MultiDexExtractor.load(p11, v1, v2_1, 0);
                            if (!android.support.multidex.MultiDex.checkValidZipFiles(v4_0)) {
                                android.util.Log.w("MultiDex", "Files were not valid zip files.  Forcing a reload.");
                                java.util.List v4_1 = android.support.multidex.MultiDexExtractor.load(p11, v1, v2_1, 1);
                                if (!android.support.multidex.MultiDex.checkValidZipFiles(v4_1)) {
                                    throw new RuntimeException("Zip files were not valid.");
                                } else {
                                    android.support.multidex.MultiDex.installSecondaryDexes(v5, v2_1, v4_1);
                                }
                            } else {
                                android.support.multidex.MultiDex.installSecondaryDexes(v5, v2_1, v4_0);
                            }
                            android.util.Log.i("MultiDex", "install done");
                        } else {
                            android.util.Log.e("MultiDex", "Context class loader is null. Must be running in test mode. Skip patching.");
                        }
                    } else {
                    }
                }
            } else {
                throw new RuntimeException(new StringBuilder().append("Multi dex installation failed. SDK ").append(android.os.Build$VERSION.SDK_INT).append(" is unsupported. Min SDK version is ").append(4).append(".").toString());
            }
        } else {
            android.util.Log.i("MultiDex", "VM has multidex support, MultiDex support library is disabled.");
        }
        return;
    }

Method android.support.multidex.MultiDex.<clinit>() calling method java.lang.System.getProperty()


    static MultiDex()
    {
        android.support.multidex.MultiDex.SECONDARY_FOLDER_NAME = new StringBuilder().append("code_cache").append(java.io.File.separator).append("secondary-dexes").toString();
        android.support.multidex.MultiDex.installedApk = new java.util.HashSet();
        android.support.multidex.MultiDex.IS_VM_MULTIDEX_CAPABLE = android.support.multidex.MultiDex.isVMMultidexCapable(System.getProperty("java.vm.version"));
        return;
    }

Method android.support.multidex.MultiDex$V4.install() calling method dalvik.system.DexFile.loadDex()


    private static void install(ClassLoader p13, java.util.List p14)
    {
        int v5 = p14.size();
        reflect.Field v10 = android.support.multidex.MultiDex.access$300(p13, "path");
        StringBuilder v9_1 = new StringBuilder(((String) v10.get(p13)));
        String[] v4 = new String[v5];
        java.io.File[] v3 = new java.io.File[v5];
        java.util.zip.ZipFile[] v6 = new java.util.zip.ZipFile[v5];
        dalvik.system.DexFile[] v2 = new dalvik.system.DexFile[v5];
        java.util.ListIterator v8 = p14.listIterator();
        while (v8.hasNext()) {
            java.io.File v0_1 = ((java.io.File) v8.next());
            String v1 = v0_1.getAbsolutePath();
            v9_1.append(58).append(v1);
            int v7 = v8.previousIndex();
            v4[v7] = v1;
            v3[v7] = v0_1;
            v6[v7] = new java.util.zip.ZipFile(v0_1);
            v2[v7] = dalvik.system.DexFile.loadDex(v1, new StringBuilder().append(v1).append(".dex").toString(), 0);
        }
        v10.set(p13, v9_1.toString());
        android.support.multidex.MultiDex.access$400(p13, "mPaths", v4);
        android.support.multidex.MultiDex.access$400(p13, "mFiles", v3);
        android.support.multidex.MultiDex.access$400(p13, "mZips", v6);
        android.support.multidex.MultiDex.access$400(p13, "mDexs", v2);
        return;
    }

Method com.google.android.gms.dynamite.zzh.<init>() calling method dalvik.system.PathClassLoader.<init>()


    zzh(String p1, ClassLoader p2)
    {
        super(p1, p2);
        return;
    }

Method com.google.android.gms.internal.ads.zzcz.zza() calling method dalvik.system.DexClassLoader.<init>()


    public static com.google.android.gms.internal.ads.zzcz zza(android.content.Context p9, String p10, String p11, boolean p12)
    {
        int v0_0 = 1;
        void v3_0 = new com.google.android.gms.internal.ads.zzcz(p9);
        v3_0.zzru = java.util.concurrent.Executors.newCachedThreadPool(new com.google.android.gms.internal.ads.zzda());
        v3_0.zzqt = p12;
        if (p12) {
            v3_0.zzrz = v3_0.zzru.submit(new com.google.android.gms.internal.ads.zzdb(v3_0));
        }
        v3_0.zzru.execute(new com.google.android.gms.internal.ads.zzdd(v3_0));
        try {
            com.google.android.gms.internal.ads.zzcz$zza v2_7;
            int v4_8 = com.google.android.gms.common.GoogleApiAvailabilityLight.getInstance();
        } catch (int v0) {
            v3_0.zza(0, 1);
            if ((!com.google.android.gms.internal.ads.zzdg.isMainThread()) || (!((Boolean) com.google.android.gms.internal.ads.zzkb.zzik().zzd(com.google.android.gms.internal.ads.zznk.zzbaz)).booleanValue())) {
                v3_0.zzrw = new com.google.android.gms.internal.ads.zzck(0);
                v3_0.zzrx = v3_0.zzrw.zzl(p10);
                try {
                    int v0_33 = v3_0.zzrt.getCacheDir();
                } catch (int v0_18) {
                    throw new com.google.android.gms.internal.ads.zzcw(v0_18);
                } catch (int v0_17) {
                    throw new com.google.android.gms.internal.ads.zzcw(v0_17);
                }
                if (v0_33 == 0) {
                    v0_33 = v3_0.zzrt.getDir("dex", 0);
                    if (v0_33 == 0) {
                        throw new com.google.android.gms.internal.ads.zzcw();
                    }
                }
                android.content.Context v1_22 = v0_33;
                Object[] v5_5 = new Object[2];
                v5_5[0] = v1_22;
                v5_5[1] = "1521499837408";
                int v4_10 = new java.io.File(String.format("%s/%s.jar", v5_5));
                if (!v4_10.exists()) {
                    int v0_39 = v3_0.zzrw.zza(v3_0.zzrx, p11);
                    v4_10.createNewFile();
                    Object[] v5_8 = new java.io.FileOutputStream(v4_10);
                    v5_8.write(v0_39, 0, v0_39.length);
                    v5_8.close();
                }
                v3_0.zzb(v1_22, "1521499837408");
                try {
                    v3_0.zzrv = new dalvik.system.DexClassLoader(v4_10.getAbsolutePath(), v1_22.getAbsolutePath(), 0, v3_0.zzrt.getClassLoader());
                } catch (int v0_3) {
                    com.google.android.gms.internal.ads.zzcz.zzb(v4_10);
                    v3_0 = v3_0.zza(v1_22, "1521499837408");
                    Object[] v5_2 = new Object[2];
                    v5_2[0] = v1_22;
                    v5_2[1] = "1521499837408";
                    com.google.android.gms.internal.ads.zzcz.zzm(String.format("%s/%s.dex", v5_2));
                    throw v0_3;
                }
                com.google.android.gms.internal.ads.zzcz.zzb(v4_10);
                v3_0 = v3_0.zza(v1_22, "1521499837408");
                int v4_4 = new Object[2];
                v4_4[0] = v1_22;
                v4_4[1] = "1521499837408";
                com.google.android.gms.internal.ads.zzcz.zzm(String.format("%s/%s.dex", v4_4));
                if (!v3_0.zzsj) {
                    int v0_8 = new android.content.IntentFilter();
                    v0_8.addAction("android.intent.action.USER_PRESENT");
                    v0_8.addAction("android.intent.action.SCREEN_OFF");
                    v3_0.zzrt.registerReceiver(new com.google.android.gms.internal.ads.zzcz$zza(v3_0, 0), v0_8);
                    v3_0.zzsj = 1;
                }
                v3_0.zzsd = new com.google.android.gms.internal.ads.zzcc(v3_0);
                v3_0.zzsh = 1;
                return v3_0;
            } else {
                throw new IllegalStateException("Task Context initialization must not be called from the UI thread.");
            }
        }
        if (v4_8.getApkVersion(v3_0.zzrt) <= 0) {
            v2_7 = 0;
        } else {
            v2_7 = 1;
        }
        v3_0.zzse = v2_7;
        if (v4_8.isGooglePlayServicesAvailable(v3_0.zzrt) != 0) {
            v0_0 = 0;
        }
        v3_0.zzsf = v0_0;
    }