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 


Double fault? (Question to DarkByte)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
linden
Master Cheater
Reputation: 0

Joined: 10 Mar 2006
Posts: 319

PostPosted: Sun Dec 30, 2007 10:29 am    Post subject: Double fault? (Question to DarkByte) Reply with quote

I'm now writing my int1 handler (I hooked it),
and I got DRIVER_IRQL_NOT_LESS_OR_EQUAL BSOD while referencing a usermode address from the handler.
(I was handling single step and disassembling the code pointed to by EIP, but it seems that code was not resident in memory...)

A question that came to me is... Is paging service available inside an interrupt handler Question (int 0E inside int 01 handler...)

Sorry for such stupid question...
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25832
Location: The netherlands

PostPosted: Sun Dec 30, 2007 2:07 pm    Post subject: Reply with quote

no, paging isn't available in the int1 handler, paging is only available at a specific irql and lower, but the interrupt handler is at the highest possible irql, even beyond paging.
Perhaps you can call specific api's to get something resident, but in the int1 handler I don't recommend api calls. Best do a DPC for this (never lookedinto it since the way int1 is hooked isn't really a compatible way)

Or else before hooking or setting a breakpoint get some memory regions to be marked as non-pageable or lock itm for the duration of the debug sessions.
Else keep in to the usermode address you know is valid: Page of the current eip, but stay withing the page range, don't try to read memory of the next page

To prevent blue screens related to paging: Hook int 0e as well whenever youer int1 hook is called let paging errors just write to a address indicating a pagefault and continue, instead of calling the original routine (So add some checks after accessing to see if a pagefault happened or not)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
linden
Master Cheater
Reputation: 0

Joined: 10 Mar 2006
Posts: 319

PostPosted: Mon Dec 31, 2007 6:38 am    Post subject: Reply with quote

Thanks for your reply, DarkByte Very Happy
I just managed to locate GameMon's sprintf function by single stepping it from kernel.

Next goal is to hook that and dump their log (so that I don't have to decrypt those .erl files), but now having headache thinking about how to hook functions like sprintf which accepts variable arguments...
Overwriting the retn instruction would be the easiest, but unfortunately not enough space to write a jmp there.
Checking for "add esp, XXX" at the return address would be one way to find out the number of arguments, but there's no guarantee that there would be an "add esp, xxx" right after the call Crying or Very sad Oh...Jesus...still lots of problems Evil or Very Mad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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