逆向分析某信营业厅APP

逆向分析某信营业厅APP

APP版本号 10.3.2

工具

  • IDA
  • FRIDA
  • JEB

抓包分析

在这里插入图片描述
可以看到显示红色的,抓包失败。
从ua中可以看到,采用的okhttp通信框架,接下来的思路就是反编译客户端,静态分析。

查壳、脱壳

经工具查询,得知其采用的是 爱加密的壳。

  • Frida Hook
frida -U -f com.ct.client -l 1.js --no-pause

执行完,APP自动退出,控制台中出现
在这里插入图片描述
根据以下两个so的名字,进一步确认其采用的是 爱加密

libexec.so、libexecmain.so

接下来需要做的是 绕过 爱加密的反Frida。

  • 反Frida
function hook_pthread_create() {
    
    
    console.log("libexec.so --- " + Process.findModuleByName("libexec.so").base)
    Interceptor.attach(Module.findExportByName("libexec.so", "pthread_create"), {
    
    
        onEnter(args) {
    
    
            let func_addr = args[2]
            console.log("The thread function address is " + func_addr)
            print_c_stack(this.context);
        }
    })
}

根据以上脚本 确定 pthread_create 的函数偏移位置

frida -U -f com.ct.client -l anti_frida.js --no-pause

在这里插入图片描述

  • 脱壳
    在这里插入图片描述
frida -U -f com.ct.client -l dx_dump_dex.js --no-pause

在这里插入图片描述
成功脱壳!!!
只需将 /data/data/com.ct.client/files/dump_dex_com.ct.client/ 目录下的dex文件 下载至电脑,将其导出即可。

在这里插入图片描述

反编译

将dex文件拖至jeb,将其导出即可
在这里插入图片描述

抓包

根据静态分析,确定charles抓包失败的原因是 检验服务端证书导致,因此,只需将校验服务器证书的逻辑去掉即可

Java.use('com.android.org.*****')..checkTrusted.overload('[Ljava.security.cert.X509Certificate;', '***').implementation = function (v0, v1, v2, v3, v4) {
    
     
	return newArrayList();
};

执行完以上脚本,成功抓包
在这里插入图片描述

登录逆向

在这里插入图片描述
经过分析,确定以下接口为登录整个过程
在这里插入图片描述
加密参数

  • phoneNum
  • androidId
  • loginAuthCipherAsymmertric
  • phoneNum 、androidId
    在这里插入图片描述
  • loginAuthCipherAsymmertric
public class UtilEncryptRsa {
    
    
    static {
    
    
        System.loadLibrary("jni-encrypt-rsa");
    }
}
 public static native String encrypt(Context arg0, String arg1, String arg2, String arg3, String arg4, String arg5, String arg6, String arg7, String arg8) {
    
    
    }

在这里插入图片描述
JAVA翻写 UtilEncryptRsa

在这里插入图片描述

已实现功能:

  • 登录
    • 短信验证码登录
    • 自动识别验证码
    • 手机号、密码登录
    • 重置密码
  • 充值话费
  • 支付宝支付
  • 查询订单

猜你喜欢

转载自blog.csdn.net/super19911115/article/details/131350991
今日推荐