Hidden/Open words in an Image file such as PNG or JGP

11,720

You can use following command(Windows command prompt)

  1. Create a text file with your message, say "message.txt"
  2. Now choose target file(it can be any file like a.jpg,a.png,a.exe,..etc), say "image.jpg"
  3. Now execute follwing command

    copy /b "image.jpg"+"message.txt" "NewImage.jpg"

Above command will combine files(in binary mode) and creats a new file(in this case NewImage.jpg). Now if anyone opens image they will just see noraml image. If you want to look at text, you have open it with any text editor(Notepad) and scroll down to last, there you can find text.

Here it wont chage any pixels or any thing to image, it just appends text to image.

Share:
11,720
user2097211
Author by

user2097211

Updated on June 04, 2022

Comments

  • user2097211
    user2097211 almost 2 years

    As far as I can tell my question is not related to topics involved in Stenography or in the win.rar soluations I've seen to this where you are essentially hidding messages.

    I am trying to figure out if there is a way to insert code into a file such as a jpg or png with a simple message, that could later be extracted by a program reading the file without having it encoded into the file either by slight differences in pixels or what have you in stenography.

    I basically just want a tag along message that is a part of the file itself that is not brought up by the image reader but could perhaps be seen by a text reader of some kind.

    I'm not sure how possible this is because I, for the most part don't understand the order/layout of the png/jgp/ect file aside from the RGB pixel code. How does it start, how does the image display tool know to stop displaying ect.

    The way I'm envisioning it would be something like: pngStartCode -> RGBinfo --> png end code so image reader knows to stop -> start sequence that some kind of reader will recognize (possibly a new text reader) -> written text wanted to be communicated -> endcodeforreader

    I may just be rambling about something ridiculous here but please let me know if this is at least possible.

  • user2097211
    user2097211 over 10 years
    More or less just combining the .png/.jpg with the text file. Wow, a lot simpler than I would have suspected. Thanks @Rejeev, I'll give it a try. I suppose the real challenge is reading the text file without the png/jpg data interfering.
  • Jongware
    Jongware over 10 years
    If you stick with PNG then take a look at the PNG specifications. The actual file length is predefined, and easy to get hold off. Anything after that is your data.