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
Bug - Hooking lab | java.lang.Object #18
Comments
|
Hey @4val0v can you kindly share the APK? |
Hi @m0bilesecurity! No difference what will it be application Here look: Here is the worst code to reproduce the error: (Click)public class MainActivity extends AppCompatActivity {
public void test(char[] chars, Object[] objects, Object obj, String[][] strArr, Long[][] arrLong, String[][][][] lol) {
System.out.println("Hello");
}
}
|
I'll leave it here, suddenly someone will be interested: |
@m0bilesecurity Run the generated code using frida to see the error
|
Hey @4val0v, many thanks for all the precious info provided.
we need to adjust the laodmethod in default.js in order to convert arrays in the right notation. Does exist something ready to use? |
@m0bilesecurity Java - Frida methods: https://neo-geo2.gitbook.io/adventures-on-security/frida-scripting-guide/methods
https://android.googlesource.com/platform/dalvik/+/gingerbread/docs/dex-format.html |
@m0bilesecurity If you have time, you can continue... Java.perform(function() {
var targetClass = Java.use("com.wtf.myapplication.MainActivity");
var currentMethods = targetClass.class.getDeclaredMethods(); // all methods declared in a Java Class
console.log("Count methods for class: " + currentMethods.length);
for (var i = 0; i < currentMethods.length; i++) {
var args = currentMethods[i].toString().split('(')[1].split(')')[0].split(',');
console.log("\nCurrent method: " + currentMethods[i].getName());
console.log("args: " + args);
// TODO for i
};
}); Take a look here: https://juejin.im/post/5e967cb5f265da47a74134a6#heading-9 (It didn't work for me) |
Please check this quick and dirty solution.
Some tests are needed. If you want to help me, just replace the loadmethods function inside default.js with the code below:
|
@4val0v can you kindly add a button to your test app in order to call the "test" method? |
@m0bilesecurity Now everything is OK ! Still need fixed a functional on page "Dump TAB" -> "Hook all methods" |
FIXED 🚀! Check the last commit. Under the hood, the hook is managed correctly also in the dump page ;) |
Describe the bug:
Incorrect parameters generation for method overloading !
Steps to reproduce:
Custom Logging Implementation: (See methods)
Go to "hook lab", select a Logging class: (highlighted)
Generated:
java.lang.Object[]
[Ljava.lang.Object;
Desktop:
Smartphone:
The text was updated successfully, but these errors were encountered: