某酒店App sign、appcode签名解析(二) 脱壳分析

本文涉及的产品
云解析 DNS,旗舰版 1个月
全局流量管理 GTM,标准版 1个月
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
简介: 某酒店App sign、appcode签名解析(二) 脱壳分析

一、目标


之前我们介绍过 某酒店App sign、appcode签名解析(一) 带壳分析 r0tracer


带壳分析也是迫不得已,谁不希望零距离接触呀。


App升级了 5.3.3,我们的工具也升级了。


今天的新朋友是 BlackDex


github.com/CodingGay/B…

  • 脱壳
  • 延时Hook


二、步骤

BlackDex脱壳


  • 安装BlackDex
  • 在显示的进程列表中选择 com.platexx.boxxoota
  • 是的,壳已经脱好了,脱壳后的文件在 /sdcard/Android/data/top.niunaijun.blackdexa32/dump/com.platexx.boxxoota


分析下


根据上次的分析结果,赶紧去到

com.besxxxhotel.app.whnetcomponent.utils.SignUtil 看看。888.png

热泪盈眶呀,看到源代码的感觉真好。


啥也不说了,hook它。

var signCls = Java.use("com.besxxxhotel.app.whnetcomponent.utils.SignUtil");
console.log(TAG + "signCls: " + signCls);
signCls.getSignString.implementation = function(a1,a2,a3,a4,a5,a6){
        var result = this.getSignString(a1,a2,a3,a4,a5,a6);
        console.log(TAG + "a1 = " + a1);
        console.log(TAG + "a2 = " + a2);
        console.log(TAG + "a3 = " + a3);
        console.log(TAG + "a4 = " + a4);
        console.log(TAG + "a5 = " + a5);
        console.log(TAG + "a6 = " + a5);
        console.log(TAG + "sign rc = " + result);
        return result;
}
signCls.getAppCode.implementation = function(a1,a2,a3,a4){
        var result = this.getAppCode(a1,a2,a3,a4);
        console.log(TAG + "a1 = " + a1);
        console.log(TAG + "a2 = " + a2);
        console.log(TAG + "a3 = " + a3);
        console.log(TAG + "a4 = " + a4);
        console.log(TAG + "AppCode rc = " + result);
        return result;
}
signCls.decodeASCII.implementation = function(a){
        var result = this.decodeASCII(a);
        console.log(TAG + a.entrySet().toArray());
        console.log(TAG + "decodeASCII: " +result);
        return result;
}


挂上心爱的frida跑一下。

[Redmi 6A::platexx.boxxoota]-> Process crashed: Illegal instruction


怎么会挂呢,没道理呀,我们是好朋友呀。上一个版本都还愉快的玩耍过?


再试试老版本,一样crash


延时Hook


深呼吸,冷静一下。


. 老版本也Crash,说明不是新版本升级了防护策略 . spawn模式下会Crash,attach模式下正常


那就好办了,spawn模式下我们可以加个延时试试。

function main() { 
    Java.perform(function () {
        var threadef = Java.use('java.lang.Thread');
        var threadinstance = threadef.$new();
      // ...... xxxHook code ......
    });   
}         
setTimeout(main, 1000);
// setImmediate(main);


这次没问题了,


999.png


三、总结


分析脱壳软件的时候,可以考虑hook 壳代码里面的 attachBaseContext getApplicationContext 函数来找到hook真实代码的时机。


frida被搞的时候记得试试 XcubeBase000.png


尼采说过,杀不死你的东西会让你变得更加强大,但他没说清楚的是,那东西差点杀死你。


TIP: 本文的目的只有一个就是学习更多的逆向技巧和思路,如果有人利用本文技术去进行非法商业获取利益带来的法律责任都是操作者自己承担,和本文以及作者没关系,本文涉及到的代码项目可以去 奋飞的朋友们 知识星球自取,欢迎加入知识星球一起学习探讨技术。有问题可以加我wx: fenfei331 讨论下。


关注微信公众号: 奋飞安全,最新技术干货实时推送


相关文章
|
17天前
|
安全
【Azure App Service】App service无法使用的情况分析
App Service集成子网后,如果子网网段中的剩余IP地址非常少的情况下,会在App Service实例升级时( 先加入新实例,然后在移除老实例 )。新加入的实例不能被分配到正确的内网IP地址,无法成功的访问内网资源。 解决方法就是为App Service增加子网地址, 最少需要/26 子网网段地址。
|
26天前
【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析
【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析
|
26天前
|
开发框架 缓存 .NET
【App Service】在Azure App Service中分析.NET应用程序的性能的好帮手(Review Stack Traces)
【App Service】在Azure App Service中分析.NET应用程序的性能的好帮手(Review Stack Traces)
|
27天前
|
JSON 数据格式 索引
【Azure Developer】Azure Logic App 示例: 解析 Request Body 的 JSON 的表达式? triggerBody()?
【Azure Developer】Azure Logic App 示例: 解析 Request Body 的 JSON 的表达式? triggerBody()?
|
27天前
【Azure 应用服务】App Service 配置 Application Settings 访问Storage Account得到 could not be resolved: '*.file.core.windows.net'的报错。没有解析成对应中国区 Storage Account地址 *.file.core.chinacloudapi.cn
【Azure 应用服务】App Service 配置 Application Settings 访问Storage Account得到 could not be resolved: '*.file.core.windows.net'的报错。没有解析成对应中国区 Storage Account地址 *.file.core.chinacloudapi.cn
|
27天前
|
C# 开发工具
【Azure 应用服务】Azure Function App使用SendGrid发送邮件遇见异常消息The operation was canceled,分析源码渐入最源端
【Azure 应用服务】Azure Function App使用SendGrid发送邮件遇见异常消息The operation was canceled,分析源码渐入最源端
|
27天前
|
网络协议 NoSQL 网络安全
【Azure 应用服务】由Web App“无法连接数据库”而逐步分析到解析内网地址的办法(SQL和Redis开启private endpoint,只能通过内网访问,无法从公网访问的情况下)
【Azure 应用服务】由Web App“无法连接数据库”而逐步分析到解析内网地址的办法(SQL和Redis开启private endpoint,只能通过内网访问,无法从公网访问的情况下)
|
29天前
|
域名解析 网络协议 数据中心
【应用服务 App Service】当遇见某些域名在Azure App Service中无法解析的错误,可以通过设置指定DNS解析服务器来解决
【应用服务 App Service】当遇见某些域名在Azure App Service中无法解析的错误,可以通过设置指定DNS解析服务器来解决
|
21天前
|
监控 网络协议 Java
Tomcat源码解析】整体架构组成及核心组件
Tomcat,原名Catalina,是一款优雅轻盈的Web服务器,自4.x版本起扩展了JSP、EL等功能,超越了单纯的Servlet容器范畴。Servlet是Sun公司为Java编程Web应用制定的规范,Tomcat作为Servlet容器,负责构建Request与Response对象,并执行业务逻辑。
Tomcat源码解析】整体架构组成及核心组件
|
1月前
|
存储 NoSQL Redis
redis 6源码解析之 object
redis 6源码解析之 object
55 6

推荐镜像

更多