Well, I'm not an expert but first of all there is programs allowing You to make an self-extracting exe, like Windows Commander. But if what You're looking for is an exe that extracts some files, saves them AND continues to run I would choose to make the extracting program and then add the files to extract as datas to the program.
I'm not sure...but I think it would go something like this.
Write the extracting file first. All it does is open itself up and go to byte location 300. (assuming that the executable is 299 bytes). Then it reads 100 kbytes, writes it to the correct file, reads the next 100 kbytes, writes those to another file, etc. Close the file.
Now don't run this program yet or it will do nothing since you haven't attached the files to the end of the executable.
Write another program that takes the self-extracting one and appends the other files to the end of it.
Now run this new self-extracting file, and it should work. It wouldn't be that much more difficult to add zipping routines to it then either.
This seems like a logical approach to me since files are just executed from the first opcode in them til they return...which would realistically be in the middle of the executable in this case. I've never tried it though, so let me know if it works.
James P. Cottingham
When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity. [tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
should be no problem to embed one or more files in another file.
if an embedded file is 20000 char long just store the char's as a char string or array. then when you extract it , it will just be as simple as writing the string or array to file. the compression will be the dificult part though. useful in delivering selfextracting installations of software, ie, trojans "excuseme" i mean legit software.
oh and dont forget the timed release of the trojan, I mean sofware. ;-)
my 'as usual' oversimplification of the task at hand.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.