Results 1 to 15 of 15

Thread: Load Program Through Memory?

  1. #1

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464

    Load Program Through Memory?

    I found some source for a project. You can store files in a file. I have an exe stored and I need some way to load it through memory. (for protection) I have saved the bytes to a file, but then someone might be able to just grab the bytes and uncompile or whatever they do. I was thinking load it in memory or something...

    please help,
    thanks,
    alacritous

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    alacritous

    Create a RAM disk.

  3. #3

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464
    and what would a "RAM Disk" be? and how to make one?
    Last edited by alacritous; Nov 20th, 2003 at 07:40 PM.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    alacritous

    A RAM disk is just like it sounds. A disk of RAM, A disk simulated in memory only.

    You would extract the files to yur RAM disk and load them from there.

    Search the Forum and http://www.planet-source-code.com for more info.

  5. #5
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    alacritous, I have no idea what you're asking for. Do you want the file to basically not exist on a hard drive, but only in RAM? If so, when the computer loses power, the file would be INSTANTLY gone. It isn't a very good idea at all, and there are programs that would allow people to sift through the information in RAM.
    Originally posted by randem
    alacritous

    A RAM disk is just like it sounds. A disk of RAM, A disk simulated in memory only.

    You would extract the files to yur RAM disk and load them from there.

    Search the Forum and http://www.planet-source-code.com for more info.
    A RAM disk is EXACTLY like a hard disk but uses your ram.

    He would have the EXACT same problem.

  6. #6

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464
    ...........

    There is a program. There is also a module. In the module there is an exe file that shows only bytes (encrypted). When the program runs I call this sub that decrypts the bytes and shows the actual bytes. I've gone a further step and actually wrote those bytes to a file. It ran. Job done, security is good. Well if I write it to a file (obviously I'd delete on close) you could get the bytes and hack it or whatever they do. Decompile, or whatever.

    Well see I want to, instead of writing the bytets to a file, I want to load the file in RAM so you can't really access the bytes, but you can use the program and do whatever. When it closes, it deletes all (or removes) evidence or bytes or whatever.

    I don't know exactly how to word it because I don't know much about RAM at all. And after all this, I wouldn't care if the computer loses power. Thats basically shutting down the program...

    I hope you understand my problem/concern.

    Thank you,
    alacritous

  7. #7

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464
    bump

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    A RAM disk is EXACTLY like a hard disk but uses your ram.

    He would have the EXACT same problem.

    I assume you never created one? You can make one available only to yourself.

  9. #9

    Thread Starter
    Hyperactive Member alacritous's Avatar
    Join Date
    Aug 2003
    Posts
    464
    like I said a long time ago,

    how do I create one...

    alacritous

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    alacritous

    Can't be done in VB, but that maybe your only option if you want to continue on this path. You need Assembler or C to create a device driver. Than's as close as you are going to get in VB to what you want.

  11. #11
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    there are ways to have a program that is already loaded, then place it into the memory of another program. then you can delete the exe on the disk.

    so basically:
    1. write the exe on the disk
    2. open it
    3. do a bunch of complicated memory api's
    4. delete the exe.

    search on www.pscode.com for an example.

    here i found it for you: http://www.planetsourcecode.com/vb/s...45195&lngWId=1
    Last edited by BuggyProgrammer; Dec 7th, 2003 at 12:41 AM.

  12. #12
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by alacritous
    There is a program. There is also a module. In the module there is an exe file that shows only bytes (encrypted). When the program runs I call this sub that decrypts the bytes and shows the actual bytes. I've gone a further step and actually wrote those bytes to a file. It ran. Job done, security is good. Well if I write it to a file (obviously I'd delete on close) you could get the bytes and hack it or whatever they do. Decompile, or whatever.

    Well see I want to, instead of writing the bytets to a file, I want to load the file in RAM so you can't really access the bytes, but you can use the program and do whatever. When it closes, it deletes all (or removes) evidence or bytes or whatever.
    Like mentioned already, the easyest and probably one of your only options is to write your own driver for a ram drive and only allow access with your program, and that won't be done with VB.

    Your best bet is just to do as you have been doing it. If security is a huge concern, you might want to change your method on how your program works. Maybe give us some details so we can recommend something?

    Like..
    -What does the program do that is decrpyted, used and then removed?
    -What encryption are you using? What bit keys?
    -Is this all done in VB.NET?
    Originally posted by randem
    I assume you never created one?
    I have and used them, it's neat but I don't have the extra ram to always have it
    Originally posted by randem
    You can make one available only to yourself.
    uhh???


    Originally posted by randem
    alacritous

    Can't be done in VB, but that maybe your only option if you want to continue on this path. You need Assembler or C to create a device driver. Than's as close as you are going to get in VB to what you want.
    You could use C++ too, as well as several other languages for a driver.

  13. #13
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    kasracer, no single VB programmer on this form is going to be able to answer your question. Trust me. I know for a FACT because i asked the same damn question myself. To be honest, this needs to be done at a lower level then VB can handle. A Loading function to load the the exe file into memory needs to be written in Assembly language and ported to a c++ dll so it can be called from VB

  14. #14
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    I heard of process memory space injection...
    juz need to tinker with memory API and thread and process API...
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  15. #15
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    Like i said. There isn't a windows API available to do this. You have to do it from ASM. If there is an API call then it must be undocumented.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width