高防服务器

Frida使用文档(一)安装、启动、运行、关闭

Frida使用文档(一)安装、启动、运行、关闭

操作环境

  • win10
  • Google nexus5x
  • Python3.9
  • frida==14.2.17
  • frida-tools==9.2.4

    安装Frida

PC安装frida和frida-tools

注意frida和python frida-tools的版本匹配,Frida与Frida-tools对应关系

pip install frida==14.2.17 pip install frida-tools==9.2.4

手机安装frida-server

在 官方github页面的release标签里,找到对应版本的frida-server,注意要匹配系统和架构,比如armarm64就不能搞错

  • 查看手机CPU 架构类型

    PS C:UsersAdministrator> adb devices List of devices attached 00eda37121888c2c        device PS C:UsersAdministrator> adb shell bullhead:/ $ getprop ro.product.cpu.abi arm64-v8a

  • 根据frida版本和手机CPU版本下载对应的frida-server

    下载完成后进行解压,获得linux原生的可执行文件,我们将它重命名为frida-server
  • 将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 

    frida-server运行成功。

运行Frida

启动frida-server服务

电脑新开一个shell,执行如下命令

PS C:UsersAdministrator> adb shell bullhead:/ $ su bullhead:/ # cd /data/lo local/       lost+found/ bullhead:/ # cd /data/local/tmp/ bullhead:/data/local/tmp # ./frida-server & [1] 8610 bullhead:/data/local/tmp #

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

frida-server服务端启动成功!

关闭frida-server服务

查看frida进程

ps | grep frida

杀死进程

kill -9 进程id

常用命令

端口转发

adb forward tcp:27042 tcp:27042 

常见问题

Frida hook某些App,明明包名写对了,却找不到进程

#查看进程中的信息 #process = frida.get_usb_device().enumerate_processes() #print(process)  1.新开一个shell输入命令: adb shell am monitor 2.启动需要获取包名的应用


本文仅供学习交流使用,如侵立删!

[温馨提示:高防服务器能助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。]

[图文来源于网络,不代表本站立场,如有侵权,请联系高防服务器网删除]