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 


how bypass NtUserSendInput in Kernel Mode?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Thu Sep 18, 2008 9:49 pm    Post subject: how bypass NtUserSendInput in Kernel Mode? Reply with quote

anyone have an source code sample,
or reference?

this is relative ?

http://forum.cheatengine.org/viewtopic.php?t=18062

but, what is the System Call for NtUserSendInput ?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Sep 19, 2008 1:23 am    Post subject: Reply with quote

Did you mean what is the service ID for that API ? I actually used to think the service ID was the same across all systems until recently so it is probably not a good idea to hardcode it but to fetch it dynamically if that is what you are looking to do.
Back to top
View user's profile Send private message
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Fri Sep 19, 2008 3:07 pm    Post subject: Reply with quote

question?

this is a example of hook in kernel mode of ZwTerminateProcess

i can use this method for hook SendInput in kernel mode, or needed more info?

Quote:


#include <ntddk.h>
#include <ntifs.h>
#define SYSTEMSERVICE(_function) KeServiceDescriptorTable->ServiceTable[*(DWORD*)((unsigned char *)_function + 1)]

typedef (*ZWTERMPROCESS)(
IN HANDLE ProcessHandle,
IN NTSTATUS ExitProcess
);

ZWTERMPROCESS TheOldZwTerminateProcess;
extern ZWTERMPROCESS TheOldZwTerminateProcess;

NTSTATUS NewZwTerminateProcess(IN HANDLE ProcessHandle, IN NTSTATUS ExitCode) {
NTSTATUS status = (NTSTATUS)NULL;
(ZWTERMPROCESS)(TheOldZwTerminateProcess)(ProcessHandle, ExitCode);
// comment out the above line to stop TerminateProcess from being called
DbgPrint("ExtremeCoder: TerminateProcess Called\n");
return status;
}

VOID HookAPI() {
TheOldZwTerminateProcess = (ZWTERMPROCESS)(SYSTEMSERVICE(ZwTerminateProcess));
(ZWTERMPROCESS)(SYSTEMSERVICE(ZwTerminateProcess)) = NewZwTerminateProcess;
DbgPrint("ExtremeCoder: Hooking ZwTerminateProcess...\n");
}

VOID UnHookAPI() {
(ZWTERMPROCESS)(SYSTEMSERVICE(ZwTerminateProcess)) = TheOldZwTerminateProcess;
DbgPrint("ExtremeCoder: Unhooking ZwTerminateProcess...\n");
}

VOID Unload_Driver(IN PDRIVER_OBJECT DriverObject) {
UnHookAPI();
DbgPrint("ExtremeCoder: Unloading Driver...\n");
}

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) {
DriverObject->DriverUnload = Unload_Driver;
DbgPrint("ExtremeCoder: Loading Driver...\n");
HookAPI();
return(STATUS_SUCCESS);
}

Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Fri Sep 19, 2008 3:44 pm    Post subject: Reply with quote

He just wants the system call so he can try SDT hooking..its not gonna work (on GG, they load their own copy).
Back to top
View user's profile Send private message
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Fri Sep 19, 2008 3:56 pm    Post subject: Reply with quote

then what is the path? please help
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Sat Sep 20, 2008 8:51 am    Post subject: Reply with quote

www . woodmann . com/forum/archive/index.php/t-11383.html
post by blabber

has most of the Win32k.sys call table (or the KeServiceDescriptTableShadow).. ;]
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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