Frida 安装

发布时间 2023-07-08 15:31:34作者: MinDreaMaster

0.当前状态

Nexus5x 系统为Android8.1
Win11(是kvm虚拟机)

1.安装

(Frida 12 最好在<=安卓8.1的版本上用,最好别在>=安卓10上用。
Frida 14 最好在>=安卓10的版本上用,别在<=8.1的版本上用。)

pc端需要的依赖:python3,adb(google搜索android platform tools)
pc需要安装的包(pip):frida, frida-tools, objection, jnitrace
phone需要安装:frida-server

https://github.com/frida/frida/releases/tag/12.8.0
python版本要求3.7
python包frida版本12.8.0
python包frida-tools安装5.3.0
手机端frida-server版本在12.8.0对应github页面下载
python包objection版本1.8.4
python包jnitrace版本3.0.8

1.1pc端:

pip install frida==12.8.0
pip install frida-tools ==5.3.0
//其他包同理

如果安装报错,到https://pypi.org/project/frida/12.8.0/#files 下载相应文件
如果是egg,运行easy_install path/filename.egg
(如果是egg ,放到python\Lib\site-packages下,在该目录下运行easy_install filename.egg
如果是whl,运行pip install path/filename.whl

1.2手机端:

先查看手机cpu架构

C:\Users\Administrator>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
0254b270a776bbaa        device

C:\Users\Administrator>adb shell
bullhead:/ $ getprop ro.product.cpu.abi
arm64-v8a

在https://github.com/frida/frida/releases/tag/12.8.0 中选择相应版本的frida-server
下载完成后进行解压,获得linux原生的可执行文件,我们将它重命名为frida-server
使用adb命令将其推送到手机上去
adb push frida-server /data/local/tmp/
然后使用adb shell命令进入到手机中去,执行以下命令:

$ adb shell
bullhead:/ $ su 
bullhead:/ # whoami
root
bullhead:/ # cd /data/local/tmp/
bullhead:/data/local/tmp # chmod 755 /data/local/tmp/frida-server
bullhead:/data/local/tmp # ./frida-server &
[1] 6669

2.运行frida

手机端启动frida-server

$ adb shell
bullhead:/ $ su 
bullhead:/ # cd /data/local/tmp/
bullhead:/data/local/tmp # ./frida-server &
[1] 6669

此时在电脑上新开一个shell,运行frida-ps -U命令,即可显示手机中正在运行的进程。

手机端关闭frida-server
进入adb shell

ps | grep frida
kill -9 PID_number

3.参考

https://www.52pojie.cn/forum.php?mod=viewthread&tid=1614476&extra=page%3D1%26filter%3Dtypeid%26typeid%3D343 | frida-dexdump脱壳工具简单使用的思维导图 - 『移动安全区』 - 吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn
https://blog.csdn.net/god_zzz/article/details/120280094 | android逆向之frida安装与简单使用Crackmes/Android/Level_01_god_Zeo的博客-CSDN博客
https://mp.weixin.qq.com/s/n2XHGhshTmvt2FhxyFfoMA | 深入 FRIDA-DEXDump 中的矛与盾
https://findme.cool/Android/186.html | frida安装指定版本套件&zentrace使用说明 - IT编程记录
https://segmentfault.com/a/1190000041634836 | 安全 - Frida使用文档(一)安装、启动、运行、关闭 - 个人文章 - SegmentFault 思否


https://blog.csdn.net/chendipang/article/details/105873195 | python安装egg文件
https://blog.csdn.net/dumgeewang/article/details/88687964 | python 安装本地包