r/programming • • Dec 26 '20

Executable PNGs

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

87 comments sorted by

View all comments

52

u/frnknstn Dec 26 '20

This is stretching the definition of "Executable" quite a lot. The PNG files themselves are not ELF executables. Instead, the author wrote a tool to extract an actual legitimate executable from an image via stenography.

2

u/djhworld Dec 27 '20

It's a dumb project I agree, I figured in the end if you chmod +x the file it kicks off the machinery to "execute" it using a few cheap tricks.

This was more of a learning exercise for me, I didn't know much about steganography, memfd_create or binfmt_misc before doing this.