dexcalibur icon indicating copy to clipboard operation
dexcalibur copied to clipboard

Add Cipher.doFinal hook by default (Feature request)

Open cryptax opened this issue 3 years ago • 1 comments

This is a feature request, not a bug. Fortunately, probably easy to add :)

I recommend you add by default hooks for Cipher.doFinal, and that in the hook, you show the input byte array argument and in the output, the returned byte array.

This is very helpful to view encrypted/decrypted data :)

cryptax avatar May 11 '21 11:05 cryptax

  • would probably be interesting also to have a hook for SecretKeySpec.

For example this is my updated hook to show the byte array containing a key:

 var cls_e993875f544b941d768726a3a29599b5 = Java.use('javax.crypto.spec.SecretKeySpec');

 var meth_24275db9d75101d1dc0a116d9893fea2 = cls_e993875f544b941d768726a3a29599b5.$init.overload('[B','java.lang.String');

 meth_24275db9d75101d1dc0a116d9893fea2.implementation = function(arg0,arg1) {
    
 send({ id:"ZWRkMzg1ODU0OGJkM2EwOWI0ZTBjMzBjNjE3YmZkYmY=", msg:"javax.crypto.spec.SecretKeySpec.<init>(<byte>[]<java.lang.String>)<void>", data:{arg0:arg0, arg1:arg1,}, action:"None before", after:false  });
 var ret = meth_24275db9d75101d1dc0a116d9893fea2.call(this , arg0,arg1);
 send({ id:"ZWRkMzg1ODU0OGJkM2EwOWI0ZTBjMzBjNjE3YmZkYmY=", msg:"javax.crypto.spec.SecretKeySpec.<init>(<byte>[]<java.lang.String>)<void>", data:{}, action:"None before", after:true  });
        
 return ret;

dexcalibur-secretkey

cryptax avatar May 11 '21 11:05 cryptax