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