Hiding Information Inside of PNG
HTML-код
- Опубликовано: 18 ноя 2024
- References:
PNG specification: www.libpng.org/...
Test image was taken from here: en.wikipedia.o...
Source Code: gitlab.com/tso...
Type punning: en.wikipedia.o...
Polyglot Program: en.wikipedia.o...
One cool idea of storing data inside PNG images (or any other lossless image format), would be to change the last bit of every RGB value to one bit from our data that we want to embed. The resulting image would be visually identical to the human eye, yet we can extract the hidden data by reading back the last bit of each RGB value.
Fun internet fact: this technique was very notoriously used on 4chan around 2010 or so, where people would start threads with the title 'post sinks'; users would post images of kitchen and bathroom sinks in which less-than-legal content was embedded. Moderators would not delete the threads since they thought it was just /b/ being /b/, which was definitely not the case. This was only caught on much later because of the increase in file size.
This exactly is /b/ being /b/. I was there for a later version of this where they started using their own image encoding solutions to embed links making it harder to detect. /b/ will fight to the end of the earth to defend their 'naturist' content.
content such as.....???
@@autonaut279 Knowing 4chan I'm guessing pizza with cheese toppings
@@autonaut279 gonna go out on a limb here and assume cp
it's also used in /lit/ to share books
this is pretty fun to watch having already written a png decoder haha, a funny thing i noticed when doing alt research (outside of spec) on the format is that there's even referenced ph.d papers which erronously represent the png format
The 'pico 8' fantasy console uses this to save the game you made. The picture is the 'cartridge art' (usually some screenshot), the data inside is the code and resources for the game.
Oh man, I can't express how grateful I am to have found your channel. I've watched the entire video while following along (I occasionally put the video on pause, can't catch your speed yet >
Pretty cool was researching PMGs and how they work using PNG:The Definitive Guide
I love how you're reading licences. Responsible Internet User
zozin: I don't think writing rude error messages, in software, in 2022 is a good idea (21:34)
also zozin: 1:48:30
lmaoo
its actually quite nice
(also not an error)
4:39 That anyway and the face he made was the best thing I laughed at today.
Seconded lmao, the delivery was *gold*
👍👍👍👍👍
One small thing: The injected chunk has the wrong CRC value, since the CRC is supposed to be of both the chunk type and the chunk data. It also has to be in big endian. I don't know if emacs was hiding the error message but at least on my computer I get a libpng CRC error without these changes. The image displays fine, though.
watching zozin confidently write assert(*argv == NULL) at head of main and continue on like nothing happened
I would've had the reverse bytes as a bool argument to read/write, just so it looks cleaner.
would it be possible to hide data in the last bit of every color byte, making the png the same size as it was before?
it would have the downside that you would only be able to save an eighth of hidden data.
Why wouldn't it. You can actually use the 2 least significant bits of every color value in a 24 bit RGB image without a human eye noticing a difference, given the original image has enough detail (and isn't for example all white)
@@stewartzayat7526 it would basically look like noise so for photos it would not make any difference at all. you wouldn't want to hide data in screenshots this way tho
How do you move through code so fast, it's really enjoyable to watch you code 👍👍
[1:48:28] The best moment of the stream.
Epic Tsoding 👏🏻👏🏻👏🏻,continue this video with MNG format !
Please fix the last link in the description
Looks like RUclips can't handle parenthesis in the URL. Thanks for letting me know! I url encoded them. Looks like it worked.
Hey, can you make a video on Rust raw pointers and unsafe to nearly low-level programs? Documentation says, that in unsafe Rust everything works same as it is in C or C++, but I got an issue with initializing pointers and wierd memory moves, that sometimes appear and sometimes not, when working with struct fields. So, difference is huge on practice, but no informative materials available :c
I would love to see if you write a JPEG parser, when I tried to write a JPEG parser in C I got burnt out and procrastinated a lot (a lot of bad memory with it).
hope you finish it
Your frustration is understandable, JPEG is a monster of a format. Best advice if you want to continue: go slow and do something else in between. I've thought about writing one for the purpose of forensic analysis. There was an extremely high profile case recently - you probably know it - where the prosecutor's whole argument hinged on one or two pixels of a grainy video... although that's mpeg and h.264 I guess. But it would be great to have a tool that can pick apart the quantization table and show what other pixel values could have resulted in the binary data of the video / image. I've been curious about that ever since.
*Renames file extension from .png to .txt* Slowly puts on blue light glasses
i can hide my homework now
8.3GB png file would be interesting
great to see a video from a fellow comrade
i'd like to watch something about video parser,do you have plan to record some video?
Hello when i open a png file in hexeditor and take a look at byte 15 (letter R from chunktype) HEXVALUE 52 the 5.bit is 1,why is the letter R show as upperclass and Not lowercase,when Definition is 0=upperclass and 1=lowercase?
Hi Alexey, thanks for the interesting insights into the PNG file format! Nice work done.
Just for my curiosity, any particular reason why you prefer ++i over i++ in the for loop?
I think it’s because when using i++ the expression has to be evaluated first and only then the i variable gets increased. This means to store the i in a temp variable, increase i and use the temp variable in the expression evaluation.
For this reason, it could be a bit slower than ++i.
copy paste code into program
doesn't read code
just starts calling function at start of program
This was a great video would you make a video showing how to use emacs like you do or basic tutorial or documentation how to be good as you
Use vim
C-h t (Control-h t) will open builtin tutorial inside emacs buffer itself. One of the best out there..
We are ready for my summer car. Okayeg.
why was chunk size bytes were in reverse order?
Basically htf file but its a png
Haha new year joke was ironically funny
thank you
can we hide executable file
Why not?
@@kelvium8669 I think it is possible because when we open the PNG the executable file never run
we are going to hide a rom of sonic 1 inside a png of sonic
Bytes are bytes. What you plan to use them for doesn't matter.
So... someone was bored today. Using a PNG loading/writing library like lodePNG would let you skip most of the PNG guts and just deal with the information manipulation. I skipped around the video... so were you trying to inject information into the metadata? I had initially assumed steganography from the title, which would be quite a bit more format-agnostic than a metadata approach.
"Welcome to our EPIC png club" LOL
Drinks water and "ÄAAAHHHS" like a baby 21:20 xD
I did not watch your video unless I learnt new things
23:45 did Tsoding really gain 1000 BTC? Literally 44 million dollars?
Yes, happens almost every day
Lmao I think someone donated bits, which he jokingly called bitcoins
there's no way
I would never code again tbh
lol, that's my thought too
can we just use htonl to convert little endian to big endian for us?
Is this how pico 8 works?
let me c 😆 8:04 - 23:50 twitch bits are verry different to bitcoins, imagine having 1000BTC 😄
“Isso isso isso”
can i get your term and vim confgs?
He is using emacs
if you like this kinda stuff look up Ange Albertiny and his work on PoC||GTFO
There are already some functions in C to convert from and to network byte order. Look at arpa/inet.h. The functions are: htonl, htons, ntohl, ntohs
It was really interesting and funny 👏👏👏
What font do you use?
Cool
pog
pog
@@movization pog
hello, can you make video about screenshot :D
Real men use PPM.
based
Ахах стекловата?
It may be worthwhile to add "Steganography" in the title.
It's not quite steganography though
someone donated 1000 bitcoins??? lol no way
Y tho
Watch the first few minutes and find out
Why not
4:38
Kagak ngerti gue
hi
How can I get involved?
This Bloke got 1k bitcoins @23:44