Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

API hook(with full source code).

Posted on 2003-10-24
14
2,970 Views
Last Modified: 2007-12-19
i need API Hook Such as CreateProcess.
with full source code (not madshi).
plz! help.
0
Comment
Question by:AFZDeveloper
  • 3
  • 3
  • 2
  • +3
14 Comments
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 125 total points
ID: 9613591
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 125 total points
ID: 9616770
hello AFZDeveloper, you may want to give alot more information about what type of hook you want to use (or what you are trying to do). . . . if you want some full source code to be created. . . Here is an EE page with some code for a Keyboard hook

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20347433.html
0
 
LVL 6

Assisted Solution

by:DaFox
DaFox earned 125 total points
ID: 9621193
Slick, I guess AFZDev. is asking for some API (function) hijacking code!

AFZDeveloper, information on this topic are very rare. The guys who know how to do it often won't share their knowledge (of course).
I recommend to take a look at Jeffrey Richter's book and/or the Detour package at http://research.microsoft.com/ (both contain full VC++ source code).

I guess this is not a satisfing answer for you. But I really doubt you will ever get a full API hijacking Delphi example and as you can read in Jeffrey Richter's book there are many different circumstances you have to care about. It's not that easy as setting up a "WindowsHookEx()" ;-)

Regards,
Markus
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 34

Expert Comment

by:Slick812
ID: 9621719
I see AFZDeveloper in alot of questions here. . . who knows what he is asking for. . . . but he needs to give enough information to  get help for the problem
0
 
LVL 3

Author Comment

by:AFZDeveloper
ID: 9621937
such as madCodeHook but with source code.
0
 

Expert Comment

by:SoulessZero
ID: 9623188
There are many Hooks that can be installed on system, what kind of Hook do you need help?
0
 
LVL 3

Author Comment

by:AFZDeveloper
ID: 9623454
SoulessZero
plz! more comment.

0
 
LVL 6

Expert Comment

by:DaFox
ID: 9623648
AFZDev., I would say you are the one who has to be more precise...
MadCodeHook is a collection of many different hook types + much low level stuff. You won't even find one collection written in any other language that contains all of this.
What are you aiming at? Is it a "just for fun" question or do you need a specific thing to be done?

Markus
0
 
LVL 6

Expert Comment

by:DaFox
ID: 9623655
> i need API Hook Such as CreateProcess.

Are you talking about CreateRemoteThread()???
0
 

Assisted Solution

by:SoulessZero
SoulessZero earned 125 total points
ID: 9625889
> i need API Hook Such as CreateProcess.

CreateProcess API function is not a Hook function. If you mean to monitor any newly created process, then you may need to implement follow hook functions by using API call.

1. SetWindowsHookEx <--- Install a Hook function on system, all Hook functions must be implemented in a DLL.
2. Specify which system hook to install, Keyboard, Mouse, Message Filter, Journal playback...etc. Read Win32 API help in Delphi and look for "SetWindowsHookEx" API function.
3. UnHookWindowHookEx <------ Removes hook function from system and free its memory.

Im not going to tell you or write exact code here, coz Im a lazy guy. You have to learn it by yourself by read Win32 API Help file and hang your system for several times. (thats what i paid for my skills :-)
0
 
LVL 3

Author Comment

by:AFZDeveloper
ID: 9630992
SoulessZero
yes, monitor any newly created process for example.
plz. send a source code for it.
tanks.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 9797740
>> MadCodeHook is a collection of many different hook types + much low level stuff. You won't even find one collection written in any other language that contains all of this.

Thanks, DaFox!   :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question