Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulate stack trace related methods #23

Open
ghost opened this issue Apr 20, 2018 · 1 comment
Open

Emulate stack trace related methods #23

ghost opened this issue Apr 20, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 20, 2018

I tring this apk http://www8.zippyshare.com/v/vQTFFChK/file.html Uret Patcher v3.5.apk,
you can find it on https://jasi2169.wordpress.com/ , this apk encrypt strings with a dinamic key which depends on method call.

    StackTraceElement v1 = new RuntimeException().getStackTrace()[1];
    String v4 = new StringBuffer(v1.getMethodName()).insert(0, v1.getClassName()).toString();
    // code with xor and string v4

I used android x86 (Remix OS). I got this log on logcat

04-20 08:26:20.000 15205 15205 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
04-20 08:26:20.002 15205 15205 D AndroidRuntime: CheckJNI is OFF
04-20 08:26:20.002 15205 15205 E cutils-trace: Error opening trace file: Permission denied (13)
04-20 08:26:20.019 15205 15205 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
04-20 08:26:20.023 15205 15205 W art     : Could not create mount namespace.
04-20 08:26:20.023 15205 15205 W         : Failed to bind-mount /system/lib/x86/cpuinfo as /proc/cpuinfo: Operation not permitted
04-20 08:26:20.034 15205 15205 E memtrack: Couldn't load memtrack module (No such file or directory)
04-20 08:26:20.034 15205 15205 E android.os.Debug: failed to load memtrack module: -2
04-20 08:26:20.035 15205 15205 I Radio-JNI: register_android_hardware_Radio DONE
04-20 08:26:20.044 15205 15205 D AndroidRuntime: Calling main entry org.cf.oracle.Driver
04-20 08:26:20.071 15205 15205 D AndroidRuntime: Shutting down VM

This is the command line used:

# dex-oracle -i zone/jasi2169/uretpatcher/Xposed prova.apk 
Optimizing 67 methods over 2385 Smali files.
Optimizations: string_lookups=0, string_decrypts=193, class_lookups=0
Time elapsed 20.289434831 seconds

On class zone/jasi2169/uretpatcher/Xposed all decrypted strings are wrong and one string is not decrypted.

@ghost
Copy link
Author

ghost commented Apr 20, 2018

I developed a simple app with an activity and a class with static method which take the stack trace with a RuntimeException and the result for this code

StackTraceElement v1 = new RuntimeException().getStackTrace()[1];
String v4 = new StringBuffer(v1.getMethodName()).insert(0, v1.getClassName()).toString();

is invokejava.lang.reflect.Method so original stack trace is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants