Run include exe from memory

Just starting out? Need help? Post your questions and find answers here.
eriksradio
User
User
Posts: 30
Joined: Tue Sep 09, 2003 11:44 pm
Location: Queensland, Australia

Run include exe from memory

Post by eriksradio »

If CreateFile(1, "xxxx.exe")
UseFile(1)
L1= ?ExitProc-?Inc
WriteData(?Inc,L1)
CloseFile(1)
Goto BeginProgram
Inc:
IncludeBinary "xxxx.exe"
ExitProc:
EndIf

This works perfectly and produces "xxxx.exe" in the application directory.

Is it possible to extract this file to memory and run it from there
without producing the "xxxx.exe" file.

I am a newbie so lots to learn.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

Hear same *packer* program .
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

It's possible to run it from memory (UPX works like that), but it is not that easy.. as you must reproduce the system PE-program launcher and that means to work with system structures, etc.. I think you could find informations about that on Google. I'd suggest you to include your .EXEs as resources and not like program data (IncludeBinary). In this way, you won't load them in system memory till you'll extract them. See my post on Tricks section of this forum.
eriksradio
User
User
Posts: 30
Joined: Tue Sep 09, 2003 11:44 pm
Location: Queensland, Australia

Post by eriksradio »

Seldon wrote:It's possible to run it from memory (UPX works like that), but it is not that easy.. as you must reproduce the system PE-program launcher and that means to work with system structures, etc.. I think you could find informations about that on Google. I'd suggest you to include your .EXEs as resources and not like program data (IncludeBinary). In this way, you won't load them in system memory till you'll extract them. See my post on Tricks section of this forum.
Thanks Seldon,
I have read your res article.
Looks like I will have a bit of homework to do, but that is the fun of it.
Post Reply