m0bilesecurity / RMS-Runtime-Mobile-Security

Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime
https://twitter.com/mobilesecurity_
GNU General Public License v3.0
2.58k stars 373 forks source link

String Comparison API hook #104

Open brunoaduarte opened 1 year ago

brunoaduarte commented 1 year ago

Shouldn't the args be printed in the args fields instead of only their types?

[API_Monitor]
{
  "category": "String Comparison",
  "class": "java.lang.String",
  "method": "equals",
  "args": "[\"<instance: java.lang.Object, $className: java.lang.String>\"]",
  "returnValue": "true",
  "calledFrom": "\u0007"
}
brunoaduarte commented 1 year ago

Hi @m0bilesecurity , how can I print the string of the mapped keys and values? for Input and Output instead of the type

Class: com.facebook.msys.mci.NetworkUtils
Method: public static android.util.Pair httpHeaderMapToKeysAndValues(java.util.Map)
Called by: com.facebook.msys.mci.UrlResponse.<init>(:290439)
Input: [object Object]
Output: Pair{[Ljava.lang.String;@e41046b [Ljava.lang.String;@6c9abc8}
StackTrace:
        at com.facebook.msys.mci.NetworkUtils.httpHeaderMapToKeysAndValues(Native Method)
        at X.1dq.A00(:328004)
        at com.facebook.redex.RunnableRunnableShape3S0300000_I1.run(:668801)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.facebook.redex.RunnableRunnableShape10S0200000_I0_8.run(:508286)
        at java.lang.Thread.run(Thread.java:764)
m0bilesecurity commented 1 year ago

Ciao @brunoaduarte, you need to analyse every object one by one. Do you have some time to improve the API_Monitor script? https://github.com/m0bilesecurity/RMS-Runtime-Mobile-Security/blob/64faab0cf8112ebab00c9ef83782e8b9a586a8d7/agent/RMS_core.js#L487 Thanks