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 


Kernelmode Hooks
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Sep 07, 2008 11:52 pm    Post subject: Kernelmode Hooks Reply with quote

What's the difference between creating a kernelmode hooks and usermode hooks? And why is it that kernelmode hooks seem so much more difficult to bypass?
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Mon Sep 08, 2008 12:15 am    Post subject: Reply with quote

elpacco, knock this crap off. You're spouting shit in computer talk and now here. Just leave.

on topic:
From what I undersatnd, a usermode hook happens in ring3 while a kernel mod hook happens in ring0. A usermmode hook is generally just that redirect from the first 5 bytes, but there's several other kernel mode hooks. For instance SSDT hooks where you change the SSD table to jump to your code instead of call X function. Also, I think I've read GG gets a little more creative with kernel mode hooks and place them in weird places (ie, not the first 5 bytes).

_________________
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: Mon Sep 08, 2008 12:51 am    Post subject: Reply with quote

the reason Kernel mode funtions are so much harder to bypass is
that the kernel mode function site below UserMode API there they tke precedence over them...

Ie almost all API call into KernelMode so by hooking the KernelMode API that is called by the Usermode API you have succefully modified the Code path to execute our code and if conditions are met then parameter tampering and code behavior changes can then apply.. if not the the Hook Forwards to the Origanil call..
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Sep 08, 2008 2:17 am    Post subject: Reply with quote

Also ring3 applications will not have access to kernel memory which adds that extra level of difficulty to code a driver or something to play with kernel space.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Sep 08, 2008 8:37 am    Post subject: Reply with quote

What exactly is "Kernel memory"? Is it just physical memory and not virtual memory?
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sphere90
Grandmaster Cheater
Reputation: 0

Joined: 24 Jun 2006
Posts: 912

PostPosted: Mon Sep 08, 2008 9:58 am    Post subject: Reply with quote

Kernel memory is the region of memory located from 0x80000000 to 0xFFFFFFFF. There's a subtle difference between virtual memory and physical memory. 0x80000000 and 0xFFFFFFFF are virtual memory address of kernel space but the actual physical address of the kernel space maybe different because virtual memory will get mapped into the physical memory eventually. Read Intel's System Programming Guide and you will learn more. It's hard for me to explain it here because memory management is a very broad topic.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon Sep 08, 2008 11:48 am    Post subject: Reply with quote

Slugsnack wrote:
Also ring3 applications will not have access to kernel memory which adds that extra level of difficulty to code a driver or something to play with kernel space.


Coding a driver isn't the only way into ring0. You can also create a call gate or by writing directly to RAM with \Device\PhysicalMemory.
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Mon Sep 08, 2008 2:43 pm    Post subject: Reply with quote

@Flyte:

You can't write to kernelmode from usermode unless you have a driver that modifies the GDT.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Sep 08, 2008 2:54 pm    Post subject: Reply with quote

Writing directly to the ram is basically the same thing as kmode
_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Sep 08, 2008 4:55 pm    Post subject: Reply with quote

What??? you can use other methods into ring0? How do u do it? I gave up on driver programing after it crashed my comp 5 times.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Sep 08, 2008 5:26 pm    Post subject: Reply with quote

Something tells me that driver programming will be the easiest way. Writing directly to RAM could damage and idk about call gates. Sounds tricky
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Sep 08, 2008 5:57 pm    Post subject: Reply with quote

I would agree with blank. And dnsi0 make sure you test your drivers on a Virtual Machine so that you it doesn't crash YOUR machine.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Sep 08, 2008 5:59 pm    Post subject: Reply with quote

Um... Talking about vms I am testing my drivers on my own machine and it is my own computer Im crashing over and over again...
Back to top
View user's profile Send private message
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Mon Sep 08, 2008 6:41 pm    Post subject: Reply with quote

dnsi0 wrote:
Um... Talking about vms I am testing my drivers on my own machine and it is my own computer Im crashing over and over again...


Get VMware, run your test driver in vmware... VMWare crashes, your computer doesn't...
Back to top
View user's profile Send private message AIM Address MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Sep 08, 2008 6:59 pm    Post subject: Reply with quote

Or learn to code driver's better? Catch exceptions using __try/__except and you won't have that problem.
_________________
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 programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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