脱壳之常用的加固样本特征

2024-03-30 18:12

本文主要是介绍脱壳之常用的加固样本特征,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

梆梆加固样本特征

清单文件入口

android:name=“com.SecShell.SecShell.ApplicationWrapper”

特征

  1. 免费版
    在这里插入图片描述
  2. meta-data
    meta-data
  3. 总结
    assets/secData0.jar
    lib/armeabi/libSecShell.so
    lib/armeabi/libSecShell-x86.so
    梆梆企业版
    assets/classes0.jar
    lib/armeabi-v7a/libDexHelper.so
    lib/armeabi-v7a/ libDexHelper-x86.so
    梆梆是把原dex文件加密放到了secData0.jar,所以直接拿到dex文件,修复配置文件的程序入口点就可以重打包完美运行。
    通过还原加密算法,解密secData0.jar,直接解压解密jar就是原dex。
    secData0.jar文件保存在.cache的classes.dex是加密的,主要是通过hook实现,打开时解密,关闭时加密(open、mmap)。
    /data/app/com.qianyu.helloworld-47o1HjF-eZJXXlpOoPX_nA==/lib/arm/libSecShell.so CC688000 1B6AB000

清单文件

package com.SecShell.SecShell;import android.annotation.TargetApi;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.res.Configuration;
import android.view.LayoutInflater;
import java.lang.reflect.Field;/* loaded from: classes.dex */
public class ApplicationWrapper extends Application {public static Application realApplication = null;static {d.a();System.loadLibrary("SecShell");if (Helper.PPATH != null) {System.load(Helper.PPATH);}if (Helper.J2CNAME.equals("SECNEOJ2C")) {return;}System.loadLibrary(Helper.J2CNAME);}@Override // android.content.ContextWrapperprotected void attachBaseContext(Context context) {super.attachBaseContext(context);if (Boolean.parseBoolean(Helper.ABCCHECK)) {e.a(context);}try {if (!"".equals(Helper.APPNAME)) {realApplication = (Application) getClassLoader().loadClass(Helper.APPNAME).newInstance();}} catch (Exception e) {realApplication = null;}Helper.attach(realApplication, context);}@Override // android.content.ContextWrapper, android.content.Contextpublic boolean bindService(Intent intent, ServiceConnection serviceConnection, int i) {if (realApplication != null) {Helper.b(realApplication);return realApplication.bindService(intent, serviceConnection, i);}return super.bindService(intent, serviceConnection, i);}@Override // android.app.Application, android.content.ComponentCallbackspublic void onConfigurationChanged(Configuration configuration) {super.onConfigurationChanged(configuration);if (realApplication != null) {realApplication.onConfigurationChanged(configuration);}}@Override // android.app.Applicationpublic void onCreate() {super.onCreate();try {Helper.c();} catch (Throwable th) {}if (realApplication != null) {Helper.attach(realApplication, null);realApplication.onCreate();LayoutInflater from = LayoutInflater.from(getApplicationContext());try {Field declaredField = LayoutInflater.class.getDeclaredField("mContext");declaredField.setAccessible(true);declaredField.set(from, realApplication);} catch (Exception e) {}}}@Override // android.app.Application, android.content.ComponentCallbackspublic void onLowMemory() {super.onLowMemory();if (realApplication != null) {realApplication.onLowMemory();}}@Override // android.app.Applicationpublic void onTerminate() {super.onTerminate();if (realApplication != null) {realApplication.onTerminate();}}@Override // android.app.Application, android.content.ComponentCallbacks2@TargetApi(14)public void onTrimMemory(int i) {try {super.onTrimMemory(i);if (realApplication != null) {realApplication.onTrimMemory(i);}} catch (Exception e) {}}@Override // android.app.Application@TargetApi(14)public void registerActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks activityLifecycleCallbacks) {super.registerActivityLifecycleCallbacks(activityLifecycleCallbacks);if (realApplication != null) {realApplication.registerActivityLifecycleCallbacks(activityLifecycleCallbacks);}}
}

Helper

package com.SecShell.SecShell;import android.app.Application;
import android.content.Context;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;/* loaded from: classes.dex */
public class Helper {public static ClassLoader cl;public static String PPATH = null;public static String JNIPPATH = null;public static String PKGNAME = "com.qianyu.helloworld";public static String APPNAME = "";public static String J2CNAME = "SECNEOJ2C";public static String ABCCHECK = "SECNEOCHECK";public static String ISMPASS = "SECNEOMPASS";public static native void attach(Application application, Context context);public static native void b(Application application);public static native void c();public static native String d(String str);public static native Object[] e(Object obj, List list, String str);public static void f(ClassLoader classLoader, String str, String str2) {b.a(classLoader, str, str2);}public static void g(Object obj) {b.a(obj);}public static Object h(ClassLoader classLoader) {return new f(":", classLoader);}public static boolean isInstalled(String str) {BufferedReader bufferedReader;String readLine;try {bufferedReader = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("pm path " + str).getInputStream()));} catch (IOException e) {e.printStackTrace();}do {readLine = bufferedReader.readLine();if (readLine == null) {return false;}} while (!readLine.startsWith("package:"));return true;}public static void stub() {}
}

a

public final class a {public static final String[] a = {"com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu", "com.koushikdutta.superuser", "com.thirdparty.superuser", "com.yellowes.su"};public static final String[] b = {"com.koushikdutta.rommanager", "com.koushikdutta.rommanager.license", "com.dimonvideo.luckypatcher", "com.chelpus.lackypatch", "com.ramdroid.appquarantine", "com.ramdroid.appquarantinepro"};public static final String[] c = {"com.devadvance.rootcloak", "com.devadvance.rootcloakplus", "de.robv.android.xposed.installer", "com.saurik.substrate", "com.zachspong.temprootremovejb", "com.amphoras.hidemyroot", "com.amphoras.hidemyrootadfree", "com.formyhm.hiderootPremium", "com.formyhm.hideroot"};public static final String[] d = {"/data/local/", "/data/local/bin/", "/data/local/xbin/", "/sbin/", "/su/bin/", "/system/bin/", "/system/bin/.ext/", "/system/bin/failsafe/", "/system/sd/xbin/", "/system/usr/we-need-root/", "/system/xbin/"};public static final String[] e = {"/system", "/system/bin", "/system/sbin", "/system/xbin", "/vendor/bin", "/sbin", "/etc"};
}

b

/* loaded from: classes.dex */
public class b {private static ArrayList a = new ArrayList();/* JADX INFO: Access modifiers changed from: private *//* loaded from: classes.dex */public static final class a {private static Object[] a(Object obj, ArrayList arrayList, File file) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {return (Object[]) b.b(obj, "makeDexElements", ArrayList.class, File.class).invoke(obj, arrayList, file);}/* JADX INFO: Access modifiers changed from: private */public static void b(ClassLoader classLoader, List list, File file) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {Object obj = b.b(classLoader, "pathList").get(classLoader);b.b(obj, "dexElements", a(obj, new ArrayList(list), file));}}/* JADX INFO: Access modifiers changed from: private *//* renamed from: com.SecShell.SecShell.b$b  reason: collision with other inner class name *//* loaded from: classes.dex */public static final class C0000b {/* JADX INFO: Access modifiers changed from: private */public static void b(ClassLoader classLoader, List list, File file) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {IOException[] iOExceptionArr;Object obj = b.b(classLoader, "pathList").get(classLoader);ArrayList arrayList = new ArrayList();b.b(obj, "dexElements", b(obj, new ArrayList(list), file, arrayList), Build.VERSION.SDK_INT < 28);if (arrayList.size() > 0) {Iterator it = arrayList.iterator();while (it.hasNext()) {IOException iOException = (IOException) it.next();}Field b = b.b(classLoader, "dexElementsSuppressedExceptions");IOException[] iOExceptionArr2 = (IOException[]) b.get(classLoader);if (iOExceptionArr2 == null) {iOExceptionArr = (IOException[]) arrayList.toArray(new IOException[arrayList.size()]);} else {IOException[] iOExceptionArr3 = new IOException[arrayList.size() + iOExceptionArr2.length];arrayList.toArray(iOExceptionArr3);System.arraycopy(iOExceptionArr2, 0, iOExceptionArr3, arrayList.size(), iOExceptionArr2.length);iOExceptionArr = iOExceptionArr3;}b.set(classLoader, iOExceptionArr);}}/* JADX INFO: Access modifiers changed from: private */public static Object[] b(Object obj, ArrayList arrayList, File file, ArrayList arrayList2) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {Method method = null;try {method = b.b(obj, "makeDexElements", ArrayList.class, File.class, ArrayList.class);} catch (Exception e) {}if (method == null) {try {method = b.b(obj, "makePathElements", List.class, File.class, List.class);} catch (Exception e2) {}}return (Object[]) method.invoke(obj, arrayList, file, arrayList2);}}/* JADX INFO: Access modifiers changed from: private *//* loaded from: classes.dex */public static final class c {/* JADX INFO: Access modifiers changed from: private */public static void b(ClassLoader classLoader, List list) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, IOException {int size = list.size();Field b = b.b(classLoader, "path");StringBuilder sb = new StringBuilder((String) b.get(classLoader));String[] strArr = new String[size];File[] fileArr = new File[size];ZipFile[] zipFileArr = new ZipFile[size];DexFile[] dexFileArr = new DexFile[size];ListIterator listIterator = list.listIterator();while (listIterator.hasNext()) {File file = (File) listIterator.next();String absolutePath = file.getAbsolutePath();sb.append(':').append(absolutePath);int previousIndex = listIterator.previousIndex();strArr[previousIndex] = absolutePath;fileArr[previousIndex] = file;zipFileArr[previousIndex] = new ZipFile(file);dexFileArr[previousIndex] = DexFile.loadDex(absolutePath, absolutePath + ".dex", 0);}b.set(classLoader, sb.toString());b.b(classLoader, "mPaths", strArr);b.b(classLoader, "mFiles", fileArr);b.b(classLoader, "mZips", zipFileArr);b.b(classLoader, "mDexs", dexFileArr);}}private static void a(ClassLoader classLoader, File file, List list) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, IOException {if (list.isEmpty()) {return;}if ((Build.VERSION.RELEASE.equals("P") || Build.VERSION.SDK_INT >= 28) && !Boolean.parseBoolean(Helper.ISMPASS)) {a(classLoader, ((File) list.get(0)).getAbsolutePath());} else if (Build.VERSION.SDK_INT >= 19) {C0000b.b(classLoader, list, file);} else if (Build.VERSION.SDK_INT >= 14) {a.b(classLoader, list, file);} else {c.b(classLoader, list);}}private static void a(ClassLoader classLoader, String str) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {IOException[] iOExceptionArr;Object obj = b(classLoader, "pathList").get(classLoader);ArrayList arrayList = new ArrayList();b(obj, "dexElements", Helper.e(obj, arrayList, str), false);if (arrayList.size() > 0) {Iterator it = arrayList.iterator();while (it.hasNext()) {((IOException) it.next()).printStackTrace(System.out);}Field b = b(classLoader, "dexElementsSuppressedExceptions");IOException[] iOExceptionArr2 = (IOException[]) b.get(classLoader);if (iOExceptionArr2 == null) {iOExceptionArr = (IOException[]) arrayList.toArray(new IOException[arrayList.size()]);} else {IOException[] iOExceptionArr3 = new IOException[arrayList.size() + iOExceptionArr2.length];arrayList.toArray(iOExceptionArr3);System.arraycopy(iOExceptionArr2, 0, iOExceptionArr3, arrayList.size(), iOExceptionArr2.length);iOExceptionArr = iOExceptionArr3;}b.set(classLoader, iOExceptionArr);}}public static void a(ClassLoader classLoader, String str, String str2) {try {a(classLoader, new File(str2), Arrays.asList(new File(str)));} catch (Exception e) {}}public static void a(Object obj) {Object[] objArr;try {ArrayList arrayList = new ArrayList();Field b = b(obj, "dexElements");for (Object obj2 : (Object[]) b.get(obj)) {DexFile dexFile = (DexFile) b(obj2, "dexFile").get(obj2);if (dexFile != null) {arrayList.add(new File(dexFile.getName()));a.add(dexFile);}}b.set(obj, C0000b.b(obj, arrayList, null, new ArrayList()));} catch (Exception e) {}}/* JADX INFO: Access modifiers changed from: private */public static Field b(Object obj, String str) throws NoSuchFieldException {for (Class<?> cls = obj.getClass(); cls != null; cls = cls.getSuperclass()) {try {Field declaredField = cls.getDeclaredField(str);if (!declaredField.isAccessible()) {declaredField.setAccessible(true);}return declaredField;} catch (NoSuchFieldException e) {}}throw new NoSuchFieldException("Field " + str + " not found in " + obj.getClass());}/* JADX INFO: Access modifiers changed from: private */public static Method b(Object obj, String str, Class... clsArr) throws NoSuchMethodException {for (Class<?> cls = obj.getClass(); cls != null; cls = cls.getSuperclass()) {try {Method declaredMethod = cls.getDeclaredMethod(str, clsArr);if (!declaredMethod.isAccessible()) {declaredMethod.setAccessible(true);}return declaredMethod;} catch (NoSuchMethodException e) {}}throw new NoSuchMethodException("Method " + str + " with parameters " + Arrays.asList(clsArr) + " not found in " + obj.getClass());}/* JADX INFO: Access modifiers changed from: private */public static void b(Object obj, String str, Object[] objArr) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {b(obj, str, objArr, true);}/* JADX INFO: Access modifiers changed from: private */public static void b(Object obj, String str, Object[] objArr, boolean z) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {Field b = b(obj, str);Object[] objArr2 = (Object[]) b.get(obj);Object[] objArr3 = (Object[]) Array.newInstance(objArr2.getClass().getComponentType(), objArr2.length + objArr.length);if (z) {System.arraycopy(objArr2, 0, objArr3, objArr.length, objArr2.length);System.arraycopy(objArr, 0, objArr3, 0, objArr.length);} else {System.arraycopy(objArr2, 0, objArr3, 0, objArr2.length);System.arraycopy(objArr, 0, objArr3, objArr2.length, objArr.length);}b.set(obj, objArr3);}
}

c

/* loaded from: classes.dex */
public class c {public static int a(String[] strArr) {try {int i = 0;for (String str : strArr) {try {if (b(str)) {i++;}} catch (Throwable th) {return i;}}return i;} catch (Throwable th2) {return 0;}}public static boolean a(String str) {try {return new File(str).exists();} catch (Exception e) {return false;}}public static boolean b(String str) {try {return a(str);} catch (Throwable th) {th.printStackTrace();return false;}}
}

d

/* loaded from: classes.dex */
public class d extends FileObserver {private static d a;private static Object b = new Object();private static boolean c = true;public d(String str, int i) {super(str, i);}public static void a() {Thread[] threadArr = new Thread[20];int enumerate = Thread.currentThread().getThreadGroup().enumerate(threadArr);boolean z = false;for (int i = 0; i < enumerate; i++) {if ("FileObserver".equals(threadArr[i].getName())) {z = true;}}if (z) {String b2 = b();new File(b2, "miui_notify" + Process.myPid()).delete();a = new d(b2, 256);a.startWatching();try {new File(b2, "miui_notify" + Process.myPid()).createNewFile();} catch (IOException e) {}synchronized (b) {try {if (c) {b.wait(1000L);}} catch (InterruptedException e2) {}}new File(b2, "miui_notify" + Process.myPid()).delete();}}private static String b() {try {Class<?> cls = Class.forName("android.app.ActivityThread");Method method = cls.getMethod("currentActivityThread", new Class[0]);Field declaredField = cls.getDeclaredField("mBoundApplication");boolean isAccessible = declaredField.isAccessible();declaredField.setAccessible(true);Object obj = declaredField.get(method.invoke(null, new Object[0]));declaredField.setAccessible(isAccessible);Field declaredField2 = obj.getClass().getDeclaredField("appInfo");boolean isAccessible2 = declaredField2.isAccessible();declaredField2.setAccessible(true);declaredField2.setAccessible(isAccessible2);return ((ApplicationInfo) declaredField2.get(obj)).dataDir;} catch (Exception e) {return "/data/data/" + Helper.PKGNAME;}}@Override // android.os.FileObserverpublic void onEvent(int i, String str) {stopWatching();synchronized (b) {c = false;b.notify();}try {Thread.sleep(3000L);} catch (InterruptedException e) {}}
}

e

/* loaded from: classes.dex */
public class e {private final Context a;private boolean b = true;public e(Context context) {this.a = context;}public static void a(Context context) {if (new e(context).a()) {System.exit(0);}}private boolean a(List list) {boolean z = false;PackageManager packageManager = this.a.getPackageManager();Iterator it = list.iterator();while (true) {boolean z2 = z;if (!it.hasNext()) {return z2;}try {packageManager.getPackageInfo((String) it.next(), 0);z = true;} catch (PackageManager.NameNotFoundException e) {z = z2;}}}public boolean a() {return b() || c() || a("su") || d() || e() || f() || h();}public boolean a(String str) {String[] strArr;int length = a.d.length;boolean z = false;for (int i = 0; i < length; i++) {if (new File(strArr[i] + str).exists()) {z = true;}}return z;}public boolean a(String[] strArr) {ArrayList arrayList = new ArrayList();arrayList.addAll(Arrays.asList(a.a));if (strArr != null && strArr.length > 0) {arrayList.addAll(Arrays.asList(strArr));}return a(arrayList);}public boolean b() {return a((String[]) null);}public boolean b(String[] strArr) {ArrayList arrayList = new ArrayList();arrayList.addAll(Arrays.asList(a.b));if (strArr != null && strArr.length > 0) {arrayList.addAll(Arrays.asList(strArr));}return a(arrayList);}public boolean c() {return b(null);}/* JADX WARN: Code restructure failed: missing block: B:14:0x0072, code lost:if (r3.equals("0") != false) goto L18;*//*Code decompiled incorrectly, please refer to instructions dump.To view partially-correct code enable 'Show inconsistent code' option in preferences*/public boolean d() {/*r8 = this;r4 = 0r0 = 1r2 = 0java.lang.ProcessBuilder r1 = new java.lang.ProcessBuilder     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r3 = 2java.lang.String[] r3 = new java.lang.String[r3]     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r5 = 0java.lang.String r6 = "getprop"r3[r5] = r6     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r5 = 1java.lang.String r6 = "ro.debuggable"r3[r5] = r6     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r1.<init>(r3)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r3 = 1r1.redirectErrorStream(r3)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82java.lang.Process r1 = r1.start()     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82java.io.BufferedReader r3 = new java.io.BufferedReader     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82java.io.InputStreamReader r5 = new java.io.InputStreamReader     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82java.io.InputStream r1 = r1.getInputStream()     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r5.<init>(r1)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82r3.<init>(r5)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82java.lang.String r1 = ""java.lang.String r1 = r3.readLine()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dif (r1 == 0) goto L97java.lang.String r2 = "1"boolean r1 = r1.equals(r2)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dif (r1 == 0) goto L97r1 = r0L3c:if (r1 != 0) goto L94java.lang.ProcessBuilder r2 = new java.lang.ProcessBuilder     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr5 = 2java.lang.String[] r5 = new java.lang.String[r5]     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr6 = 0java.lang.String r7 = "getprop"r5[r6] = r7     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr6 = 1java.lang.String r7 = "ro.secure"r5[r6] = r7     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr2.<init>(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr5 = 1r2.redirectErrorStream(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8djava.lang.Process r5 = r2.start()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8djava.io.BufferedReader r2 = new java.io.BufferedReader     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8djava.io.InputStreamReader r6 = new java.io.InputStreamReader     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8djava.io.InputStream r5 = r5.getInputStream()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr6.<init>(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8dr2.<init>(r6)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8djava.lang.String r3 = r2.readLine()     // Catch: java.lang.Throwable -> L8a java.lang.Exception -> L8fif (r3 == 0) goto L92java.lang.String r5 = "0"boolean r3 = r3.equals(r5)     // Catch: java.lang.Throwable -> L8a java.lang.Exception -> L8fif (r3 == 0) goto L92L74:com.SecShell.SecShell.g.a(r2)L77:return r0L78:r0 = move-exceptionr3 = r2L7a:r0.printStackTrace()     // Catch: java.lang.Throwable -> L88com.SecShell.SecShell.g.a(r3)r0 = r4goto L77L82:r0 = move-exceptionr3 = r2L84:com.SecShell.SecShell.g.a(r3)throw r0L88:r0 = move-exceptiongoto L84L8a:r0 = move-exceptionr3 = r2goto L84L8d:r0 = move-exceptiongoto L7aL8f:r0 = move-exceptionr3 = r2goto L7aL92:r0 = r1goto L74L94:r0 = r1r2 = r3goto L74L97:r1 = r4goto L3c*/throw new UnsupportedOperationException("Method not decompiled: com.SecShell.SecShell.e.d():boolean");}public boolean e() {BufferedReader bufferedReader;BufferedReader bufferedReader2 = null;try {ProcessBuilder processBuilder = new ProcessBuilder("mount");processBuilder.redirectErrorStream(true);Process start = processBuilder.start();bufferedReader = new BufferedReader(new InputStreamReader(start.getInputStream()));boolean z = false;while (true) {try {String readLine = bufferedReader.readLine();if (readLine == null) {start.waitFor();g.a(bufferedReader);return z;}String[] split = readLine.split(" ");if (split.length >= 4) {String str = split[1];String str2 = split[3];for (String str3 : a.e) {if (str.equalsIgnoreCase(str3)) {String[] split2 = str2.split(",");int length = split2.length;int i = 0;while (true) {if (i >= length) {break;} else if (split2[i].equalsIgnoreCase("rw")) {z = true;break;} else {i++;}}}}}} catch (Exception e) {bufferedReader2 = bufferedReader;g.a(bufferedReader2);return false;} catch (Throwable th) {th = th;g.a(bufferedReader);throw th;}}} catch (Exception e2) {} catch (Throwable th2) {th = th2;bufferedReader = null;}}public boolean f() {BufferedReader bufferedReader;Process start;BufferedReader bufferedReader2;try {ProcessBuilder processBuilder = new ProcessBuilder("which", "su");processBuilder.redirectErrorStream(false);start = processBuilder.start();bufferedReader2 = new BufferedReader(new InputStreamReader(start.getInputStream()));} catch (Throwable th) {bufferedReader = null;}try {String readLine = bufferedReader2.readLine();start.waitFor();g.a(bufferedReader2);if (readLine != null) {if (readLine.endsWith("su")) {return true;}}return false;} catch (Throwable th2) {bufferedReader = bufferedReader2;if (bufferedReader != null) {g.a(bufferedReader);}return false;}}public boolean g() {return true;}public boolean h() {if (g()) {String[] strArr = new String[a.d.length];for (int i = 0; i < strArr.length; i++) {strArr[i] = a.d[i] + "su";}return c.a(strArr) > 0;}return false;}
}

f

/* loaded from: classes.dex */
class f extends PathClassLoader {private final ClassLoader a;public f(String str, ClassLoader classLoader) {super(str, classLoader.getParent());this.a = classLoader;}@Override // dalvik.system.BaseDexClassLoader, java.lang.ClassLoaderpublic Class findClass(String str) throws ClassNotFoundException {return (str == null || !str.equals(Helper.class.getName())) ? super.findClass(str) : this.a.loadClass(str);}
}

g


/* loaded from: classes.dex */
public class g {public static void a(Closeable closeable) {if (closeable != null) {try {closeable.close();} catch (Exception e) {}}}
}

乐谷加固样本特征(ELF区段加密和案例)

主要看assets文件夹和lib文件夹

so文件

lib-shell.so

这篇关于脱壳之常用的加固样本特征的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/862214

相关文章

HarmonyOS学习(七)——UI(五)常用布局总结

自适应布局 1.1、线性布局(LinearLayout) 通过线性容器Row和Column实现线性布局。Column容器内的子组件按照垂直方向排列,Row组件中的子组件按照水平方向排列。 属性说明space通过space参数设置主轴上子组件的间距,达到各子组件在排列上的等间距效果alignItems设置子组件在交叉轴上的对齐方式,且在各类尺寸屏幕上表现一致,其中交叉轴为垂直时,取值为Vert

JS常用组件收集

收集了一些平时遇到的前端比较优秀的组件,方便以后开发的时候查找!!! 函数工具: Lodash 页面固定: stickUp、jQuery.Pin 轮播: unslider、swiper 开关: switch 复选框: icheck 气泡: grumble 隐藏元素: Headroom

【C++】_list常用方法解析及模拟实现

相信自己的力量,只要对自己始终保持信心,尽自己最大努力去完成任何事,就算事情最终结果是失败了,努力了也不留遗憾。💓💓💓 目录   ✨说在前面 🍋知识点一:什么是list? •🌰1.list的定义 •🌰2.list的基本特性 •🌰3.常用接口介绍 🍋知识点二:list常用接口 •🌰1.默认成员函数 🔥构造函数(⭐) 🔥析构函数 •🌰2.list对象

常用的jdk下载地址

jdk下载地址 安装方式可以看之前的博客: mac安装jdk oracle 版本:https://www.oracle.com/java/technologies/downloads/ Eclipse Temurin版本:https://adoptium.net/zh-CN/temurin/releases/ 阿里版本: github:https://github.com/

浅谈主机加固,六种有效的主机加固方法

在数字化时代,数据的价值不言而喻,但随之而来的安全威胁也日益严峻。从勒索病毒到内部泄露,企业的数据安全面临着前所未有的挑战。为了应对这些挑战,一种全新的主机加固解决方案应运而生。 MCK主机加固解决方案,采用先进的安全容器中间件技术,构建起一套内核级的纵深立体防护体系。这一体系突破了传统安全防护的局限,即使在管理员权限被恶意利用的情况下,也能确保服务器的安全稳定运行。 普适主机加固措施:

30常用 Maven 命令

Maven 是一个强大的项目管理和构建工具,它广泛用于 Java 项目的依赖管理、构建流程和插件集成。Maven 的命令行工具提供了大量的命令来帮助开发人员管理项目的生命周期、依赖和插件。以下是 常用 Maven 命令的使用场景及其详细解释。 1. mvn clean 使用场景:清理项目的生成目录,通常用于删除项目中自动生成的文件(如 target/ 目录)。共性规律:清理操作

019、JOptionPane类的常用静态方法详解

目录 JOptionPane类的常用静态方法详解 1. showInputDialog()方法 1.1基本用法 1.2带有默认值的输入框 1.3带有选项的输入对话框 1.4自定义图标的输入对话框 2. showConfirmDialog()方法 2.1基本用法 2.2自定义按钮和图标 2.3带有自定义组件的确认对话框 3. showMessageDialog()方法 3.1

工作常用指令与快捷键

Git提交代码 git fetch  git add .  git commit -m “desc”  git pull  git push Git查看当前分支 git symbolic-ref --short -q HEAD Git创建新的分支并切换 git checkout -b XXXXXXXXXXXXXX git push origin XXXXXXXXXXXXXX

java常用面试题-基础知识分享

什么是Java? Java是一种高级编程语言,旨在提供跨平台的解决方案。它是一种面向对象的语言,具有简单、结构化、可移植、可靠、安全等特点。 Java的主要特点是什么? Java的主要特点包括: 简单性:Java的语法相对简单,易于学习和使用。面向对象:Java是一种完全面向对象的语言,支持封装、继承和多态。跨平台性:Java的程序可以在不同的操作系统上运行,称为"Write once,

nginx介绍及常用功能

什么是nginx nginx跟Apache一样,是一个web服务器(网站服务器),通过HTTP协议提供各种网络服务。 Apache:重量级的,不支持高并发的服务器。在Apache上运行数以万计的并发访问,会导致服务器消耗大量内存。操作系统对其进行进程或线程间的切换也消耗了大量的CPU资源,导致HTTP请求的平均响应速度降低。这些都决定了Apache不可能成为高性能WEB服务器  nginx: