frida 工具 objection 小细节

打开objection:

C:\Users\Administrator\Downloads>objection -g com.tencent.mobileqq explore
Using USB device `AOSP on angler`
Agent injected and responds ok!

     _   _         _   _
 ___| |_|_|___ ___| |_|_|___ ___
| . | . | | -_|  _|  _| | . |   |
|___|___| |___|___|_| |_|___|_|_|
      |___|(object)inject(ion) v1.8.4

     Runtime Mobile Exploration
        by: @leonjza from @sensepost

[tab] for command suggestions
com.tencent.mobileqq on (Android: 6.0.1) [usb] #

添加某个函数断点,并输出调用栈,入参和出参:

com.tencent.mobileqq on (Android: 6.0.1) [usb] # android hooking watch class_method com.android.okhttp.internal.http.Ht
tpEngine.hasBody --dump-args --dump-backtrace --dump-return
(agent) Attempting to watch class com.android.okhttp.internal.http.HttpEngine and method hasBody.
(agent) Hooking com.android.okhttp.internal.http.HttpEngine.hasBody(com.android.okhttp.Response)
(agent) Registering job 65vnl7pd22. Type: watch-method for: com.android.okhttp.internal.http.HttpEngine.hasBody
com.tencent.mobileqq on (Android: 6.0.1) [usb] #

查看某个类中所有函数的调用:

com.tencent.mobileqq on (Android: 6.0.1) [usb] # android hooking watch class com.tencent.mobileqq.highway.segment.HwReq
uest
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.checkCacheIp(com.tencent.mobileqq.highway.segment.HwResponse, com.tencent.mobileqq.highway.transaction.Transaction)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.dumpBaseInfo()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getExtendInfo()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getHwSeq()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getLoginSigHead()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getPriority()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getRequestBody()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getSegmentHead()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.getTicket()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.hasRequestBody()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onCancle()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onError(int)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onResponse(com.tencent.mobileqq.highway.segment.RequestWorker, com.tencent.mobileqq.highway.segment.HwResponse)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onResponse(com.tencent.mobileqq.highway.segment.RequestWorker, com.tencent.mobileqq.highway.segment.HwResponse, com.tencent.mobileqq.highway.segment.HwRequest)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onRetry(int)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onSendBegin()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.onSendEnd()
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.setHwSeq(int)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.updateStaus(int)
(agent) Hooking com.tencent.mobileqq.highway.segment.HwRequest.intToIP(int)
(agent) Registering job zgp81je8b9o. Type: watch-class for: com.tencent.mobileqq.highway.segment.HwRequest
com.tencent.mobileqq on (Android: 6.0.1) [usb] #

查看当前任务: 

com.tencent.mobileqq on (Android: 6.0.1) [usb] # jobs list
Job ID         Hooks  Type
-----------  -------  ---------------------------------------------------------------------
65vnl7pd22         1  watch-method for: com.android.okhttp.internal.http.HttpEngine.hasBody
zgp81je8b9o       20  watch-class for: com.tencent.mobileqq.highway.segment.HwRequest
com.tencent.mobileqq on (Android: 6.0.1) [usb] #

关闭某个断点:

com.tencent.mobileqq on (Android: 6.0.1) [usb] # jobs kill 65vnl7pd22

这里的job号,不仅可以通过jobs list获得,每次hook住之后,最左边也会携带,如下:

(agent) [iqbhfw0ezd] Called com.tencent.mobileqq.highway.segment.HwRequest.intToIP(int)
(agent) [iqbhfw0ezd] Called com.tencent.mobileqq.highway.segment.HwRequest.getHwSeq()
(agent) [iqbhfw0ezd] Called com.tencent.mobileqq.highway.segment.HwRequest.getHwSeq()

暂时就用到这些,以后再补

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值