Frida安装避坑

pip install frida-tools

1、建议安装时使用可翻墙的代理进行安装,不然在容易报(一般是在安装frida依赖的时候):unable to download it within 20 seconds; please download it manually to

pip install frida-tools --proxy='socks5://127.0.0.1:10808'

2、翻不了就手动下载安装,地址:Links for frida

3、版本问题,比如我的环境是python3.9但是frida只有3.8和3.10版本时,就下载3.10的,然后:

easy_install frida-15.1.16-py3.10-win32.egg

3.1 用着用着突然报如下错误时:

Failed to load the Frida native extension: DLL load failed while importing _frida: 找不到指定的模块。
Please ensure that the extension was compiled for Python 3.x.

参照第3点,下载对应egg包,重新easy_install即可解决

4、报No module named easy_install时:

①查看有没有安装setuptools;

②setuptools版本>51.3.3时,就没有带easy_install,按如下方式解决

pip uninstall setuptools
pip install -v setuptools==51.3.3

官网说明:History - setuptools 60.8.2.post20220211.post-20220211 documentation

5、报AttributeError: module 'collections' has no attribute 'MutableMapping'时:

setuptools版本低了,建议升级到51.3.3的版本,方法同上一步

Building wheels for collected packages: frida-tools, frida
  ...
  Building wheel for frida (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running bdist_wheel
      running build
      running build_py
      running build_ext
      error: The read operation timed out
      looking for prebuilt extension in home directory, i.e. C:\Users\italan\frida-15.1.16-py3.10-win32.egg
      prebuilt extension not found in home directory, will try downloading it
      querying pypi for available prebuilds
      using default index URL: https://pypi.org/simple/
      downloading package list from https://pypi.org/simple/frida/
      unable to download it within 20 seconds; please download it manually to C:\Users\italan\frida-15.1.16-py3.10-win32.egg
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for frida
  Running setup.py clean for frida
Successfully built frida-tools
Failed to build frida
Installing collected packages: wcwidth, pygments, prompt-toolkit, frida, colorama, frida-tools
  Running setup.py install for frida ... error
  error: subprocess-exited-with-error

  × Running setup.py install for frida did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running install
      D:\virtualenv\frida_env\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running build_ext
      error: The read operation timed out
      looking for prebuilt extension in home directory, i.e. C:\Users\italan\frida-15.1.16-py3.10-win32.egg
      prebuilt extension not found in home directory, will try downloading it
      querying pypi for available prebuilds
      using default index URL: https://pypi.org/simple/
      downloading package list from https://pypi.org/simple/frida/
      unable to download it within 20 seconds; please download it manually to C:\Users\italan\frida-15.1.16-py3.10-win32.egg
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> frida

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

### 回答1: Frida 是一款非常强大的动态分析工具,可以用于检测移动应用程序的安全性。下面是 Frida安装详细教程: 1. 安装 Node.js:Frida 是基于 Node.js 开发的,需要先安装 Node.js。可以在 Node.js 官网下载对应操作系统的安装包,然后安装 Node.js。 2. 安装 Frida CLI:Frida CLI 是 Frida 的命令行工具,可以在终端中使用 Frida。可以使用以下命令安装 Frida CLI: ``` npm install -g frida-tools ``` 3. 配置手机或模拟器:在手机或模拟器上,需要安装 Frida Server。可以在 Frida 官网下载对应操作系统的 Frida Server,然后将 Frida Server 安装到手机或模拟器上。 4. 连接手机或模拟器:在电脑上,需要将 Frida 连接到手机或模拟器上。可以使用以下命令连接到手机或模拟器: ``` frida-ps -U ``` 如果 Frida 连接成功,会显示手机或模拟器上运行的应用程序列表。 5. Hook 应用程序:在电脑上,可以使用 Frida Hook 应用程序的 API,来进行动态分析。比如可以 Hook 应用程序的函数、变量等,来获取应用程序的运行信息。 ``` frida -U -l script.js com.example.app ``` 在上面的命令中,`-U` 表示连接到手机或模拟器上,`-l` 表示加载 JavaScript 脚本,`com.example.app` 表示要 Hook 的应用程序包名。 需要注意的是,Frida 是一款非常强大的动态分析工具,需要对应用程序的运行机制和安全机制有一定的了解,同时需要对 Hook 技术和系统 API 有一定的认识,才能更好地使用和理解 Frida。 ### 回答2: Frida是一种强大的动态分析工具,用于在Android、iOS以及其他平台上进行应用程序的逆向工程和调试。下面是Frida安装详细教程: 1. 在你的机器上安装Python,确保Python版本是3.6或更高版本。 2. 打开终端或命令提示符,使用以下命令安装Frida: ``` pip install frida-tools ``` 如果你遇到了权限问题,可以使用管理员权限运行命令提示符或终端。 3. 安装完成后,可以使用以下命令检查Frida是否安装成功: ``` frida --version ``` 如果成功安装,会显示Frida的版本号。 4. 如果你需要在Android设备上使用Frida,需要在设备上安装Frida服务器。首先,确保你的Android设备已经开启开发者选项和USB调试模式。然后,使用以下命令将Frida服务器安装到设备上: ``` pip install frida-tools ``` 安装完成后,使用以下命令启动Frida服务器: ``` adb shell frida-server ``` 5. 现在,你可以使用Frida进行应用程序的动态分析和调试了。你可以编写Frida脚本,用于监控应用程序的函数调用、修改应用程序的行为等。以下是一个简单的Frida脚本示例,用于打印应用程序中的函数调用: ```python import frida def on_message(message, data): if message['type'] == 'send': print("[*] {0}".format(message['payload'])) session = frida.attach("应用程序包名") script = session.create_script(""" Interceptor.attach(Module.findExportByName(null, "函数名"), { onEnter: function(args) { send("调用函数:" + args[0].toInt32()); } }); """) script.on('message', on_message) script.load() ``` 将上述脚本保存为`script.py`,然后使用以下命令运行脚本: ``` python script.py ``` 脚本会自动注入到指定的应用程序中,当应用程序调用特定的函数时,会输出相应的信息。 以上就是Frida安装详细教程,希望能对你有所帮助! ### 回答3: Frida是一款功能强大的动态注入工具,可用于进行移动应用逆向分析和安全评估。下面是Frida的详细安装教程: 1. 安装Python:Frida是基于Python开发的,因此首先需要安装Python。可以从Python官方网站上下载并安装最新版本的Python。 2. 安装Frida:在安装Python之后,可以使用pip工具来安装Frida。在终端或命令行中输入以下命令来安装Frida: ``` pip install frida-tools ``` 3. 安装Frida服务器:Frida通常需要在移动设备或模拟器上安装Frida服务器,以便与应用程序进行通信。可以通过以下命令来安装Frida服务器: ``` pip install frida frida-ps -U ``` 其中,`frida-ps -U`命令可以列出设备上正在运行的进程,以确保Frida服务器已安装和运行。 4. 配置设备网络代理:在移动设备上,需要将网络流量通过Frida来进行拦截和修改。可以通过以下命令来配置设备的网络代理: ``` adb forward tcp:27042 tcp:27042 ``` 5. 运行Frida脚本:现在可以编写Frida脚本来实现所需的功能。可以使用文本编辑器创建一个Python脚本,然后使用以下命令在设备上运行该脚本: ``` frida -U -f 应用程序包名 -l 脚本文件路径 ``` 其中,`应用程序包名`是目标应用程序的包名,`脚本文件路径`是Frida脚本的文件路径。 以上就是Frida安装的详细教程。在安装完成后,可以根据需要使用Frida进行移动应用的动态分析和修改。请注意,在使用Frida时要遵循相关法律和道德规范。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值