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

Custom plugin not shows encrypted or decrypted result #115

Open
24h7d opened this issue Jul 27, 2023 · 4 comments
Open

Custom plugin not shows encrypted or decrypted result #115

24h7d opened this issue Jul 27, 2023 · 4 comments

Comments

@24h7d
Copy link

24h7d commented Jul 27, 2023

I have a problem when using custom plugins.
After analyzing the stack trace I found the function for encrypt and decrypt the request / response.
but when I hook it and used it in the custom plugin (I follow from the latest youtube video for Brida).
nothing error shows, and the Brida console log was executed but decrypted/encrypted result does not appear in the highlighted parameter I choose.
this is my additional js script in the brida.js
mydecrypt: function(message) {
var ret = null;
Java.perform(function(){
var yoshi = Java.use("com.app.name.utils.AES");
console.log("Plugin Decrypt");
ret = yoshi.doDecrypt(message);
});
return ret;
},

the console.log executed but not returning any value.
I use brida 0.5 and frida-compile 9.5.2

@federicodotta
Copy link
Owner

Hi @24h7d,

Can you please give me more information? How do you configured the custom plugin?

If you click on the "Debug" button of the plugin and then try it, what output do you receive?

Federico

@24h7d
Copy link
Author

24h7d commented Jul 29, 2023

Here my detail custom plugin set up:

My Custom Plugin:
Screen Shot 2023-07-29 at 12 40 21

My JS hook script
Screen Shot 2023-07-29 at 12 35 36

After right-clicking request and using MyDecrypt iContext Menu:
Screen Shot 2023-07-29 at 19 26 25

I can confirm that I choose the right Java class to hook

@24h7d
Copy link
Author

24h7d commented Aug 1, 2023

Hi @federicodotta thanks for your quick reply

the application has 2 function:

  1. doDecrypt
  2. doEncrypt

and I use like in the comment before.

@federicodotta
Copy link
Owner

Hi @24h7d,

Sorry for the delay in the response.

One question. The doDecrypt and doEncrypt functions are static functions? Because you call them directly from the class but if they are not static you have to create first an instance of the class (of get one with a Frida hook or with Java.choose) and then call the functions.

If you call the same functions directly with Frida CLI they work correctly?

Federico

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

2 participants