Posted: Fri Jan 05, 2024 9:54 pm Post subject: [Plugin] Using OpenProcess hook
Hello everyone,
I have a question about cheat engines OpenProcess function that is used to grab a handle with i believe is query information.
I'm attempting to open a process, but that process will strip handles or simply deny a handle creation of ANY kind. Which results in cheat engines functionality breaking, I already have a RPM / WPM / VirtualQueryEx hooks in place that will use a driver instead of the win32 api.
Is there an equivalent method of OpenProcess in kernel that CE will be happy with the result?
CheatEngine expects a HANDLE to be returned in OpenProcess, I've tried simply just returning 1 to bypass a null check but then this questionable fix will break cheat engines memory viewer, scanning, etc.
I don't need a handle to the game as im doing everything through kernel, is there a simple way to achieve CE functionality without needing a real handle to a process?
Do the CE kernel routines in Edit -> Settings -> Extra work?
Don't want CE's driver loaded, but I found this in cheat engine source code on github.(Can't post links but look for the file "cheatengine/DBKKernel/IOPLDispatcher.c" Line 386.
So I just hook the OpenProcess and do the kernel equivalent to OpenProcess.
If anyone runs into this post in future, hook the OpenProcess function in CE SDK, and just do this in your driver.
Code:
auto HandleOpenProcess = [&]() {
OpenProcessRequest* Request = reinterpret_cast<OpenProcessRequest*>(Irp->AssociatedIrp.SystemBuffer);
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum