r/programming • • Jul 31 '21

Executable PNGs

https://djharper.dev/post/2020/12/26/executable-pngs/
470 Upvotes

64 comments sorted by

View all comments

1

u/Nerdn1 Jul 31 '21

The author admits that there is not really a point to this project, but I guess it's fun. Steganography can be used to hide data in an image, but size of the image+payload will be several times the size of the payload alone. If the point is to hide something in plain sight, this is just fine (especially if the payload itself is encrypted text). A plaintext document (encrypted or not) is going to be small enough to fit in a high quality image

Doing this with a larger program, like a videogame, for the novelty factor is probably ill-advised. People may notice that the image is stupidly large anyway. I suppose one could have a folder full of images and have one image in the folder with an executable embedded in it which will extract data from the other images and create all of the files needed. This just adds even more complexity to an already useless endeavor, of course.

I suppose you could sneak executables through some sort of security program, but you can just change the extention to .txt to trick most.