A forum for reverse engineering, OS internals and malware analysis 

Ask your beginner questions here.
 #12602  by listito
 Tue Apr 10, 2012 6:08 pm
I've read somewhere ia_32_sysenter holds the offset which is loaded into EIP when sysenter is executed, is there any kind of stealth,best method of kernelhooking when the purpose is monitoring the value of EAX when sysenter is called?
 #12608  by everdox
 Tue Apr 10, 2012 10:11 pm
well yeh just hook the MSR. There is going to be no 'perfect' or undetectable way. Obviously you will have to do it on a per processor basis provided you are using a multi-core system. Check out KeSetAffinityThread, that's the same way patchguard does integrity checking on msr's last time I checked.
 #12692  by lorddoskias
 Fri Apr 13, 2012 5:11 pm
I don;t think it is useless. It certainly raises the bar. Recently there hasn't been any rootkits which targeted patchguard explicitly, by explicitly I mean circumventing the actual DPCs etc, rather they all try to disabled it even before it has started so I'd say it is effective to a certain extent.
 #12694  by Vrtule
 Fri Apr 13, 2012 7:24 pm
lorddoskias wrote:I don;t think it is useless. It certainly raises the bar. Recently there hasn't been any rootkits which targeted patchguard explicitly, by explicitly I mean circumventing the actual DPCs etc, rather they all try to disabled it even before it has started so I'd say it is effective to a certain extent.
Yes, I agree. Patchguard does not make kernel hooking impossible. However, it probably discourages many to do so. People use documented methods to solve their problems, there is much less amount of data and code modifications, so the whole kernel should be more stable.
 #12697  by everdox
 Fri Apr 13, 2012 10:33 pm
Vrtule wrote:
lorddoskias wrote:I don;t think it is useless. It certainly raises the bar. Recently there hasn't been any rootkits which targeted patchguard explicitly, by explicitly I mean circumventing the actual DPCs etc, rather they all try to disabled it even before it has started so I'd say it is effective to a certain extent.
Yes, I agree. Patchguard does not make kernel hooking impossible. However, it probably discourages many to do so. People use documented methods to solve their problems, there is much less amount of data and code modifications, so the whole kernel should be more stable.

I agree, and also in the context of DRM using various types of kernel patching. So in that sense patchguard certainly has it's positive aspects. There are still plenty of things that can be done with DKOM anyway ;)
 #12724  by Flamef
 Sat Apr 14, 2012 3:43 pm
listito wrote:thanks, imho patchguard is almost useless, trying to protect windows kernel with ring0 code is stupid
Can you justify your point?

In my opinion,patchguard is not useless.Indeed it raises the bar,i mean,the rootkits now need to be more cuztomized in order cope with patchguard.More actual skills are needed,as a result,many people get "discouraged",and they give up.