1

Is there a way to kill/abort the thread/process from a hook (let's say the onLeave hook) in frida-trace? If "yes", how?

2

One (rather ugly) solution to this is simply to crash the program by setting the thread's context's instruction pointer to unmapped memory or kernel memory. You can accomplish that with Frida's interceptor by using this.context:

onLeave: function (result) {
    this.context.pc = 0
}
  • Hmm... Well, yes, I guess I could do that. But then I'll end up with orphan memory that the OS won't be able to reclaim, right? – alexandernst Sep 24 '18 at 18:15
  • @alexandernst: usually all memory is freed by the OS after process termination – Igor Skochinsky Sep 24 '18 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.