用Electron实现app合规检测工具-实战总结

前置资源:

一、JDK及apktool安装

  1. jdk1.8
  2. apktool:下载地址https://ibotpeaches.github.io/Apktool/

  相关资源:

  https://www.zhihu.com/question/29370382

  https://ibotpeaches.github.io/Apktool/install/

 

二、dex2jar、jd-gui安裝

  相关资源:

  https://www.zhihu.com/question/29370382

  https://sourceforge.net/projects/dex2jar/files/

  http://java-decompiler.github.io/

  http:www.javadecompilers.com/jad  

三、Xposed安裝

  相关资源:

  https://blog.csdn.net/y4x5m0nivsrjay3x92c/article/details/118772090

  https://www.jianshu.com/p/6b93076abbc9

  https://github.com/android-hacker/VirtualXposed/releases

 

总体流程:

  1.选择需要检测的apk文件(改造成网站工具的话是上传)

       2.执行apktool d -s -f  apk路径(我使用的是node-cmd的runSync方法)

       3.对反编译资源目录进行处理-递归遍历,可以得到所有引入的包名;检测AndroidManifest.xml可以得到用户声请了哪些权限。

       4.动态检测:先在手机上安装VirtualXposed,开发一个xposed拦截sdk安装到VirtualXposed中,打开VirtualXposed运行App,当调用底层方法时就会触发sdk的拦截方法,并上报检测信息。

 

posted @ 2022-04-15 16:32  尹言覃少  阅读(115)  评论(0编辑  收藏  举报