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

Can I change RIP address by this? #2

Open
wtfbbq opened this issue Mar 5, 2019 · 2 comments
Open

Can I change RIP address by this? #2

wtfbbq opened this issue Mar 5, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@wtfbbq
Copy link

wtfbbq commented Mar 5, 2019

I want to change RIP address using this debugger.
However I can't see there are external method to do exception handler.
Is it possible to do this?

@changeofpace
Copy link
Owner

This is currently not possible because the FPBREAKPOINT_CALLBACK prototype does not allow breakpoint callbacks to modify the guest instruction pointer. This is an oversight, and I'm working on a fix now.

@changeofpace changeofpace added the bug Something isn't working label Mar 17, 2019
@changeofpace
Copy link
Owner

changeofpace commented Mar 17, 2019

2700fb1 allows breakpoint callbacks to modify the guest instruction pointer. If a callback modifies the guest ip parameter then the guest will be redirected to that modified address on VM entry.

You can achieve code hooking by implementing a new breakpoint callback and its driver interface. e.g., Define a breakpoint callback which uses the context parameter to store the hook destination address. The body of the callback writes the context parameter to the guest instruction pointer parameter so that execution is redirected to your hook on VM entry.

I like this idea so I will implement it in the future. I plan to include documentation which explains the process of adding new callbacks using this idea as a working example.

@changeofpace changeofpace added enhancement New feature or request and removed bug Something isn't working labels Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants