安装 Frida 和 Passionfruit

写在前面

Frida 因为可以动态执行代码,所以主要用来分析应用,功能十分强大。

对于 iOS 而言,无论设备是否越狱,都可以使用它来分析调试应用。

更加详细的内容可以通过官网了解。

而 Passionfruit 是一位大神为 Frida 开发的图形界面,可以用来动态分析 iOS 应用。

笔者在安装二者过程中,碰到一些问题,遂记录下来。

安装 Frida

官方推荐的安装命令如下,其中 pip 是 Python 的一个包管理工具。

sudo pip install frida
复制代码

笔者在 macOS Hign Sierra 上安装,提示错误:

The directory '/Users/jiandan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/jiandan/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
复制代码

所以按照提示,修改为:

sudo -H pip install frida
复制代码

顺利跑完后,可以按照官网里面的方式来测试。

如果有越狱设备,可以启动 Cydia 后,添加源 https://build.frida.re ,刷新后,搜索下载安装 Frida,再把设备连接到电脑,最后输入:

frida-ps -U
复制代码

终端显示的是,目前在运行的进程,大概是这样:

  PID  Name
-----  ----------------
54425  App Store
54445  QQ
54421  微信
复制代码

安装 Passionfruit 错误

GitHub 上直接给出了安装命令:

sudo npm install -g passionfruit
复制代码

执行的前提是安装了 node,作者在《给 frida 做了个图形界面,动态分析 iOS 应用》给出的建议是直接从官网下载安装。

笔者直接使用 HomeBrew 安装 node,可能是本地的 HomeBrew 存在一些问题,所以导致在安装 Passionfruit 时,报以下错误:

npm WARN deprecated babel-preset-es2015@6.24.1: ?  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
/usr/local/bin/passionfruit -> /usr/local/lib/node_modules/passionfruit/bin/cli.js

> fsevents@1.1.3 install /usr/local/lib/node_modules/passionfruit/node_modules/fsevents
复制代码

尝试了这样的方案:

sudo npm install -g node-pre-gyp
sudo npm install --save d3
sudo npm install --save-dev
复制代码

没能成功。

在使用 brew doctor 后发现:

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:
node
复制代码

最后按照这篇文章,彻底地删除 node,用 HomeBrew 重新安装后,根据 brew doctor 提示的信息,解决与 node 相关问题。

再次安装 PassionFruit,虽然有提示以下错误,但它也能正常使用。

node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.1.3 and node@9.1.0 (node-v59 ABI, unknown) (falling back to source compile with node-gyp)
复制代码

启动 PassionFruit

$ passionfruit
listening on http://localhost:31337
复制代码

用浏览器打开上面网址,可以在页面上选择已经连上电脑的手机,然后可以查看手机上所有 app 的信息,如图所示

总结

如果想分析应用,Frida 这款利器绝对值得一试。

如果 iOS 开发者,配合 Passionfruit 使用,可以方便快捷分析应用。

若是有意搞搞 Android 或者 iOS 的逆向,Frida 更是不容错过。

转载于:https://juejin.im/post/5ad895fb6fb9a07abb232237

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值