Hide Secret Messages in PNG Files

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 49

  • @prof.tahseen6104
    @prof.tahseen6104 2 ปีที่แล้ว +5

    13:50 You could actually write the length of the hidden message as the hidden message's first two bytes or so. Also after I saw this video, I literally smashed my mouse and opened up my IDE. I mean, this is an interesting topic. Great video, great channel, great biceps ;)

  • @chonkey
    @chonkey 10 หลายเดือนก่อน +1

    i love you. this is exactly what i was looking for. after 3 hours of researching, i found your vid. i just made 30 google accounts and liked and subscribed to your channel.

  • @ДжейнДоу-о4я
    @ДжейнДоу-о4я 2 ปีที่แล้ว +6

    Dude you're amazing.
    I've been trying to figure out how to do this for a while, thank god someone helped explain it clearly.

  • @Sinke_100
    @Sinke_100 2 ปีที่แล้ว +1

    During christmass i was acually doing just that, hiding "Mery Christmass" into picture of a christmass tree, perfect timing neural nine to teach me some better ways to aproach this, ty so much for amazing content 🙂

  • @Sinke_100
    @Sinke_100 2 ปีที่แล้ว +4

    My aproach was:
    with open('image.png', 'rb') as f:
    data = f.read()
    text = data.split(b'\x82')[-1].decode()
    print(text)

    • @YoshiyaMakina
      @YoshiyaMakina 2 ปีที่แล้ว

      This also works in my case too

    • @gedtoon6451
      @gedtoon6451 2 ปีที่แล้ว

      I am intrigued, can you please explain what this does?

    • @Sinke_100
      @Sinke_100 2 ปีที่แล้ว

      @@gedtoon6451 if u hide text in picture with append method last byte is x82 of that png picture (bytes are represented in hex values from 00 till ff) then u split at that value and u get list where your text is now last item in that list, but it is in bytes mode still that is why u also have to decode

    • @gedtoon6451
      @gedtoon6451 2 ปีที่แล้ว

      @@Sinke_100 But is it not possible for x82 to appear somewhere in the image and then you would split too soon?

    • @Sinke_100
      @Sinke_100 2 ปีที่แล้ว

      @@gedtoon6451 not that i know of, but it's more convinient to pick last 4 or 5 common bytes for png, so split is more sure, like for example if u use character € in message then u would encounter problems since € sign has x82 in self, or the other solution is when u type message u put spliter already in like $$$.encode() between image and your message, then u split on that, maybe it's even better aproach, but both works fine

  • @reputationhemp4011
    @reputationhemp4011 2 ปีที่แล้ว +1

    you are doing devil trickery? I literally just thought about doing this bro JUST NOW

  • @AbdoAzmy2005
    @AbdoAzmy2005 2 ปีที่แล้ว +5

    can you please tell us about the quantum computing folder

  • @higiniofuentes2551
    @higiniofuentes2551 2 ปีที่แล้ว

    Thank you for this awesome and very useful video!

  • @asphaltexplorer4390
    @asphaltexplorer4390 2 ปีที่แล้ว

    Amazing , Thankyou for such a great content sir.

  • @tildesarecool7782
    @tildesarecool7782 10 หลายเดือนก่อน

    can't believe i made it through this whole thing. and understood almost parts of it.
    now all i have to do is hide 2600 roms inside of the box art thumbnail for the 2600 roms. that's fine, right? like one of those non-existent 8-bit machines, like pico-8 and friends that store programs in PNG files. surely I'm not the first one to think of applying this to 2600 roms. have to write a script that re-assembles the rom and throws it to stella. no problem, right? more efficient than the method 2600+ uses (grumble)

  • @mgreek31
    @mgreek31 2 ปีที่แล้ว

    Thank for Great knowledge !!!

  • @jesusdacoast872
    @jesusdacoast872 2 ปีที่แล้ว

    Good job dude 😎

  • @Mr.BlueDiamondStump
    @Mr.BlueDiamondStump 9 หลายเดือนก่อน

    i think this is really great, but im having a hard time understanding the process of the python logic your using.
    i wish it was explained what each little bit inside the code is doing.

  • @Synthetic_geth
    @Synthetic_geth 2 ปีที่แล้ว +2

    Brilliant!

  • @uday-xyz1523
    @uday-xyz1523 2 ปีที่แล้ว +2

    So for the second method we are limited to pixels... can we do the same with videos(since the are series of frames?)

    • @prof.tahseen6104
      @prof.tahseen6104 2 ปีที่แล้ว +2

      Yes you can.
      Just add 1 step to the start and to the end.
      extract frames
      ......
      ......
      ......
      re-assemble the video from injected frames

  • @gedtoon6451
    @gedtoon6451 2 ปีที่แล้ว

    Should the last three lines of the lsb encoder be tabbed in, as we do not want to save the encoded file if the the target file was not big enough?

  • @pcgalvintoybonnie2827
    @pcgalvintoybonnie2827 ปีที่แล้ว

    Real cool video! but a question... how can we execute the hidden .exe file in the image by opening it? i've seen some ppl making that i just don't know how, how to it?

  • @Sinke_100
    @Sinke_100 2 ปีที่แล้ว +1

    I didn't try it yet, but i'm not sure if lsb method works outside ascii for example i would definetly need croatian letters 'šđč枊ĐČĆŽ' and each of them has ord bigger then 255, if doesn't work by default how u write it i would definetly need to find some workaround within the program, but first i would have to figure out how it acually works, which is slightly above my current knowledge, but i will give it a shot
    Solution:
    In encoder use byte_message = ''.join(f'{ord(c):09b}' for c in message) instead of 08b, then in extractor you should change secret_bits = [secret_bits[i:i+9] for i in range(0, len(secret_bits), 9)] instead of 8
    First i tryed with replace metdod, but this is better solution i think, even it takes a bit more space in picture

  • @UNAPPEAL
    @UNAPPEAL 2 ปีที่แล้ว +1

    could you hide code like a xml script inside of it aswell?

  • @thomasgoodwin2648
    @thomasgoodwin2648 2 ปีที่แล้ว +1

    Or you could hide an image 1/8th the size of the original.
    I'm kinda surprised this works given that png is a non lossless compressed format.

    • @sukritmanikandan3184
      @sukritmanikandan3184 2 ปีที่แล้ว

      It works because the PIL library neatly handles all of that for you

    • @sukritmanikandan3184
      @sukritmanikandan3184 2 ปีที่แล้ว

      Also I'm fairly certain png is lossless

    • @gedtoon6451
      @gedtoon6451 2 ปีที่แล้ว

      PNG offers various levels of compression, including none, but they are all lossless. You get get back exactly the same image. The steganography would not work with a lossy file format

  • @rmt3589
    @rmt3589 ปีที่แล้ว +1

    Just watched the JPEG one before this. Looks awesome! Great tool for creating an ARG!
    My idea is to hide encryption data inside various png. I want to make a Unity Asset Pack with parts that can't be modified. For ARG-stuff. With a game hidden inside that needs to be played in Unity Editor. Plan is for the file structure to be set up, and so fragile that changing a texture, .txt, or script will break everything, but make it so the dev can use all the textures, models, shades, and scripts with no problem.
    Because a lot of the assets in this will be essentially white noise, hiding a lot of data is perfectly fine. Might even help!

    • @rons96
      @rons96 3 หลายเดือนก่อน +1

      any success using JPEG with this code logic?

    • @rmt3589
      @rmt3589 3 หลายเดือนก่อน +2

      @@rons96 I haven't tried yet. Still don't have a G to have AR with yet.

    • @rons96
      @rons96 3 หลายเดือนก่อน +1

      @@rmt3589 i tried here and understood that JPEG do not store pixels, it's a weird compression that make each file somehow unique. Even if you modify the RGB channel values and save the image, when it loads there're totally new values. It is because JPEG have lossy compression in it's algorithm, so searching a bit i found at least 3 method to do it, but all are very complex. ChatGPT gave the hints but didn't was able to provide a working example. I found a PDF explaining but requires many math skills which i don't have.

  • @unknown-society8037
    @unknown-society8037 ปีที่แล้ว

    Uhm sir, how about executing the exe file while in the png

  • @rons96
    @rons96 3 หลายเดือนก่อน

    why it don't work with jpeg files?

  • @kamilpadula7152
    @kamilpadula7152 2 ปีที่แล้ว +4

    I use this method in 97 xD

  •  2 ปีที่แล้ว

    how could you do this with xml code?

  • @andreaf6143
    @andreaf6143 2 ปีที่แล้ว +1

    great!

  • @ehsankalateh6785
    @ehsankalateh6785 ปีที่แล้ว

    Amazing 🤩

  • @computechtamil7218
    @computechtamil7218 2 ปีที่แล้ว

    How to extract meta data from Image

  • @Technopawan-dx7fn
    @Technopawan-dx7fn 4 หลายเดือนก่อน

    In my view, if you would use this code, it would be faster.............. you don't need to wait for all the array to convert into bytes
    import numpy as np
    import PIL.Image
    img = PIL.Image.open("result.png", "r")
    img_arr = np.array(list(img.getdata()))
    channel = 4 if img.mode == 'RGBA' else 3
    pixels = img_arr.size
    stop_indicator = input("Enter Stop_indicator Code: ")
    stop_indicator_byte = ''.join(f"{(ord(byte)):08b}" for byte in stop_indicator)
    index = 0
    message_bits = ''
    for i in range(pixels-1):
    for j in range(channel):
    message_bits = message_bits + str(bin(img_arr[i][j])[-1])
    index += 1
    first_bit = index - len(stop_indicator_byte)
    if message_bits[first_bit:index] == stop_indicator_byte:
    break

    index = 0
    message_bytes = ''
    for i in range(int(len(message_bits)/8)):
    message_bytes = message_bytes + " "
    for j in range(8):
    message_bytes = message_bytes + message_bits[index]
    index += 1
    message_bytes = message_bytes[1:]
    to_ignore = -len(stop_indicator)
    message = "".join(chr(int(c, 2)) for c in message_bytes.split(" "))
    message = message[:to_ignore]
    print(message)

  • @guilherme5094
    @guilherme5094 2 ปีที่แล้ว +1

    👍!!

  • @philtoa334
    @philtoa334 2 ปีที่แล้ว

    Yes.Good.

  • @yusufutkan
    @yusufutkan 2 ปีที่แล้ว +1

    good tactic

  • @hello-my6ot
    @hello-my6ot 2 ปีที่แล้ว

    Genious

  • @psychoSherlock
    @psychoSherlock 2 ปีที่แล้ว +1

    First 🙂