1、frida入门教程-安装
本人环境为windows,linux 类同。
1、安装python (内含pip)
Python Release Python 3.7.2 | Python.org
pip 最常用命令 。参考:https://pypi.python.org/pypi/pip
获取帮助
pip --help
升级 pip
pip install -U pip
安装包
pip install SomePackage
卸载包
pip uninstall SomePackage
升级指定的包
pip install -U SomePackage
搜索包
pip search SomePackage
查看指定包的详细信息
pip show -f SomePackage
列出已安装的包
pip freeze or pip list
查看可升级的包
pip list -o
2、安装 python工具包 frida 和frida-tools。在cmd 里输入:
pip install frida
pip install frida-tools
天朝网络 可能会报错“Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': ”
所以我们可以使用豆瓣镜像。执行:
pip install --index-url https://pypi.douban.com/simple scipy
pip install frida
pip install frida-tools
成功在电脑上安装了frida和frida-tools。
3、在已root的手机上安装frida-server,并启动frida-server
在https://github.com/frida/frida/releases 选择版本下载。frida-server 是一个守护进程,通过TCP和Frida核心引擎通信,默认的监听端口是27042 。注意:版本和类型对应,框架和设备对应 。如 我下载的就是“frida-server-12.4.0-android-arm64.xz”,解压zip后将
adb push frida-server-12.4.0-android-arm64 /data/local/tmp/frida-server
adb shell
cd /data/local/tmp
chmod 777 frida-server
./frida-server
4、新开一个cmd。转发android tcp端口到本地,并测试
adb forward tcp:27042 tcp:27042
adb forward tcp:27043 tcp:27043
frida-ps -U
成功!接下来就可以和frida交互了。
① 如果执行“frida -U -f 包名”出现:
Failed to spawn: unable to handle 64-bit processes due to build configuration
则需要回到第三步,选择对应 64位版本的frida-server。
② 如果 rida安装完成后,运行frida-ps会报错提示找不到对应模块
Failed to load the Frida native extension: DLL load failed: 找不到指定的模块。
Please ensure that the extension was compiled for Python 3.x.
***
Traceback (most recent call last):
File "D:\Python37\Scripts\frida-ps-script.py", line 11, in <module>
load_entry_point('frida-tools==1.1.0', 'console_scripts', 'frida-ps')()
File "d:\python37\lib\site-packages\frida_tools\ps.py", line 6, in main
from frida_tools.application import ConsoleApplication
File "d:\python37\lib\site-packages\frida_tools\application.py", line 19, in <
module>
import frida
File "d:\python37\lib\site-packages\frida\__init__.py", line 24, in <module>
raise ex
File "d:\python37\lib\site-packages\frida\__init__.py", line 7, in <module>
import _frida
ImportError: DLL load failed: 找不到指定的模块。
这个问题是因为python版本过高 或 低 ,pip frdia 并没有对应版本兼容。更换低版本 如python 3.8 ,再安装 pip install frida 和 pip install frida-tools即可解决。 参见:frida · PyPI 查看python版本支持
更多推荐
所有评论(0)