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...

Комментарии • 100

  • @drumetul_dacic
    @drumetul_dacic Год назад +21

    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.

  • @414every1
    @414every1 2 года назад +145

    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.

    • @ryanmorris6388
      @ryanmorris6388 2 года назад +11

      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.

    • @autonaut279
      @autonaut279 2 года назад +3

      content such as.....???

    • @aurorazuoris6654
      @aurorazuoris6654 2 года назад +41

      @@autonaut279 Knowing 4chan I'm guessing pizza with cheese toppings

    • @563spaceman
      @563spaceman 2 года назад +8

      @@autonaut279 gonna go out on a limb here and assume cp

    • @404waffles
      @404waffles 2 года назад +1

      it's also used in /lit/ to share books

  • @parallel4344
    @parallel4344 2 года назад +32

    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

  • @erwinmulder1338
    @erwinmulder1338 2 года назад +8

    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.

  • @lisztk1928
    @lisztk1928 2 года назад +9

    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 >

  • @pup4301
    @pup4301 2 года назад +1

    Pretty cool was researching PMGs and how they work using PNG:The Definitive Guide

  • @rajesh_404
    @rajesh_404 Год назад +1

    I love how you're reading licences. Responsible Internet User

  • @kare9205
    @kare9205 2 года назад +14

    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

    • @angelcaru
      @angelcaru 7 месяцев назад +1

      its actually quite nice
      (also not an error)

  • @smooll_d
    @smooll_d 2 года назад +14

    4:39 That anyway and the face he made was the best thing I laughed at today.

  • @frydegz
    @frydegz 2 года назад +16

    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.

  • @wormheamer
    @wormheamer 4 месяца назад

    watching zozin confidently write assert(*argv == NULL) at head of main and continue on like nothing happened

  • @theairaccumulator7144
    @theairaccumulator7144 2 года назад +2

    I would've had the reverse bytes as a bool argument to read/write, just so it looks cleaner.

  • @lunalildragon241
    @lunalildragon241 2 года назад +10

    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.

    • @stewartzayat7526
      @stewartzayat7526 2 года назад

      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)

    • @Kitulous
      @Kitulous 2 года назад

      @@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

  • @harshitjoshi3082
    @harshitjoshi3082 2 года назад +8

    How do you move through code so fast, it's really enjoyable to watch you code 👍👍

  • @kaksisve4012
    @kaksisve4012 2 года назад +5

    [1:48:28] The best moment of the stream.

  • @luandkg
    @luandkg 2 года назад

    Epic Tsoding 👏🏻👏🏻👏🏻,continue this video with MNG format !

  • @hanqnero
    @hanqnero 2 года назад +9

    Please fix the last link in the description

    • @TsodingDaily
      @TsodingDaily  2 года назад +16

      Looks like RUclips can't handle parenthesis in the URL. Thanks for letting me know! I url encoded them. Looks like it worked.

  • @alexmiller3260
    @alexmiller3260 2 года назад +3

    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

  • @ishantram6956
    @ishantram6956 2 года назад +10

    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).

    • @venkateshhariharan4341
      @venkateshhariharan4341 2 года назад

      hope you finish it

    • @DFPercush
      @DFPercush 2 года назад +2

      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.

  • @Rndmpacman
    @Rndmpacman 2 года назад

    *Renames file extension from .png to .txt* Slowly puts on blue light glasses

  • @picocode
    @picocode 2 года назад +8

    i can hide my homework now

    • @irishbruse
      @irishbruse 2 года назад +6

      8.3GB png file would be interesting

  • @based3765
    @based3765 2 года назад

    great to see a video from a fellow comrade

  • @tianqing9363
    @tianqing9363 2 года назад +1

    i'd like to watch something about video parser,do you have plan to record some video?

  • @roswithadusa8673
    @roswithadusa8673 5 месяцев назад

    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?

  • @TotoMacFrame
    @TotoMacFrame 2 года назад +3

    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?

    • @ayoodawg1104
      @ayoodawg1104 2 года назад +2

      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.

  • @nordgaren2358
    @nordgaren2358 8 месяцев назад

    copy paste code into program
    doesn't read code
    just starts calling function at start of program

  • @luismex5575
    @luismex5575 2 года назад +1

    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

    • @Randorandom232
      @Randorandom232 2 года назад

      Use vim

    • @skolli123
      @skolli123 Год назад

      C-h t (Control-h t) will open builtin tutorial inside emacs buffer itself. One of the best out there..

  • @pogchamper228
    @pogchamper228 2 года назад

    We are ready for my summer car. Okayeg.

  • @sad0n3
    @sad0n3 2 года назад

    why was chunk size bytes were in reverse order?

  • @CutieFakeKirby
    @CutieFakeKirby 2 года назад +1

    Basically htf file but its a png

  • @gilbertohernandez9223
    @gilbertohernandez9223 2 года назад +2

    Haha new year joke was ironically funny

  • @ALG397
    @ALG397 2 года назад +4

    thank you
    can we hide executable file

    • @kelvium8669
      @kelvium8669 2 года назад +2

      Why not?

    • @ALG397
      @ALG397 2 года назад

      @@kelvium8669 I think it is possible because when we open the PNG the executable file never run

    • @omarpikm2101
      @omarpikm2101 2 года назад +3

      we are going to hide a rom of sonic 1 inside a png of sonic

    • @superscatboy
      @superscatboy 2 года назад

      Bytes are bytes. What you plan to use them for doesn't matter.

  • @zvxcvxcz
    @zvxcvxcz Год назад

    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.

  • @maxwellmbugua6146
    @maxwellmbugua6146 2 года назад +1

    "Welcome to our EPIC png club" LOL

  • @cannabclaus8036
    @cannabclaus8036 2 года назад

    Drinks water and "ÄAAAHHHS" like a baby 21:20 xD

  • @mohammadmahdifarnia5358
    @mohammadmahdifarnia5358 2 года назад

    I did not watch your video unless I learnt new things

  • @grmancool
    @grmancool 2 года назад +1

    23:45 did Tsoding really gain 1000 BTC? Literally 44 million dollars?

    • @stewartzayat7526
      @stewartzayat7526 2 года назад

      Yes, happens almost every day

    • @563spaceman
      @563spaceman 2 года назад +1

      Lmao I think someone donated bits, which he jokingly called bitcoins

    • @33v4.
      @33v4. 2 года назад

      there's no way
      I would never code again tbh

    • @mohamedmohamedy3085
      @mohamedmohamedy3085 2 года назад

      lol, that's my thought too

  • @wrnlb666
    @wrnlb666 2 года назад

    can we just use htonl to convert little endian to big endian for us?

  • @geraforever796
    @geraforever796 2 года назад

    Is this how pico 8 works?

  • @Neuer_Alias_erstellen
    @Neuer_Alias_erstellen 2 года назад +2

    let me c 😆 8:04 - 23:50 twitch bits are verry different to bitcoins, imagine having 1000BTC 😄

  • @rodelias9378
    @rodelias9378 2 года назад

    “Isso isso isso”

  • @based3765
    @based3765 2 года назад

    can i get your term and vim confgs?

  • @dwightk.schrute8696
    @dwightk.schrute8696 2 года назад +2

    if you like this kinda stuff look up Ange Albertiny and his work on PoC||GTFO

  • @gscacco
    @gscacco 2 года назад

    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

  • @alexandrohdez3982
    @alexandrohdez3982 2 года назад

    It was really interesting and funny 👏👏👏

  • @OwlBeats58
    @OwlBeats58 2 года назад

    What font do you use?

  • @darkmob1159
    @darkmob1159 2 года назад

    Cool

  • @Rmly
    @Rmly 2 года назад +1

    pog

  • @trungthanhbp
    @trungthanhbp 2 года назад

    hello, can you make video about screenshot :D

  • @superscatboy
    @superscatboy 2 года назад +1

    Real men use PPM.

  • @TheNadvista
    @TheNadvista 2 года назад

    Ахах стекловата?

  • @biigsmokee
    @biigsmokee 2 года назад

    It may be worthwhile to add "Steganography" in the title.

    • @563spaceman
      @563spaceman 2 года назад

      It's not quite steganography though

  • @MyShakeweight
    @MyShakeweight 2 года назад

    someone donated 1000 bitcoins??? lol no way

  • @Ryan-xq3kl
    @Ryan-xq3kl 2 года назад

    Y tho

    • @luigiq6429
      @luigiq6429 2 года назад

      Watch the first few minutes and find out

    • @UnluckyJo79
      @UnluckyJo79 2 года назад +4

      Why not

  • @shogo-100
    @shogo-100 2 года назад

    4:38

  • @djarum9215
    @djarum9215 2 года назад

    Kagak ngerti gue

  • @GamingStudiosX
    @GamingStudiosX 2 года назад

    hi

  • @rudiger86
    @rudiger86 2 года назад

    How can I get involved?

  • @rudiger86
    @rudiger86 2 года назад

    This Bloke got 1k bitcoins @23:44