Frida基础操作命令
生活随笔
收集整理的這篇文章主要介紹了
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.mp42.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/
總結
以上是生活随笔為你收集整理的Frida基础操作命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第50讲:Scrapy 部署不用愁,Sc
- 下一篇: Python2 常见问题