frida安装和使用方法

frida是一个轻量级别的hook框架。官网介绍:Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers.
推荐使用 python3来安装。
-------
0x01 windows上安装frida
请使用pip3.exe来安装
pip3 install frida-tools
# 或使用国内源
pip3 install frida-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

其中,

Running setup.py install for frida ...

会卡住,静候一阵子会好的。

windows的frida目前只支持python2.7和python3.7

0x02 linux上安装firda
同样的步骤:
pip3 install frida-tools
# 或使用国内源
pip3 install frida-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

但是会报错:

  Running setup.py bdist_wheel for frida ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-abaq78bw/frida/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-q8tuqk3t --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/frida
  copying frida/core.py -> build/lib.linux-x86_64-3.7/frida
  copying frida/__init__.py -> build/lib.linux-x86_64-3.7/frida
  running build_ext
  looking for prebuilt extension in home directory, i.e. /root/frida-12.8.14-py3.7-linux-x86_64.egg
  prebuilt extension not found in home directory, will try downloading it
  querying pypi for available prebuilds
  error: <urlopen error [Errno 101] Network is unreachable>

这里关键是这句

i.e. /root/frida-12.8.14-py3.7-linux-x86_64.egg

我打开https://pypi.org/project/frida/#files (国内打开较慢)

发现只有frida-12.8.14-py3.6-linux-x86_64.egg,而没有py3.7的文件,于是安装肯定报错。
解决法子:
把frida-12.8.14-py3.6-linux-x86_64.egg下载到本地,然后
python3 /usr/lib/python3/dist-packages/easy_install.py frida-12.8.14-py3.6-linux-x86_64.egg

当进行到:

Installed /usr/local/lib/python3.7/dist-packages/frida-12.8.14-py3.6-linux-x86_64.egg
Processing dependencies for frida==12.8.14
Searching for frida==12.8.14
Reading https://pypi.org/simple/frida/

就按ctrl+c进行中断,因为这个网址很长,国内加载会特别地慢,然后

pip3 install frida-tools -i https://pypi.tuna.tsinghua.edu.cn/simple/

顺利安装上,就可以使用以下命令:

frida
frida-kill
frida-ps
frida-discover
frida-ls-devices
frida-trace

0x03 frida使用方法

等pcat有空再补上。

 

猜你喜欢

转载自www.cnblogs.com/pcat/p/12501850.html
今日推荐