La The idea of ​​hiding messages in images and other files It sounds like something out of a spy movie, but it's very real and far more common than you might think. From viral puzzles like Cicada 3301 to large-scale cybercrime operations, steganography has become a key technique for both protecting information and carrying out discreet attacks online.
In the following lines you will see in a very complete way what steganography is, how messages are hidden in images, audio, video or text, what difference it has with respect to cryptography, how cybersecurity attackers take advantage of it, what practical tools you can use (such as Steghide or Stegosuite) and what techniques exist to detect it and mitigate its malicious use.
What is steganography and where does it come from?
Steganography is the The art and science of hiding information within another medium (a text, an image, a video, an audio recording, a network file, or even a physical object), in such a way that a normal observer wouldn't even suspect that there is a hidden message. This medium is usually called a "carrier" or "cover."
Unlike cryptography, where the message is clearly visible but appears encrypted and unreadable, in steganography The very fact that a message exists is being disguised.The trick is that the file looks completely normal to anyone who doesn't know the trick or the password.
The term comes from Greek: "steganos" (covered or hidden) and "graphein" (writing)It's not exactly new. Variations of this technique were already being used thousands of years ago to outwit spies, censors, or enemy armies.
Among the best-known classical examples is that of ancient Greece, where a message was written on a wooden board and covered with wax. Leaving only an innocent text visible on the surfaceAnother famous case recounted by Herodotus tells how a slave's head was shaved, the message was written on the scalp, they waited for the hair to grow back, and then it was sent to the recipient, who only had to shave it again.
In later centuries, the invisible inks (which were revealed with heat or light), photographic microdots, or concealed writing. A major historical reference is the book "Steganographia" by Johannes Trithemius. In it, he describes numerous techniques for hiding messages that in his time were considered almost black magic.

Steganography versus cryptography: differences and combination
Steganography and cryptography are often confused. In reality, their approaches are different, although They share the same goal: to protect information against third parties.
In cryptography, the message is transformed using encryption algorithms and keys, so that it becomes ciphertext. Everyone can see that there is a message there, but they can't understand it. if you don't have the correct key.
In steganography, on the other hand, the message It does not have to appear encrypted, nor does it necessarily have to change visibly. The goal is to make it so that no one notices anything unusual. A photo, an audio file, or a document appears normal, but contains extra data hidden within it.
In practice, both techniques are often combined. First, the information is encrypted and then hidden within an image, audio file, or video. In this way, Even if someone discovers the hidden message, they will still encounter a layer of encryption. which will need a key to decrypt.
This combination of steganography and cryptography is especially interesting in environments of high sensitivity, espionage, counterintelligence, or government communicationsBut also in everyday scenarios where someone wants to gain a little extra privacy.
How digital steganography works
In the digital world, most modern techniques take advantage of the fact that everything boils down to bits. Images, audio, video, or documents are represented as strings of zeros and onesIn that information network, it is possible to slightly "manipulate" the data to hide messages.
One of the best-known approaches is steganography. "least significant bit" (LSB)Each pixel in an image, for example, is represented by several bytes that define the intensity of the red, green, and blue colors (and sometimes an alpha channel for transparency). The trick is to modify only the last bit of those values.
By altering only that final bit, The color variation is so subtle that the human eye cannot perceive the difference.But at the binary level, information is indeed being encoded. Bit by bit, and pixel by pixel, pieces of a message, a compressed file, or any other content can be added.
The relationship between message size and carrier size is important. For example, to hide one megabyte of data with LSB, a much larger image file would be needed, because Each pixel only contributes a small amount of hidden storage capacityThe same principle can be applied to audio or video files, taking advantage of areas where small variations are lost in the noise or are imperceptible to the ear or eye.
In addition to the LSB method, there are techniques that play with file headers, embedded metadata, rarely used fields of network protocols (such as TCP, UDP or ICMP), or even with word and letter substitutions within long texts, placing the pieces of the secret message at specific intervals.
Main types of digital steganography
If we stay within the digital realm, steganography is usually classified into five main categories: text, image, audio, video and networkEach one has its advantages, limitations, and use cases.
Text steganography
Text steganography involves hiding information within seemingly normal text documentsThe techniques can be relatively simple or quite elaborate. It all depends on the level of sophistication.
Some strategies consist of slightly modify the format (extra spaces, strategic line breaks, almost imperceptible changes in typography), while others play with the position of the words. For example, taking the first or second letter of each word to form the message. There are methods for detect hidden characters that facilitate their analysis.
Historically, long texts have been used in which, by choosing each nth word or letter, a hidden phrase was being reconstructedThe problem is that it often sounds unnatural. If the structure is forced too much, the text can sound strange and raise suspicions.
Today there are also automated approaches that generate seemingly coherent texts but whose real content is a data encoding, something halfway between natural language processing, cryptography and steganography.
Image steganography
Steganography in images is probably the most popular, because of the photos and digital graphics. They offer millions of pixels to play on. and a high degree of tolerance to small changes.
Starting with an original image (in formats such as BMP, JPEG or PNG), the least significant bits of each color channel are altered, or they are used certain redundancies of compression to inject information. The visual result remains virtually identical to the naked eye.
Modern tools, such as Steghide or Stegosuite, automate the entire process. They compress the secret file, encrypting it if necessary.They embed it in the carrier image and add checksums to ensure integrity when extracting it.
Due to the enormous volume of images that are considered safe on the internet (social media photos, banners, logos, memes…), They are a perfect vehicle for both legitimate purposes and malicious activities., since they rarely cause alarm on their own.
Audio steganography
In audio steganography, data is embedded in digital sound files, such as WAV or AU filesThe idea of ​​LSB can also be applied here, but it is usually more complex because the human ear is very sensitive to certain distortions.
The techniques focus on areas where small modifications are lost in the noise or masked by other frequencies, taking advantage of properties of the psychoacoustics and compression codecsAlthough it allows you to hide information, it is a somewhat more delicate method if you want to ensure that the audio sounds identical to the original.
Video steganography
When working with video, image and sound are combined, which opens the door to hide large volumes of data spread across thousands of frames and audio tracks.
There are two main approaches: embedding the data on the uncompressed video and then applying compression, or introduce the information directly into the already compressed stream (for example, by manipulating transform coefficients or codec parameters).
Because it can process so much information per second, video is ideal when you need high-capacity covert channelsHowever, it also requires more care to avoid introducing visible artifacts or reproduction errors.
Network or protocol steganography
Network steganography, also called protocol steganography, consists of camouflaging data within packets that travel over the InternetFor example, they take advantage of fields that are rarely used in TCP, UDP, ICMP or similar headers.
A seemingly normal communication (such as simple web browsing or a ping) may be transporting instructions, keys, or fragments of sensitive information without anyone noticing, as long as the volume is low and the traffic pattern blends in well with the background noise.
Practical tools for hiding messages in images
Beyond theory, there are very accessible tools for anyone who wants to experiment with steganography on their computer. Two of the best-known in ethical hacking and forensics environments are Steghide and Stegosuite. Each with its own approach.
Steghide: Console steganography with built-in encryption
Steghide It is a command-line utility widely used in security-oriented distributions like Kali Linux. It allows Hide files inside images (JPEG, BMP) and audio (WAV, AU) without significantly changing the color frequencies or sound characteristics.
Its main functions include: compression of embedded data, encryption (by default with 128-bit AES) and the insertion of a checksum to verify that the extraction is performed correctly and without errors.
The basic workflow with Steghide is simple. First, it's installed from the distribution's repository, for example, in Kali with a simple apt command. Then, the file to be hidden is prepared, such as a secret.txt with a confidential message that can be compressed to ZIP to save space, and an image is chosen to act as a cover.
The Steghide embed command allows you to specify the secret file, the cover file, and the resulting file name which will contain the embedded data. During the process, the tool optionally requests a passphrase. This passphrase is used to determine the specific pixel positions where the bits of the secret file will be hidden.
The tool has more verbose modes for viewing internal process details, and silent options for Do not display messages on screen, force parameters to overwrite existing files and arguments like -p to pass the passphrase directly on the command line (although the latter is not recommended for security reasons).
To extract, use the `extract` subcommand, specifying the steganographic image and, again, the correct password. Steghide It verifies the integrity of the content using the checksum, and can dump the recovered data into a specific file using the corresponding argument.
In addition, the tool offers additional parameters to control the compression level, prevent the file name from being embedded or the CRC32 checksum from being included. This allows room for specific laboratory and CTF tests or scenarios.
Stegosuite: a graphical interface for hiding text and files
For those who prefer a solution with a graphical environment, Stegosuite It's a very user-friendly option. It can be installed on systems like Ubuntu. directly from the repositories and allows you to work with images in a visual way.
Typical usage involves loading a base image (e.g., hack.jpg) into the program and Write a secret message in the text boxIn addition to entering a password in the designated field, the Embed button generates a new, seemingly identical image file, often with a name similar to the original but with a suffix such as _embed.
If you inspect the properties of both images, you will often see changes in file size, which indicates that information has been added; however, visually the photo looks exactly the same.
The reverse process is just as simple. Load the image containing the message, enter the password, and click "Extract." The program shows hidden text or recovers any inserted files, such as another image, a text document, or any type of file.
One advantage of Stegosuite is that it allows you to mix text and embedded files, which makes it easier scenarios where you want to send both a direct message and attach additional content without raising suspicion. Simply delete the original hidden file from the local disk and recover it later from the steganographic image.
Legitimate uses of steganography
Not everything in steganography is malware and cybercrime. There are perfectly legitimate use cases where this technique contributes privacy, protection of rights, or resistance to censorship.
One of them is to circumvent censorship in countries or environments where Communications are strictly controlledJournalists, activists, or citizens can disseminate sensitive information by disguising it in images, videos, or documents that go unnoticed by automatic filters.
Another widespread use is the digital watermarkBy embedding hidden information in images or multimedia content, authorship can be attributed or unauthorized uses can be tracked. All without displaying visible watermarks that spoil the material's appearance.
Security forces and government agencies also use steganography for exchange confidential data without raising suspicionEspecially when they assume that communications can be intercepted but not analyzed in depth.
In the field of NFTs and digital art, experimentation is beginning with hidden metadata or unlockable content that only the token owner can see: high-resolution files, private messages, access keys to exclusive communities, or even "treasures" hidden in the art itself.
Malicious use: Steganography in real cyberattacks
At the opposite extreme are attackers who use steganography to hide malware, control commands, or stolen data within seemingly harmless files. In cybersecurity, this seriously complicates detection.
One of the most frequent patterns is the Embedding malicious payloads in multimedia filesSince images, videos, or audio files often circulate without many restrictions, they are an ideal vehicle for introducing code that will later be extracted and executed on the victim's computer.
This technique is seen in malicious advertising campaigns. For example: a seemingly legitimate online banner may contain embedded malware. code that, when loaded into the browser, downloads or executes an exploit from a landing page prepared for that purpose.
Ransomware groups have also adopted steganography in both the intrusion and exfiltration phases. During an attack, they can use images or documents. to extract sensitive data disguised in seemingly legitimate communicationsevading monitoring systems designed to detect patterns of information theft.
Attacks against European and Japanese industrial companies have been documented in which Images hosted on trusted services like Imgur contained embedded scriptsThese images were used to infect Office documents (such as Excel spreadsheets) which, in turn, downloaded tools like Mimikatz to steal Windows credentials.
How is steganography detected: steganalysis
The discipline that deals with discovering hidden messages is called steganalysisA subject that combines statistics, file analysis, specialized tools, and often a bit of forensic intuition.
There are utilities such as StegExpose capable of Apply statistical tests to images and other files to determine if its contents have likely been manipulated using steganography. They look, for example, at bit distributions or anomalous patterns that do not match those of a naturally generated file.
Hexadecimal viewers and metadata analyzers are also used to detect strange headings, inconsistent fields, unusual sizes, or sections seemingly filled with noiseComparing a suspicious file with the original version is one of the clearest tactics to see where and how it has been modified.
The biggest problem is volume. With millions of images, videos, and documents uploaded to social media and websites every day, It is virtually impossible to inspect them all thoroughly.Therefore, many efforts are focused on the most critical traffic and equipment, applying prioritization rules and behavioral detection systems.
Protective measures against malicious steganography
Completely protecting against steganography used for malicious purposes is very difficult. However, some measures can be adopted. mitigation measures that reduce the risk and increase the chances of detection.
The first layer is always training. It's key to educate users and employees to Be wary of multimedia files from unknown sourcesAvoid opening suspicious HTML/HTM attachments and recognize phishing emails that include unexpected documents or images, as well as know signs of phishing attacks.
At the corporate level, it is advisable to complement awareness with Web filtering, strict download policies, and continuous security patch updatesThe idea is to close vulnerabilities that could be exploited once the malicious file reaches the system.
Modern endpoint protection solutions are another fundamental pillar. Beyond signature-based antivirus, behavioral engines capable of detect anomalous activities associated with the execution of hidden code, such as processes that are launched after opening an image or document that is theoretically benign.
Threat intelligence also plays a crucial role. Staying up-to-date on Attack trends, new steganographic techniques detected in real campaigns, and the most affected sectors allow for adjusting security rules, patterns, and controls.
Finally, it's important to have a comprehensive antivirus or security solution that updates automatically and can isolate, quarantine, and remove malicious code, even when combined with steganography. While it won't detect everything, it adds another layer of defense.
Ultimately, understanding how steganography works, its legitimate uses and abuses, understanding real-world examples like those from SolarWinds or skimming campaigns, and practicing with tools like Steghide or Stegosuite, allows you to have a much more critical view of the "innocent" files circulating in our systems and improve both offensive capabilities (in controlled and ethical environments) and defensive capabilities against increasingly creative attackers.

