nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

Implement watchpoints #45

Closed trufae closed 8 months ago

trufae commented 7 years ago

Ole André Vadla Ravnås, [19 Feb 2017 01:46]:

(on top of Memory.protect() and Process.setExceptionHandler())

only part I don't like is that Process.setExceptionHandler() is just a single handler obviously so it would be nice to have API that has a chain of handlers where they're called in order

ghostkkk commented 6 years ago

Hi~

I'd like to ask you a question.

r2Frida has no watch function.

so I tried the above method.

Memroy.protect made the write part of a specific memory area read only.

a moment to write, Process.setExceptionHandler does not work. Attated Process Close immediately.

Perhaps...Process.setExceptionHandler function is not implemented yet.

my test version. server : frida-server-12.2.5-android-x86 r2frida : v2.9.0

// test sample
function fnExcetion(v){
        console.log('Enter:');
        return true;
}

// register ExceptionHandler 
Process.setExceptionHandler(fnExcetion);

// Variable Address in program
address = "0xb2dd5040";
Memory.protect(ptr(address), 4, 'r--');

What's wrong? If you tested it, Can I see a sample code or Test version?

trufae commented 8 months ago

closing as dup for https://github.com/nowsecure/r2frida/issues/496 and may be helpful to keep it here for our future selfs when implementing it