Gbps / gbhv

Simple x86-64 VT-x Hypervisor with EPT Hooking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong loop logic when using LDE

CySHell opened this issue · comments

Inside ept.c, when counting the number of instruction bytes at the start of the hooked function, the instruction pointer is not incremented - this results in counting the length of the same instruction over and over again.

SizeOfHookedInstructions += LDE(TargetFunction, 64))

should be changed to something like:

SizeOfHookedInstructions += LDE(TargetFunction + SizeOfHookedInstructions, 64))

commented

Hey there, great find! Looks like it was overlooked but generally didn't have any issues because only one instruction's space was necessary for the example.

Could you submit a pull request so I can merge it into the main branch?

Thanks!

Sure, please give me authorization to create a pull request.

commented

Sorry, I know this was from awhile ago, but anyone should be able to open a pull request and I can review it.