Hacker News new | ask | show | jobs
by the_jesus_villa 1336 days ago
Kind of a fun barely-related historical script kiddie note, but due to the way the jpeg and zip file formats work, you can store both in the same file, then just change the file extension from one to the other and it will work correctly.

The "Dangerous Kitten" pack of hacking tools was famously shared this way on early image boards: https://web.archive.org/web/20110902044711/http://partyvan.i...

Nowadays must image parsing is done via libraries that will strip out extraneous info to prevent this, but back in the day when most people would roll their own code for this (or copy paste poorly thought out implementations) this was commonly, if unintentionally, supported.

1 comments

Nothing has fundamentally changed, you can still upload images containing file archives to most social media services, if you pay attention to the relevant file format specs.
Don't most social sites reencode/compress everything? I would expect this to get inadvertently broken as everyone tries to save space/bandwidth.
It depends on the site, but Twitter for example will leave a file untouched if its heuristics decide the file is already well compressed. Good compression is expensive, and in many cases more so than the bandwidth you'd save.
Can confirm. I've been stuffing configuration files inside images and storing them on Twitter for a couple years now; they remain untouched, and any newly-booted VM on my home network can pull the files down via API, strip the payload out of the image, put it into place as a config file, and cycle the service, no problems. Works great. All of this was born out of an idea to get something 'useful' out of twitter, rather than "perpetual doom scrolling to find something to be upset about". Now I never touch their GUI, and they are essentially an offsite Puppet repository for me at this point.

I can also confirm that Facebook strips everything out of images, rendering them useless for this purpose. Instagram does the same (not surprisingly).

I know it's cliche to say here on HN - but this kind of comment is why I love this site. Silly, unexpected ways to use technology are so satisfying to me.