网站建设有关的软件适合发朋友圈的营销广告
目录
- 一、简介
 - 二、环境准备
 - 常用使用方法
 
一、简介
现如今APP隐私合规十分重要,各监管部门不断开展APP专项治理工作及核查通报,不合规的APP通知整改或直接下架。camille可以hook住Android敏感接口,检测是否第三方SDK调用。根据隐私合规的场景,辅助检查是否符合隐私合规标准。
二、环境准备
1、前提条件
 PC端安装python3环境
 模拟器(开启root)—比如雷电模拟器
 2、PC端安装frida-tools和frida
 pip3 install frida-tools
 pip3 install frida
 安装完成后,查看frida版本

 3、PC端安装Camille
git clone https://github.com/zhengjim/camille.gitcd camillepip install -r requirements.txtpython camille.py -h
 
4、手机端安装frida-server
 下载frida-server-16.0.10-android-x86.xz 解压后改名为frida-server(注意frida-server版本需要和PC端安装的frida版本一致)
 打开模拟器,并使用adb进行连接

 推送frida-server到android系统/data/local/tmp目录下
adb.exe push frida-server /data/local/tmp
赋予frida-server可执行权限,并后台运行
adb.exe shellcd /data/local/tmpchmod 755 /data/local/tmp/frida-server/data/local/tmp/frida-server &
 
5、运行Camille
python camille.py com.xxx.xxx(com.xxx.xxx为包名)

常用使用方法
1、输出堆栈信息文件
python camille.py com.xxx.xxx -ns -f test.xls
-ns:不显示日志,默认显示。
-f:保存app行为轨迹(堆栈信息)到execl里,默认不保存。

2、指定设备
python camille.py com.xxx.xxx -s 127.0.0.1:5555
-s:指定连接设备,可通过 adb devices 获取设备 id
3、延迟hook
python camille.py com.xxx.xxx -t 3
-t: hook应用自己的函数或含壳时,建议使用setTimeout并给出适当的延时(1-5s,需要根据不同app进行调整)。以免hook失败。默认不延迟。
4、使用attach
 python camille.py -ia 11222(11222为进程ID)
 -ia:使用attach hook
 假如hook不上,可以使用-ia,指定包名或运行进程ID。 有些包有同名进程,frida会hook失败,需要使用进程ID。
 找进程ID,进入安卓运行ps -A | grep com.xxx.xxx
5、选择hook模块
-u: 扫描指定模块。与命令-nu互斥。多个模块用’,'隔开。例如:phone,permission
模块列表:
| 模块名 | 备注 | 
|---|---|
| permission | 申请权限 | 
| phone | 电话、基站 | 
| system | 系统信息(android/标识/content敏感信息) | 
| app | 其他app信息 | 
| location | 位置信息 | 
| network | getNetwork | 
| camera | 照相机 | 
| bluetooth | 蓝牙 | 
| file | 文件 | 
| media | 麦克风 | 
| custom | 用户自定义接口 | 
-nu:跳过扫描指定模块。与命令-u互斥。多个模块用’,'隔开。例如:phone,permission 模块列表同上
