五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Android動態(tài)調(diào)試-不用IDA Pro

2020-12-10 12:18 作者:無情劍客Burning  | 我要投稿

為什么不用IDA,因?yàn)橘F。 為什么不用gdb,因?yàn)閘ldb的出現(xiàn),取代gdb只是遲早的事情,可以說gdb是Depracated。

在?Android逆向之ARM64靜態(tài)分析對app的中的so進(jìn)行了靜態(tài)分析,這篇文章介紹兩種動態(tài)調(diào)試的方式,一種是radare2,另一種是lldb。

r2frida

概術(shù)

Radare2 and Frida better together. 兩個(gè)強(qiáng)大的工具放在一起,必然會產(chǎn)生更為強(qiáng)大的能量,可以稱為"Best Dynamic Debugging Tool ",最主要是免費(fèi)。其本質(zhì)是Radare2的插件。

安裝

唯一的一個(gè)缺點(diǎn),安裝過程堪稱災(zāi)難。我用r2pm -ci r2frida進(jìn)行的安裝。目前只能在Linux下使用。筆者使用Nodejs最新的穩(wěn)定版本才安裝成功。

缺少庫文件的問題,解決辦法如下,這里只是舉例,具體情況可能不一樣,筆者是ssl庫鏈接不了。

/usr/bin/ld: 找不到 -ldhnetsdk

1)找到本地的libGL.so 文件路徑 ,在終端執(zhí)行:locate libdhnetsdk.so?命令: /usr/local/ahuasdk/libdhnetsdk.so 2)建立鏈接: sudo ln -s /usr/local/ahuasdk/libdhnetsdk.so /usr/lib/libdhnetsdk.so

介紹

選擇淘寶來介紹。

Attach process

r2 frida://BH9500C2JR/com.taobao.taobao

其中BH9500C2JR通過frida-ls-devices獲取。

Spawn process

r2 frida://spawn/usb/BH9500C2JR/com.taobao.taobao

這種情況下是以suspend模式啟動app,因此屏幕會卡住。這樣就可以hook程序啟動的時(shí)候或之前的操作,比如onCreate。通過=!dc可恢復(fù)。

命令

所有r2frida的命令都必須以\或者=!開頭 。

版本命令

獲取Frida版本的命令\?V

獲取信息的命令

?\i: Shows target information?\ii*?: List imports in r2 form.?\il: List libraries. Commonly used with the symbol ~, which is the internal grep of r2.?\iE?: List exports of library, filtering by library name.?iEa ()?: Show address of export symbol.?\isa[*] ()?: Show address of symbol?\ic: List classes

部分結(jié)果如下:

搜索命令

?

\/ keyword: Search hex/string pattern in memory ranges (see search.in=?) 以JSON格式顯示,搜索關(guān)鍵字rooted,命令為:?\/j rooted

動態(tài)調(diào)試

這是r2frida最強(qiáng)大的功能。

?

\dt (<addr>|<sym>) ...?: Trace list of addresses or symbols. Similar to frida-trace

?

\dmas?: Allocate a string inited with on the heap

?

\dmal?: List live heap allocations created with dma[s]

通過px還看不出來什么,通過下圖就唔唔溝看出這是UTF-8編碼。

dt命令的簡單使用:

其他命令

?

dpt: List threads

?

dr: List thread registers

?

e[?] [a[=b]]: List/get/set config evaluable vars

?

env: Get/set environment variable

腳本

JS code to be run in the target can be loaded with?\. script.js.?A common practice is always to call this script?agent.js?to remember that's the code to be run inside the target.

[0x00000000]&gt; \. agent.js
[0x00000000]&gt; \dc
resumed spawned process.

調(diào)試libnative-lib.so

通過Smali代碼可知libnative-lib.so文件是在中被加載的,在onCreate方法中被調(diào)用的。

因此在hook onCreate方法來下斷點(diǎn)。

參考

https://www.qqxiuzi.cn/bianma/Unicode-UTF.php https://frida.re/docs/home/ https://github.com/enovella/r2frida-wiki

寫在最后

r2frida在so調(diào)試方面基本可以替代IDA的,至于Smali的調(diào)試會在后面的文章中涉及。lldb這個(gè)利器本來是IOS上面的,用來取代gdb的,目前Google在Android中也大力推廣,取代gdb也只是時(shí)間問題。

公眾號

更多內(nèi)容,歡迎關(guān)注我的微信公眾號: 無情劍客。


Android動態(tài)調(diào)試-不用IDA Pro的評論 (共 條)

分享到微博請遵守國家法律
英山县| 禄丰县| 丹东市| 墨玉县| 六枝特区| 武城县| 色达县| 宽甸| 凯里市| 原平市| 财经| 洪雅县| 宝鸡市| 如皋市| 锦屏县| 寿宁县| 漯河市| 大连市| 太白县| 庆阳市| 湄潭县| 得荣县| 仁怀市| 县级市| 永兴县| 衡阳县| 固安县| 祁东县| 新平| 惠安县| 抚顺县| 德化县| 福建省| 阿拉善左旗| 休宁县| 民权县| 涟水县| 邯郸市| 开化县| 咸丰县| 疏附县|