How to hide confidential data in images or audio files in just one note

Steganography is the art of hiding information and in this tutorial, we will use Steghide - a simple command line tool to do that.

What is steganography?

Unlike encryption, there is an information that is explicitly hidden, Steganography hides data in a simple view, inside a file such as an image, an audio file.

  1. What is data encryption? Things to know about data encryption

Steganography is very useful in encrypted messaging situations such as in countries where freedom of speech is not available. It is also commonly used as a digital watermark to find stolen images or audio files.

How Steganography works

There are a number of different techniques for hiding data inside regular files. One of the most widely used and perhaps simplest uses is the Least Significant Bit, commonly known as LSB.

This technique changes the last few bits in a byte to encode a message, particularly useful for images, where the red, green and blue values ​​of each pixel are represented by 8. bits (one byte) range from 0 to 255 in decimal or 00000000 to 11111111 in binary form.

  1. Basic measurement units in computers

Changing the last two bits in a completely red pixel from 11111111 to 11111101 will only change the red value from 255 to 253, but the naked eye cannot recognize the color change but still allows us to encrypt data inside the picture.

How to hide confidential data in images or audio files in just one note Picture 1

The smallest weight bit technique is also used for audio files. There are two things to consider when hiding information is encrypted and compressed. Encrypt data before embedding it in additional security layers while compressing data.

How to hide data in images or audio files

Step 1: Embed data into a file

Using Steghide is easy, to install it from Terminnal in Linux, just use apt .

apt-get install steghide

When the installation is complete, embed the data into a file, enter the command below.

steghide embed -ef secretFile -cf coverFile -sf outputFile -z compressionLevel -e scheme

The statement elements are broken down as follows:

  1. -ef determine the path of the file you want to hide, you can embed any file type inside the cover file like Python script or shell file.
  2. -cf is the file that the data is embedded in, it is limited to BMP, JPEG, WAV and AU formats.
  3. -sf is an optional argument specifying the output file. If omitted, the original file will be overwritten by the new steganographic file.
  4. -z determines the compression level, from 1 to 9. If you don't want to compress the file, use the -Z argument.
  5. -e specify the encoding type. Steghide supports multiple encoding types, and if ignored by default, Steghide will use AES 128-bit encryption. If you don't want to use encryption, just type -e none .

In this example, confidential information is hidden in the image of a cat, not overwriting the original image or compressing it, only encoding the image.

steghide embed -ef secret.txt -cf StegoCat.jpg -e none -Z

How to hide confidential data in images or audio files in just one note Picture 2

After executing the Steghide command, there is a password setting message to extract the embedded data that appears, enter the password and confirm again.

How to hide confidential data in images or audio files in just one note Picture 3

Step 2: Extract hidden data from the file

Extracting hidden data from a steganographic image is even easier with the following command:

$ steghide extract -sf stegoFile -xf outputFile

When running this command, you will be prompted to enter the same password created above.

How to hide confidential data in images or audio files in just one note Picture 4

I wish you all success!

Alternatively, you can use cmd to hide confidential documents in images Hide confidential documents as images

See also: Instructions for setting password to protect files and folders in Windows

4 ★ | 1 Vote

May be interested

  • What is data encryption? Things to know about data encryptionPhoto of What is data encryption?  Things to know about data encryption
    data encryption is to transfer data to a new form that users cannot read and need to use the key to encrypt the data.
  • The method of Crack PasswordsPhoto of The method of Crack Passwords
    in this article, i present to you an overview of the authentication methods, the ways to password break and the tools used to break the password. from there you will know how to protect yourself against attacks.
  • 7 measures to enhance security for e-wallets you should not ignorePhoto of 7 measures to enhance security for e-wallets you should not ignore
    mobile payment technology has evolved over the years, boosting trade with a dizzying speed, leading to the creation of electronic wallets. here are 7 important security measures to increase safety for e-wallets.
  • Complete usage of Simple VHD ManagerPhoto of Complete usage of Simple VHD Manager
    a vhd file simulates the file structure of the hard drive. you may think it is a zip file but not compressed. the vhd is used as a hard drive for the virtual machine, but the file can be mounted in the same way that the real hard drive is mounted.
  • Here's how to remove the VideoScavenger Toolbar adwarePhoto of Here's how to remove the VideoScavenger Toolbar adware
    the videoscavenger toolbar is an adware and is a browser attacker, it will change the default homepage and search settings on chrome, firefox and internet explorer browsers to 'http: // search. tb. ask. com / 'without user permission. in fact, the videoscavenger toolbar will modify the browser installer to navigate the browser to advertising and monetizing websites.
  • How to remove malicious programs GS.Enabler, SK.Enabler, SK.Enhancer, WS.Enabler?Photo of How to remove malicious programs GS.Enabler, SK.Enabler, SK.Enhancer, WS.Enabler?
    programs like gs.enabler (gs.enabler.exe), sk.enabler (sk.enabler.exe), sk.enhancer (sk.enhancer.exe) and ws.enabler (ws.enabler.exe) of the manufacturer premiumsoft is considered as unwanted programs (potentially unwanted programs - pups). these programs 'hide' on the user's computer and make some changes to the settings, jeopardizing the system.