Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Plugin] Is there a way to supply DLLs to cheat engine?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
tawnix
How do I cheat?
Reputation: 0

Joined: 04 Jan 2024
Posts: 3

PostPosted: Mon Jan 08, 2024 5:07 am    Post subject: [Plugin] Is there a way to supply DLLs to cheat engine? Reply with quote

sorry for the 2nd post in couple days.

I'm working on this plugin project that strictly uses a driver without loading DBK into my system.



Little background information:
    1. Hooking OpenProcess to return (HANDLE)1; so Cheat engine doesn't complain. This allows me to avoid any errors when cheat engine is trying to use Win32 API functions. Because I don't need a handle at all to be honest if I'm doing everything through kernel.
    2. I am also obviously hooking the ReadMem, WriteMem, and QueryMem. All of these functions are redirected to my driver.


What I'm trying to accomplish:
I'm trying to redirect the Module32First to my driver so I can fill in that data cheat engine is looking for but this is not as straightforward as other functions are. I can, for example, hook the exported function VirtualQueryEx, and this part is very simple. I send a IO request to my driver and get the MemoryBasicInformation structure and send it to the pointer supplied to VirtualQueryEx like so:
Code:

SIZE_T __stdcall CustomVirtualQuery(HANDLE hProcess, LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength) {
   
   MEMORY_BASIC_INFORMATION PersonalMBI{ 0 };
   SIZE_T Driversize = Driver.QueryVirtualMemory((HANDLE)*Exported.OpenedProcessID, (PVOID)lpAddress, &PersonalMBI, dwLength);
   memcpy(lpBuffer, &PersonalMBI, dwLength);

   return Driversize;
}


I basically just want to give cheat engine the list of modules (DLLs) I obtain from my driver. This doesn't seem as straight forward as the VirtualQueryEx function, where I can read the data from kernel and then just copy the data to the structure CE is supplying in the function parameters.

From kernel I can simply walk the PEB and obtain everything i need.


Does anyone have ideas on how I can accomplish this? Really not sure what to do with this.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Jan 08, 2024 2:54 pm    Post subject: Reply with quote

Cheat Engine has a plugin system you can use to do these kinds of things. You can find more info in the plugin section here:
https://forum.cheatengine.org/viewforum.php?f=27

As well as the CE source repo itself here:
https://github.com/cheat-engine/cheat-engine

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites