Frida基础操作命令

Frida相关的基础操作,包含adb、frida、objection的基本命令。

1.ADB常用命令

# 查看当前连接设备
adb devices

# 多个设备时指定设备
adb -s 设备号 其他指令
# adb -s 127.0.0.1:21503 shell
# adb -s FA6AE0309067 shell
# 127.0.0.1:5555 蓝叠
# 127.0.0.1:7555 MUMU模拟器
# 127.0.0.1:62001 夜游神模拟器
# 127.0.0.1:21503 逍遥模拟器

# 查看Android处理器架构
adb shell getprop ro.product.cpu.abi

# 安装APP
adb install xxx.apk

# 安装APP,已经存在,覆盖安装
adb install -r xxx.apk

# 卸载APP
adb uninstall app包名

# 卸载APP,保留数据
adb uninstall -k app包名

# 往手机传递文件
adb push 文件名 手机路径

# 从手机端获取文件
adb pull 手机路径/文件名

# 移动文件
mv /sdcard/Download/frida-server-12.8.0 /data/local/tmp/

# 修改文件权限
chmod 777 /data/local/tmp/frida-server-12.8.0

# 查看日志
adb logcat

# 清日志
adb logcat -c

# 手机端安装的所有app包名
adb shell pm list packages

# 查看当前包名和主Activity
adb shell dumpsys window | findstr mCurrentFocus

# 启动APP
adb shell am start 包名/主Activity
# adb shell am start com.autonavi.minimap/com.autonavi.map.activity.NewMapActivity

# 关闭App
adb shell am force-stop 包名
# adb shell am force-stop com.autonavi.minimap

# 屏幕截图
adb shell screencap 手机路径/xxx.png

# 录制视频
adb shell screenrecord 手机路径/xxx.mp4

2.Frida命令

# 启动frida-server(模拟器)
./data/local/tmp/frida-server-12.8.0-android-x86

# 启动frida-server(Pixel真机)
./data/local/tmp/frida-server-12.8.0-android-arm64

# 转发端口
adb forward tcp:27042 tcp:27042
adb forward tcp:27043 tcp:27043

# 列举出来所有连接到电脑上的设备
frida-ls-devices

# 连接到指定设备
frida-ps -D tcp

# 列举出来设备上的所有进程
frida-ps -U

# 列举出来设备上的所有应用程序
frida-ps -Ua

# 列举出来设备上的所有已安装应用程序和对应的名字
frida-ps -Uai

# 跟踪某个函数
frida-trace -U -f Name -i "函数名"
# frida-trace -U -f com.autonavi.minimap -i "getRequestParams"

# 跟踪某个方法
frida-trace -U -f Name -m "方法名"
# frida-trace -U -f com.autonavi.minimap -m "MapLoader"

3.objection常用命令

# 将objection注入应用
objection -g com.autonavi.minimap explore

# 查看内存中加载的库
memory list modules

# 查看库的导出函数
memory list exports libssl.so

# 将库的导出函数保存到json文件中
memory list exports libart.so --json libart.json

# 内存堆搜索类的实例
android heap search instances com.autonavi.jni.ae.gmap.maploader.MapLoader

# 调用实例的方法
android heap execute 0x2526 getRequestParams

# 启动activity
android intent launch_activity com.autonavi.map.activity.NewMapActivity

# 查看当前可用的activity
android hooking list activities

# 列出内存中所有的类
android hooking list classes

# 内存中搜索所有的类
android hooking search classes MapLoader

# 内存中搜索所有的方法
android hooking search methods getRequestParams

# 列出类的所有方法
android hooking list class_methods com.autonavi.jni.ae.gmap.maploader.MapLoader

# 直接生成hook代码
android hooking generate simple com.autonavi.jni.ae.gmap.maploader.MapLoader

# hook类的所有方法
android hooking watch class com.autonavi.jni.ae.gmap.maploader.MapLoader

# objection当前的Hook数
jobs list

# 查看方法的参数、返回值和调用栈
android hooking watch class_method com.autonavi.jni.ae.gmap.maploader.MapLoader.getRequestParams --dump-args --dump-return --dump-backtrace

# hook类的所有重载
android hooking watch class_method com.autonavi.jni.ae.gmap.maploader.MapLoader.$init --dump-args

注:学习转载于: https://addcoder.com/blog/article_detail/74b69058/

  • 4
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Frida-dexdump是一个开源项目,用于进行Android应用的脱壳操作。您可以通过下载Frida-dexdump项目并按照相应的步骤进行使用。 首先,您需要下载Frida-dexdump项目,可以从GitHub或百度网盘下载。下载完成后,解压项目,并进入项目目录。在该目录下,打开命令窗口。 接下来,您可以使用命令行输入frida-dexdump命令来进行脱壳操作。脱壳命令的格式为frida-dexdump -U -f 应用包名。其中,应用包名可以通过frida-ps命令获取。 脱壳完成后,生成的dex文件将保存在与Frida-dexdump项目目录同级的文件夹中。 另外,您还可以通过另一种方式来安装和使用frida-dexdump。首先,您需要使用pip命令安装frida-dexdump。然后,进入Python环境的安装目录,定位到frida-dexdump命令的目录。接着,复制应用程序包名,为后续的脱壳命令做准备。最后,在相应的目录下输入frida-dexdump命令来进行脱壳操作。 请注意,根据您的实际情况,可以通过指定应用名称、应用进程ID或应用包名来进行脱壳操作。 总结起来,要使用frida-dexdump进行脱壳操作,您需要下载并解压该项目,然后根据指定的命令格式输入相应的命令,并根据您的需求指定应用名称、进程ID或包名。脱壳完成后,生成的dex文件将保存在指定的文件夹中。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Frida-Dexdump 脱壳工具下载使用以及相关技术介绍](https://blog.csdn.net/EXIxiaozhou/article/details/128208068)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值