日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

frida使用学习

發布時間:2025/3/21 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 frida使用学习 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

介紹:

Friad是一款跨平臺輕量級Hook和調試框架,可以輕松實現Windows、Linux、Android、IOS、Mac平臺的動態插樁需求,單從Android層面理解,它可以實現Java層和Native層Hook操作。

指令:

frida-ps -U

查看通過usb連接的android手機上的進程。?

準備

打開安卓模擬器

打開frida-server監聽

adb devices #查看設備

adb connect ****** #

adb shell

cd /data/local/tmp

./frida-server

frida-hook

hook 函數

import frida #導入frida模塊 import sys #導入sys模塊jscode = """ const hitdata = ``; // beatmaps/chromevox/hitpoints const timeList = hitdata.split("\n").map((v, idx, arr) => {return parseInt(v.split(",")[1], 10); }); function awaitHook(){var ptr = Module.findBaseAddress("libd3mug.so");console.log(ptr);const update = new NativeFunction(ptr.add(0x0000780), "pointer", ["char"]);const instance = ptr.add(0x02D18);// runninginstance.writePointer(new NativePointer(0)); // init.for (const t of timeList) {update(t);}console.log(instance.readPointer().readCString()); } // D3CTF{Gb78e-7b04-4364-82d2-7f44} setImmediate(function(){setTimeout(awaitHook,10); })"""def on_message(message,data): #js中執行send函數后要回調的函數print(message)process = frida.get_remote_device().attach('com.hello.hook') #得到設備并劫持進程com.example.testfrida(該開始用get_usb_device函數用來獲取設備,但是一直報錯找不到設備,改用get_remote_device函數即可解決這個問題) script = process.create_script(jscode) #創建js腳本 script.on('message',on_message) #加載回調函數,也就是js中執行send函數規定要執行的python函數 script.load() #加載腳本 sys.stdin.read()

報錯:frida.ServerNotRunningError: unable to connect to remote frida-server

解決:端口轉發

adb forward tcp:27042 tcp:27042 adb forward tcp:27043 tcp:27043

使用frida—dexdump安卓脫殼

在安卓模擬器上運行要脫殼的軟件。

在此文件夾目錄下運行cmd程序.

執行 python main.py

?會在當前的文檔下面生成一個新的文件夾

這就是脫殼后的結果。?

總結

以上是生活随笔為你收集整理的frida使用学习的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。