逆向調試objection的使用

官方文件地址:https://github.com/sensepost/objection/wiki/Screenshots

1.安裝

pip install objection

2.安卓用法

命令查看

objection --help 			

objection

#前提frida-server的啓動
objection -g 包名 explore

#指定ip和端口的連接
objection -N -h xx.xx.xx.xxx -p xxx -g packageName explore

Spawn方式Hook

#爲了避免錯過hook時機,採用附加模式,在objection 啓動時就注入app

objection -g packageName explore --startup-command "你要執行的oc命令"

hook指定類

android hooking watch class 包名.類名              # hook類的所有方法
android hooking watch class_method 包名.類名.方法  # 默認會Hook方法的所有重載
android hooking watch class_method 包名.類名.方法 "參數1,參數2" # 如果只需hook其中一個重載函數 指定參數類型 多個參數用逗號分隔
#其中參數
–-dump-args: 顯示參數; 
--dump-return: 顯示返回值; 
--dump-backtrace: 顯示堆棧

#設置返回值(只支持bool類型) 
android hooking set return_value com.xxx.xxx.methodName false


#Spawn方式hook時候打印參數
objection -g packageName explore --startup-command "android hooking watch class_method '類名' --dump-args --dump-return --dump-backtrace"




android hooking list classes    # 列出內存中所有的類
android hooking list class_methods 包名.類名  # 列出類的所有方法
android hooking search classes 包名包含的關鍵詞  # 在內存中所有已加載的類中搜索包含特定關鍵詞的類
android hooking list activities                   #枚舉activity
android intent launch_activity [activity_class]   #啓動activity
android hooking list services                     #枚舉services
android intent launch_service [services_class]    #啓動services
android heap search instances 包名.類名 --fresh    # 搜索堆中的實例
android heap execute 地址(hashcode的地址) 方法名   # 調用實例的方法
android sslpinning disable  #屏蔽SSL 校驗, 使得ssl pinning失效

Memory 指令

memory list modules  # 查看內存中加載的庫
memory list exports libssl.so  #查看庫的導出函數
memory list exports libart.so --json /root/libart.json #將結果保存到json文件中
memory search --string --offsets-only #搜索內存
memory search "00 00 00 00 00 00 00"

任務管理

#查看任務列表
jobs list

#關閉任務
jobs kill jobid

3.ios相關指令

參考文檔:https://nosec.org/home/detail/2192.html

查看運行的程序

frida-ps -Uia

連接上應用

objection --gadget "com.apple.AppStore" explore

禁用SSL pinning功能

ios sslpinning disable

監聽類調用的方法

比如"ProfileHomeViewController"
ios hooking watch classProfileHomeViewController

Hook oc方法

ios hooking watch method"-[ProfileHomeViewController loginOrRegisterButtonTap]"

儲keychain的內容

ios keychain dump #就能轉儲keychain的內容。有時,我們能夠從中發現應用程序存儲的敏感信息。

繞過越獄檢測

ios jailbreak disable
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章