Brida
Brida copied to clipboard
Custom plugin not shows encrypted or decrypted result
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
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
Here my detail custom plugin set up:
My Custom Plugin:
My JS hook script
After right-clicking request and using MyDecrypt iContext Menu:
I can confirm that I choose the right Java class to hook
Hi @federicodotta thanks for your quick reply
the application has 2 function:
- doDecrypt
- doEncrypt
and I use like in the comment before.
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