Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement watchpoints #45

Closed
trufae opened this issue Feb 19, 2017 · 2 comments
Closed

Implement watchpoints #45

trufae opened this issue Feb 19, 2017 · 2 comments

Comments

@trufae
Copy link
Member

trufae commented Feb 19, 2017

  • change memory protections with Memory.protect()
  • hook the setExceptionHandler() and catch if it's R,W,X and the address matches.

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
Copy link

ghostkkk commented Sep 20, 2018

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
Copy link
Member Author

trufae commented Feb 4, 2024

closing as dup for #496 and may be helpful to keep it here for our future selfs when implementing it

@trufae trufae closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants