Total Hook

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Total Hook

Post by Kwai chang caine »

Hello at all

Excuse me for this beginner question :oops: , but is it possible to create a hook for all windows activity ???

I have searched in the forum and find several thread on this subject, but not really hook ALL action of Windows, just keyboard, mouse, another exe, etc... :(

Thanks and good day
ImageThe happiness is a road...
Not a destination
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Re: Total Hook

Post by Henrik »

Hi kcc
You would probably need somthing like EasyHook EasyHook - http://easyhook.codeplex.com it uses a " Driver ", to ensure that it workes
But the project seems abandoned, but some have made it work in Vs2010
it is primarily at C# project "I dont like C#, but that is my problem"

Also to inject up to Xp you should use kernel32 's function CreateThread, you can finde examples on this forum
But from Vista and up you need "NtCreateThreadEx" of the ntdll.dll
NtCreateThreadEx - http://securityxploded.com/ntcreatethreadex.php

I dont really play with this stuff anymore ,just happend to stumbled over EasyHook some time ago.

You have something to check out now, i never had any luck in compiling EasyHook so i cant help you there, and i'm not realy in interested in this so good luck.

Best. Henrik
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Total Hook

Post by Kwai chang caine »

Thanks a lot HENRIK 8)

In fact i search to catch the OLE commands passing between two apps.
Like i don't know how do that, i say to me perhaps, if it's possible to see all the actions of windows, surely the OLE is into her, but i'm not sure :(

So thanks a lot for your links, perhaps a beginning of way for do my idea 8)
ImageThe happiness is a road...
Not a destination
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: Total Hook

Post by GeBonet »

Hello, I think it would be very difficult. Should be able to do before Windows user requests the first time ...
In addition it would be very dangerous and not very useful, except write another OS based on Windows itself! :?:
But hey that's just my opinion! :wink:
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: Total Hook

Post by Thorium »

It's actualy called a global hook. And you should only use something like that if there is no other way. If not proper done it can cause the whole system to slow down, cause system instability and even security risks.

A practical use for it is a virus scanner that oversees system activities like HDD accesses to detect suspicious behavior of software or simply scan files befor they are executed or written to disk.

If you want to intercept communication between 2 applications a lokal or user mode hook should be just fine.
I dont know anything about OLE, so i dont know what to hook, but if you know OLE you should know what to hook.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Total Hook

Post by IdeasVacuum »

Microsoft have just launched a competition ($200,000 prize) for novel ways to prevent global hooks..........
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Total Hook

Post by idle »

IdeasVacuum wrote:Microsoft have just launched a competition ($200,000 prize) for novel ways to prevent global hooks..........
Delete windows! :lol:
Windows 11, Manjaro, Raspberry Pi OS
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Total Hook

Post by IdeasVacuum »

... I think you should enter that idea Idle :mrgreen:

http://www.microsoft.com/security/blueh ... rules.aspx
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Total Hook

Post by idle »

I'm sure they'll get a lot of those :lol:

Interesting, it's kind of like Microsoft is admitting "we've tried and tried but we simply don't know how to do it"
Windows 11, Manjaro, Raspberry Pi OS
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Total Hook

Post by IdeasVacuum »

.....or admitting that their own technology is getting beyond their reach. :shock:

In fairness to them though, someone 'on the outside' may have a break-through idea because they are not encumbered with the day-to-day development of the OS. Still, I think the prize is pretty mean, what they should offer is a royalty % of Windows sales..........
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Total Hook

Post by idle »

I quite expect there are hackers out there who have a better handle on the internals of the OS
than MS engineers, since they generally develop specific parts of windows in total isolation from each other.
Windows 11, Manjaro, Raspberry Pi OS
Image
Yogi Yang
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 2:19 pm

Re: Total Hook

Post by Yogi Yang »

There are a few commercial and binary only solutions.

I prefer to use DWSpy component it comes as a static DLL as well as an ActiveX wrapper. It comes with source code option also. They have implemented all kinds of hooks in a very elegant way. The subclasses is so stable that I have never seen any of my software that use this hook ever crash in any way. :)

Check out

Code: Select all

www.desaware.com
There is an ActiveX only solution also from Marby software. I can't recall its exact url though. The name of the hook is MsgHook and it is freeware.

HTH
--
Yogi Yang
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Total Hook

Post by Kwai chang caine »

Thorium wrote:If you want to intercept communication between 2 applications a lokal or user mode hook should be just fine.
I dont know anything about OLE, so i dont know what to hook, but if you know OLE you should know what to hook.
Me too :oops:
I just know how using the OLE, with VB6, OFFICE and also the Splendid COMATE and PureDisHelper.
But i don't know what is the way for hooking it :(

But it's a good news what you say, because if i don't forced to hooking all the windows, it's surelly more sample to found the OLE command inside the thousands command of a local hook :D

@Yogi Yang
Thanks a lot for your precious links 8)
I take a look, perhaps i found my happiness inside :wink:

@All
Thanks for your answers :wink:
ImageThe happiness is a road...
Not a destination
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: Total Hook

Post by Thorium »

IdeasVacuum wrote:Microsoft have just launched a competition ($200,000 prize) for novel ways to prevent global hooks..........
As i understand it it's not about global hooks at all. It's about prevention of exploitation of memory vulnerabilitys.

You dont need to exploit any vulnerabilitys for a global hook, as long as you get admin rights. You should not be able to install a global hook without admin rights.
Post Reply