Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-08-2004, 09:41
Spiyre
 
Posts: n/a
Running program from memory

Is there any way to run a program from memory, like say for example we have an exe stored in a resource and we load the resource into a byte array.. without saving the image to disk, is it possible to run it?
Reply With Quote
  #2  
Old 09-08-2004, 11:20
TQN TQN is offline
VIP
 
Join Date: Apr 2003
Location: Vietnam
Posts: 358
Rept. Given: 143
Rept. Rcvd 24 Times in 13 Posts
Thanks Given: 196
Thanks Rcvd at 168 Times in 51 Posts
TQN Reputation: 24
If I remember correctly, on Win32ASM Community board, have a post and many discuss about this method. You can search on this board. Hope you will find the answer.
Regards,
TQN
Reply With Quote
  #3  
Old 09-14-2004, 19:21
mark0x
 
Posts: n/a
Funnily enough I came across a post about this when searching this morning:

hxxp://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=O4dx5Ej%24DHA.2576%40tk2msftngp13.phx.gbl
Reply With Quote
  #4  
Old 09-15-2004, 09:22
badminton
 
Posts: n/a
Yes you actually can do that. I remember doing it back in the 1995 days. You basically should download a program called RAMDrive. With that program you can use your computers RAM to store files.

I think there is more than one type of RAMDrive program out these days though.
Reply With Quote
  #5  
Old 09-18-2004, 08:02
crc32
 
Posts: n/a
hmm i cant think of anything why it shouldnt work. map into mem, resolve imports etc, jmp entrypoint. actually this wouldnt be much different as writing an loader stub for an pepacker. only problem might be relocation info. since .exe files normally use an std imagebase, reloc infos are stripped, without them you might have an hard time figuring out what actually is an offset and whats code.
an solution to this might be to compile the "loader" app onto nonstandard imagebase so the 0x400000 range is "free" (but then again how to alloc mem on exactly this address), or compile the "target" app with relocation info u can use.

Last edited by crc32; 09-18-2004 at 08:29.
Reply With Quote
  #6  
Old 09-18-2004, 08:33
tofu-sensei tofu-sensei is offline
Friend
 
Join Date: Jul 2004
Posts: 113
Rept. Given: 1
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 3
Thanks Rcvd at 24 Times in 13 Posts
tofu-sensei Reputation: 15
Quote:
Originally Posted by crc32
hmm i cant think of anything why it shouldnt work. map into mem, resolve imports etc, jmp entrypoint.
many api calls will fail (e.g. anything related to that executable's resources), it won't be a self-contained process but merely a thread sharing the loader's virtual address space, so this clearly will not work for arbitrary executables.
Reply With Quote
  #7  
Old 09-18-2004, 09:34
lordor
 
Posts: n/a
you can try to inject the code data in a app,then call createremotethread
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running DeepSeek R1 locally chants General Discussion 25 07-12-2025 20:44
How can I detect whether a 'Virtual machine' is currently running? me0007 General Discussion 5 06-16-2004 17:44
Need to find a pattern in a running file merlin General Discussion 14 07-20-2002 06:59


All times are GMT +8. The time now is 02:43.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2025 )