Hiding secrets: steganography in digital art and NFTs
The art world has always been full of secrets

If you want to keep a secret, you must also hide it from yourself.
- George Orwell, 1984
The art world has always been full of secrets, whether it was trying to convey powerful meanings or sometimes hiding secrets, messages, treasures, tributes or real-life techniques... Artists love to leave their mark on their art to make it memorable. Take software cracking groups, for example: they create NFO ASCII art files to earn more respect in the scene.
But what happens when the whole world, including the art world, enters the technological revolution?
Blockchain technology, mixed reality, quantum computing, NFTs and AI are creating a whole new generation in which the meaning of art has changed. Modern technologies have merged virtual reality with actual reality.
If the world changes, we need to find (cool) ways to adapt to it. Sure enough, the world of non-fungible tokens has taken the stage, turning digital formats such as JPG, PNG, GIF, GLB, GLTF, MP3 and MP4 into something irreplaceable, unique.
An introduction to steganography
steg · a · nog · ra · phy | \ ˌSte-gə-ˈnä-grə-fē \
Definition of steganography:
1 archaic: CRYPTOGRAPHY
2: the art or practice of concealing a message, image, or file within another message, image, or file.
Steganography is a technique for hiding files inside other files, such as an image, text, video or anything else. For example, you could send a friend a picture of a cute cat that contains a secret text file about a corruption scheme in your government.
Images can carry a lot of data that usually isn't visible to the human eye. Many Facebook users discovered the hidden image tags attached to users' pictures. However, that's nothing compared with the sophisticated methods threat actors use to create images that can deliver malicious code in the wild. Some of them are Microcin (AKA six little monkey), NetTraveler, Zberp, Enfal (its new loader called Zero. T), Shamoon, KinS, ZeusVM, Triton (Fibbit) and others.
Digital images are just streams of bytes like any other file, which makes them a particularly effective medium for hiding secret text and other data.
How steganography hides information
To understand how image steganography works, let's look at a few basic ways you can hide text in an image file.
One simple method is to append a string to the end of the file. Doing this doesn't stop the image from displaying normally, nor does it change how it looks. Here, we simply add "hello world" to the end of the file. The output from hexdump shows us the extra bytes that were added.
A plain text string can easily be dumped or read by a program. In this case, we'll simply use the xxdutility to reverse the hex and print it as plain text.
echo 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a | xxd -r -pThe same idea can be used to attach an entire file to an image using the RAR archive format. An image viewer only reads the code related to displaying the image and ignores any other files contained in it. A malicious actor or program, however, can easily extract the attached file.
In this example, the file new.jpg displays an image when opened in an image viewer app, but when inspected with the WinRAR archive utility, we can see that the unpacked file.jpg contains a secret 28-byte text file, msg.txt
Sometimes the file can become much larger than the actual image size, which makes it recognizable to antivirus software as a malicious file. But there's always a way around that.
A better approach is to get into the code at the binary level and manipulate the least significant bits (LSB) of individual pixels. Pixels in a color image can be represented by 3 bytes, one each for RGB (red, green, blue). Suppose we have three bytes representing a particular color, in this case orange:
The least significant bits (the last four if we're reading left to right) don't have much of an impact on the color's visual appearance.
1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1
00000000We can change them to anything we like, and the pixel will still look almost the same. So let's take a completely different color, turquoise, say:
100 1 100 1
1 100 1 100
1 100 1 100And replace the last 4 bits in the code for orange with the first four bits of the code for turquoise to create this composite RGB:
orange turquoise
1 1 1 1 100 1
0 1 1 1 1 100
0000 1 100There's no visible effect on the appearance of the resulting color.
But if we use a program to read and extract those last 4 bits separately, we have effectively hidden the code for turquoise inside the code for orange. Two pixels for the price of one, since there's no increase in file size. We can transmit our hidden message without increasing the bandwidth of the original message and without manipulating the file format, so there's nothing for simple detection methods based on file scanning to find.
LSB manipulation is just one of many steganographic techniques. There are actually a number of other methods by which images and other kinds of files can be manipulated to hide secret code, such as palette-based techniques, secure cover selection, audio steganography and many others.
There's plenty of software out there that automates these steganography methods, so we can encode our information faster.
Steghide is a great option, and here's a good list of more.
Conclusion
As the art world changes, techniques change with it. Hiding information or secrets inside a work is actually an art in its own right. When it comes to security, there's no perfect system. Every technology around us can be harnessed to bring new meanings, reflections and expressions.
Now it's up to us, the artists. What wonders and secrets will be written with steganography in the new world being built around us?













