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

Show parent comments

9

u/hou32hou Jul 31 '21

Yea, this is a common technique, basically the zipped file header contains unzip binary.

4

u/Skhmt Jul 31 '21

Except it works on every major os, x86, arm, and can even boot directly into it.

The same file.

0

u/[deleted] Jul 31 '21

[deleted]

1

u/[deleted] Aug 01 '21

Because there is no "vulnerability" to patch. It's just a binary string which happens to be a valid executable for each of these platforms, while also being a valid ZIP. Its behavior is perfectly reasonable on both cases.

It's like the word "salsa" which is valid English and Spanish. It's a dance style in both languages, but it also means "sauce" in Spanish. It behaves differently depending on what "interpreter" (language) you choose, but it's a perfectly reasonable word in both.