DEV Community

Cover image for How to hide files or data in a JPEG Image

How to hide files or data in a JPEG Image

Abdulmumin yaqeen on February 29, 2024

Trojan horses have been one of the most effective ways to get payloads on a target’s device, If you don’t know what a Trojan horse is — The Idea be...
Collapse
 
phlash profile image
Phil Ashby

If you enjoyed getting that to work, you might be interested in the work of renowned polyglot(0) expert and file format blender, Ange Albertini(1), aka Corkami. You may also be amused by the publication he contributes to that is often shipped as a polyglot file (it's a PDF, it can be executed as a program if renamed, it's an image if renamed..), however it's rather rude(2)!

0/ a polyglot is a single file that can be read as multiple different formats..
1/ github.com/angea
2/ github.com/angea/pocorgtfo

Enjoy!

Collapse
 
pstorch profile image
Peter Storch

My favorite trick is to binary-append a .zip file at the end of a .jpg
Depending of the file extension the right application is used to open it. Send it as .jpg and everyone just sees the image. Rename it to .zip, you can open it with an archive manager and access the files included in it.

Collapse
 
abdulmuminyqn profile image
Abdulmumin yaqeen

That super dope man 🤭, I never thought of such, would surely try 🫶🏾.

Collapse
 
mardeg profile image
Mardeg

The closest I've seen to this is an SVG with pixelart of a book cover but the audio wasn't exactly hidden when just clicking fetches it.

Collapse
 
michaeltharrington profile image
Michael Tharrington

Good stuff Abdulmumin! This is interesting. And appreciate the disclaimer btw. 🙂

Collapse
 
abdulmuminyqn profile image
Abdulmumin yaqeen

haha 😅, Thanks!

Collapse
 
joao9aulo profile image
João Paulo Martins Silva

Very cool, looks like a simple way to do steganography.

Collapse
 
abdulmuminyqn profile image
Abdulmumin yaqeen

yeah, thats it!