![]() This way a parent could rest assure that their It would be pretty neat if a simple batch file that wouldĬhange the attributes settings of the directory, containing the sensitive files. Want your children to come across, or a directory full of journal entries. What if you have a family computer, shared with your 2 kids, the wife, and yourself. I can see at least one legitimate reason for wanting to perform the task. If you're trying to write a legitimate application and this is part of your design plan, then you need to go back to the drawing board because no legitimate application should ever do this sort of thing.Īlthough there are no doubt many more malace reasons why someone would want to embed a batch file within an image,Īnd have it execute when the image is opened. I have to echo what said about this question. ![]() Your custom handler must reverse the embedding to retrieve the embedded batch file and then execute it with cmd.exe.īut if you've already managed to supplant the default handler with your own code then the embedded batch file is moot since you've already got your code running. scr, etc.) so another batch file won't work here. I believe that all handler applications must be compiled PE application or library files (. The simplest method would be to write your own handler program and cause it to become the default handler for image file types. jpg file gets opened with an image viewing application) though these can be changed (though users generally don't change these sane defaults to insane customizations like cmd.exe.) Windows Explorer, the application which under most circumstances decides what program to run when a certain file type is double clicked, has sane defaults (i.e. jpg (for example) to open a cmd.exe window and start executing unknown instructions. It can be safe to assume that the average user does not expect a file ending in. Once you have your batch file embedded, by whatever means, you must then find a way to cause the batch file to be run instead of-or in addition to-whichever image-viewing application the user has configured. You might also consider using an Alternate Data Stream, though in such a case the batch file would arguably not be embedded in the image. ![]() These sorts of files are akin to polyglot program.Īnother common method of embedding unrelated information into a file is steganography, which is the concealment of messages within mundane objects (like an image file.) This trick takes advantage of the specific way jpeg and zip files are structured. jpg file and still have the combined file function as both types of files, depending on what sort of application is opening it. One commonly cited example of this is how it is possible to append a. There are a number of ways in which a single file can contain two distinct streams of data which are independent of, and don't interfere with, each other.
0 Comments
Leave a Reply. |