In this article, we will look into Steganography, which is the “art of hiding” information in plain sight. But, lets understand steganography first.
Table of Contents
What is Stegnography ?
Steganography is a fascinating technique that involves hiding secret messages within other forms of media, such as images, audio files, or videos. Imagine writing a note in invisible ink; only someone who knows how to reveal it can see the message. That’s essentially what steganography does, but in the digital world.
Unlike cryptography, which focuses on encrypting information to keep it secure, steganography conceals the very existence of the message, making it a subtle yet powerful tool for communication.
Steganography is also been highlighted in popular TV show like Mr. Robot. In Mr. Robot, audio steganography was a key technique used by the protagonist, Elliot Alderson, to conceal sensitive information within audio files. This method allows him to hide data in a way that makes it appear as just regular music or sound, thus avoiding detection by authorities or anyone who might be monitoring his communications.
Types of Steganography:
- Text Steganography: This method hides messages within ordinary text. Techniques can range from altering punctuation to using specific formatting patterns to encode hidden information.
- Image Steganography: By manipulating the least significant bits (LSBs) of pixel values in digital images, secret information can be embedded without noticeable changes to the image itself. This technique exploits the human eye’s inability to detect minor alterations.
- Audio Steganography: Similar to image techniques, audio steganography involves embedding data within audio files. This can be done by modifying the LSBs of audio samples or by embedding messages in specific frequency ranges.
- Video Steganography: This advanced form allows entire videos to be concealed within other video files by encoding information across frames, leveraging the continuity between them.
- Network Steganography: This method hides data within network traffic, such as packet headers or transmission patterns, making it particularly useful for covert communications.
Lets Hide Your Secrets!
- Now, Lets put the steganography techniques into practice. We will look into the two major ones – Image and Audio Steganography.
Performing Image Steganography:
- Lets install the tool for the hour – steghide.
sudo apt install steghide
- Now we have a cover image of Mona Lisa over here and a secret file named secret.txt. Now we have to embed the secret.txt file in the Mona Lisa to conceal the concerned information. So, i will use the below command to specify the embed argument along with the -cf flag for our cover file and -ef flag for our embedding file.
steghide embed -cf mona.jpg -ef secret.txt
- It will ask for a password, i will provide it one and post that, it has successfully embedded by dirty secret in mona’s closet.
- For the extraction process, we just need the cover file and the password that was set while embedding the secret. Here we will use the -sf flag to specify the stego file.
steghide extract -sf mona.jpg
Performing Audio Steganography:
- To perform Audio Steganography like Elliot in Mr. Robot, we will use a tool named wavhider. So, lets install it on the machine first.
WavHider: https://github.com/richstokes/wavehider
git clone https://github.com/richstokes/wavehider cd wavhider sudo ./build.sh
- Now that it is installed, lets use it to conceal a secret DOC file inside a songs Mp3 file. I will use the below command for that. The key concept to note here is the gap value, as per the author of the too. The
-gap
parameter defines how much space to leave intouched between bytes injected into the target audio file. A larger gap size is ideal as it will spread the information sparsely and will avoid any changes that can be notified while accessing the cover songs file.
- Now if i execute the below command, it will ask me for a password. Once i will provide it the secret.docx file will be embedded in our songs file. Please note that, while choosing a music or audio file as a cover, take a file that is longer in duration and larger in size as the tool need enough data to inject your secret within it.
wavhide -gap 512 -audioFile song.mp3 -secretFile secret.docx
- For the extraction, we will use a different command that is wavreveal. The main thing to note here is the gap size. Use the same size value for extraction which you have used while the embedding process.
wavreveal -gap 512 -audioFile song-wavhidden.mp3 -outputFile secret.docx
Also Read: Hacking Windows via WhatsApp Messenger RCE
Conclusion:
In conclusion, Steganography is a fascinating and versatile technique for hiding information in plain sight, utilizing various media types such as text, images, audio, and video. By embedding secret messages within seemingly innocuous files, steganography provides a layer of security that goes beyond traditional encryption methods. On that note, i will take your leave and will meet you in the next one, till then “Keep Hacking!”.