Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Madshi codehook: My process is being terminated

Posted on 2004-11-13
1
Medium Priority
?
466 Views
Last Modified: 2008-02-01
Hi!
I am using Madshi codehook.
I create a iexplore process, then inject a library.
This works very good. But problem is that when i visit some sites (like http://www.narutofan.com)
then entire process is terminated.
Untill now only this bug appeared on narutofan.com and not on any other sites. (But I guess there is more sites it will appear on)

Then I used mozilla /firefox to open the narutofan site. This time the process wasn't terminated.
This is the code I use to inject.




CreateProcess(nil, pchar(c:\PROGRAM FILES\INTERNET EXPLORER\IEXPLORE.EXE), nil, nil, False,0, nil, nil, StartInfo, ProcInfo);


  Process := ProcInfo.hProcess;
  GetCurrentDirectory(MAX_PATH, Path);
  Module := CreateFile(pchar('Some.dll'), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
  Size := GetFileSize(Module, nil);
  GetMem(Data, Size);
  ReadFile(Module, Data^, Size, BytesRead, nil);
  CloseHandle(Module);
  InjectLibrary(Process, Data);
  FreeMem(Data);
0
Comment
Question by:Zabuza-san
1 Comment
 
LVL 20

Accepted Solution

by:
Madshi earned 1000 total points
ID: 12586957
You can't use InjectLibrary with a memory buffer. You need to give in the name of the dll instead. So please do:

InjectLibrary(ProcInfo.hProcess, 'Some.dll');

Instead of all the code you posted. Don't know whether this has anything to do with the IE crash, though.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

580 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