跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[问与答] frida rcp 调用 android app 中的函数无正常返回

发表于

java code by jadx:

public void getUnifiedSign(...) {
...
   try {
...
      //This interface cannot be found in the implementation class in Jadx, and it should be in the.so package.
      HashMap<String, String> securityFactors = this.mUnifiedSign.getSecurityFactors(hashMap3);
      if (securityFactors != null && !securityFactors.isEmpty()) {
         return securityFactors;
      }
      TBSdkLog.e(...);
      return null;
...
   } catch (Throwable th) {
      TBSdkLog.e("mtopsdk.InnerSignImpl", getInstanceId() + " [getUnifiedSign]get sign failed exception ,appKeyIndex=" + this.mtopConfig.appKeyIndex + ",authCode=" + this.mtopConfig.authCode, th);
      return null;
   }
}

hook.js

rpc.exports = {
    sign:function() {
        Java.perform(function() {
            reSign0();
            sign0();
        })
    }
};
function reSign0() {
    //Here, the getUnifiedSign is overridden, and the input and output parameters are printed.
}
function sign0() {
...
    let resp = isi.getUnifiedSign(p1, p2, p3, p4, p5, p6);
    //the resp is null
...
}
}

Frida RCP 调用 getUnifiedSign 总是返回 null ,确认代码已经到达了这个 getSecurityFactors ,但可能直接报错导致返回 null 。但是如果是报错,应该会走到下面的 catch ,并且会输出日志,但是没有日志。日志 hook 已经验证过没有问题,当传一些不正常参数时 hook 的日志能打出来。 敢问如何排查这个问题?和这个鬼杠上了,参考过其它帖子的旧版本弄过但也没成功,还是弄这个最新版的。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.