Valhalla Legends Archive

Programming => General Programming => Topic started by: Banana fanna fo fanna on January 15, 2003, 12:36 PM

Title: Calling or injecting code into another process
Post by: Banana fanna fo fanna on January 15, 2003, 12:36 PM
Hey guys,

Let's say I know the offset of a function I want to call in a running program. Is there any way for me to call into another totally seperate process?

If not, could I dynamically inject code in-memory? I'm thinking OpenProcess might help...?

Thanks for your help.
Title: Re: Calling or injecting code into another process
Post by: iago on January 16, 2003, 05:57 AM
No, and yes.

I suggest using CreateRemoteThread(), and yes, OpenProcess is necessary :D
Title: Re: Calling or injecting code into another process
Post by: Banana fanna fo fanna on January 16, 2003, 10:57 AM
I found the answer in an e-book Grok sent me a looong time ago ;)
Title: Re: Calling or injecting code into another process
Post by: Etheran on January 17, 2003, 12:20 AM
Share the answer, I'd like to know.  I'm currently learning how to inject code.  I'm using starcraft without any help from tutorials (I wanted to do something on my own).
Title: Re: Calling or injecting code into another process
Post by: iago on January 17, 2003, 05:37 AM
I can send you an ebook about the win32 api.. it'll tell you how to inject code, but it won't do it for you, it's designed as an educational book with everything from threading to dlls to injection.  Actually, Grok is the one who suggested I buy it originally :D
Title: Re: Calling or injecting code into another process
Post by: Zakath on January 17, 2003, 11:36 AM
iago, send me that book, will you?

You know how to find me. :P
Title: Re: Calling or injecting code into another process
Post by: Etheran on January 17, 2003, 04:00 PM
yes!! plz kthx leet h4x0r time.  lol :P
Title: Re: Calling or injecting code into another process
Post by: Yoni on January 18, 2003, 02:54 AM
That's where it should have gone.

A year (exactly) old but it should still work:
http://www.valhallalegends.com/yoni/SampleHDL.zip
Title: Re: Calling or injecting code into another process
Post by: iago on January 18, 2003, 09:21 AM
You can get it here:
ftp://Guest:[email protected]:665/windows.chm

If it doesn't work, it means I turned off my computer, try again later :D
Title: Re: Calling or injecting code into another process
Post by: Etheran on January 18, 2003, 08:31 PM
nice one, thanks iago and Grok! :)
Title: Re: Calling or injecting code into another process
Post by: iago on January 18, 2003, 10:36 PM
QuoteYou can get it here:
ftp://Guest:[email protected]:665/windows.chm

If it doesn't work, it means I turned off my computer, try again later :D

Wow, 8 downloads in 12 hours.. it's at #1 on my ftp at.. 8 downloads :-)
Title: Re: Calling or injecting code into another process
Post by: Grok on January 19, 2003, 05:28 AM
Someone probably wanted extra copies for their friends.

=P
Title: Re: Calling or injecting code into another process
Post by: iago on January 19, 2003, 07:57 AM
That doesn't even make sense, and you know it! :-P

Besides, it's unique ip's.

But on that note, if when you're done with the file, please put it back so other people can use it (I only have so many copies)!
Title: Re: Calling or injecting code into another process
Post by: l)ragon on January 19, 2003, 11:53 AM
/me looks around
Is that what that book is ^^
Sopose i'll have to read latteron. 8p
Title: Re: Calling or injecting code into another process
Post by: Etheran on January 19, 2003, 12:48 PM
I wish I could find an ebook library; that'd be sweet. :)
Title: Re: Calling or injecting code into another process
Post by: iago on January 19, 2003, 12:59 PM
By the way, that book I put up is ~1000 pages long, so don't plan on reading it all in one sitting :-)

I believe chapter 21 or possibly 22 is the important one :)
Title: Re: Calling or injecting code into another process
Post by: Eibro on January 19, 2003, 01:02 PM
QuoteI wish I could find an ebook library; that'd be sweet. :)
Here's some:

http://www.ebone.at/files.php?show=Books
\http://www.tcfb.com/freetechbooks/bookcpp.html
http://www.ibiblio.org/obp/thinkCScpp/
http://www.maththinking.com/boat/computerbooks.html
http://www.stud.fim.ntnu.no/~oystesk/CPP/htm/ch01.htm
http://webster.cs.ucr.edu/Page_asm/ArtOfAsm.html
http://www.mindview.net/Books
http://www.intelinfo.com/free_computer_books.html