Hide Secret Messages in PNG Files

  Рет қаралды 25,053

NeuralNine

NeuralNine

Күн бұрын

Пікірлер
@prof.tahseen6104
@prof.tahseen6104 2 жыл бұрын
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 Жыл бұрын
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я 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
you are doing devil trickery? I literally just thought about doing this bro JUST NOW
@uday-xyz1523
@uday-xyz1523 3 жыл бұрын
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 жыл бұрын
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?
@UNAPPEAL
@UNAPPEAL 2 жыл бұрын
could you hide code like a xml script inside of it aswell?
@ruthvikas
@ruthvikas 2 жыл бұрын
Can be
@tildesarecool7782
@tildesarecool7782 Жыл бұрын
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)
@higiniofuentes2551
@higiniofuentes2551 2 жыл бұрын
Thank you for this awesome and very useful video!
@Sinke_100
@Sinke_100 2 жыл бұрын
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
@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?
@asphaltexplorer4390
@asphaltexplorer4390 2 жыл бұрын
Amazing , Thankyou for such a great content sir.
@thomasgoodwin2648
@thomasgoodwin2648 3 жыл бұрын
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
2 жыл бұрын
how could you do this with xml code?
@unknown-society8037
@unknown-society8037 Жыл бұрын
Uhm sir, how about executing the exe file while in the png
@Diamond_Chocobo
@Diamond_Chocobo Жыл бұрын
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.
@chidubem31
@chidubem31 2 жыл бұрын
Thank for Great knowledge !!!
@jesusdacoast872
@jesusdacoast872 2 жыл бұрын
Good job dude 😎
@rons96
@rons96 6 ай бұрын
why it don't work with jpeg files?
@computechtamil7218
@computechtamil7218 3 жыл бұрын
How to extract meta data from Image
@Synthetic_geth
@Synthetic_geth 3 жыл бұрын
Brilliant!
@kamilpadula7152
@kamilpadula7152 3 жыл бұрын
I use this method in 97 xD
@jesusdacoast872
@jesusdacoast872 2 жыл бұрын
😎
@rmt3589
@rmt3589 Жыл бұрын
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 6 ай бұрын
any success using JPEG with this code logic?
@rmt3589
@rmt3589 6 ай бұрын
@@rons96 I haven't tried yet. Still don't have a G to have AR with yet.
@rons96
@rons96 6 ай бұрын
@@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.
@Technopawan-dx7fn
@Technopawan-dx7fn 6 ай бұрын
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)
@ehsankalateh6785
@ehsankalateh6785 Жыл бұрын
Amazing 🤩
@andreaf6143
@andreaf6143 3 жыл бұрын
great!
@philtoa334
@philtoa334 3 жыл бұрын
Yes.Good.
@guilherme5094
@guilherme5094 3 жыл бұрын
👍!!
@psychoSherlock
@psychoSherlock 3 жыл бұрын
First 🙂
@hello-my6ot
@hello-my6ot 3 жыл бұрын
Genious
@yusufutkan
@yusufutkan 3 жыл бұрын
good tactic
This Insane Virus Trick Would Have Fooled Me - Watch Out!
7:53
Hide Information in JPEG Files
16:19
NeuralNine
Рет қаралды 183 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Python Sockets Simply Explained
39:33
NeuralNine
Рет қаралды 169 М.
67 Bytes - The Smallest Possible PNG (And How It Works)
20:52
Theo - t3․gg
Рет қаралды 56 М.
How PNG Works: Compromising Speed for Quality
32:00
Reducible
Рет қаралды 644 М.
Digital Images - Computerphile
8:16
Computerphile
Рет қаралды 160 М.
It's not hard to make games in C++
6:23
Low Level Game Dev
Рет қаралды 99 М.
Encrypted File Transfer via Sockets in Python
19:54
NeuralNine
Рет қаралды 23 М.
Linear Regression From Scratch in Python (Mathematical)
24:38
NeuralNine
Рет қаралды 190 М.
Coding Encrypted Chat in Python
20:33
NeuralNine
Рет қаралды 51 М.
Secure Login System in Python
14:43
NeuralNine
Рет қаралды 115 М.
Hiding Information Inside of PNG
1:53:49
Tsoding Daily
Рет қаралды 49 М.
КОРОЧЕ ГОВОРЯ, НЕДЕЛЯ БЕЗ ТЕЛЕФОНА
3:54
Satisfying Vend 😦 Ep.5 #shorts #satisfying #vendingmachine
0:23
TYE Arcade
Рет қаралды 17 МЛН
DID YOU NOTICE ANY LAPSES IN THE VIDEO or NOT? / MARGO_FLURY
0:34
MARGO FLURY | Маргарита Дьяченкова
Рет қаралды 12 МЛН
три кошака и ростелеком
0:26
Мистер Денала
Рет қаралды 2,4 МЛН