Stalker.follow中的events的属性含义

对于:

Interceptor.attach(funcRealStartAddr, {
    onEnter: function(args) {
...
        Stalker.follow(curTid, {
            events: {
              call: false, // CALL instructions: yes please            
              ret: true, // RET instructions
              exec: false, // all instructions: not recommended as it's
              block: false, // block executed: coarse execution trace
              compile: false // block compiled: useful for coverage
            },
            // onReceive: Called with `events` containing a binary blob comprised of one or more GumEvent structs. See `gumevent.h` for details about the format. Use `Stalker.parse()` to examine the data.
            onReceive(events) {
              var parsedEvents = Stalker.parse(events)
              // var parsedEventsStr = JSON.stringify(parsedEventsStr)
              // console.log(">>> into onReceive: parsedEvents=" + parsedEvents + ", parsedEventsStr=" + parsedEventsStr);
              console.log(">>> into onReceive: parsedEvents=" + parsedEvents);
            },

            // transform: (iterator: StalkerArm64Iterator) => {
            transform: function (iterator) {
...

中:

  • Stalker.follow中的events的属性含义
    • 概述
      • Stalker.follow中的events中某个属性是true,含义是:当出现对应指令,则触发对应event事件
    • 详解
      • 属性
        • 对应的属性的含义是
          • call:call指令
            • Intel=X86的:call指令
            • ARM的:BL类的指令
              • 普通的=arm64的:BLBLR
              • arm64e的,带PAC的:BLRAABLRAAZBLRABBLRABZ
          • ret:ret指令
          • exec:所有指令
          • block:(单个)block的(所有)指令
          • compile:特殊,(单个)block被编译时,仅用于测试代码覆盖率?
        • 除去特殊的compile参数,其他几个参数,按照范围大小去划分,更容易理解:
          • exec:所有代码的级别
            • block:单个代码块的级别
              • 某些特殊指令的级别
                • call:单独的call指令
                • ret:单独的ret指令
      • event事件
        • 会触发onReceive(events)函数
          • 其中可以events是二进制(的blob),需要去用Stalker.parse()解析后才能看懂
    • ->eventsonReceive的作用
      • 暂时不完全懂,只是知道,可以设置参数,决定callret等指令的触发时去打印,其他用途暂时不清楚

results matching ""

    No results matching ""