Document directory
- ◇ Avoid sensitive word Filtering
- ◇ Avoid naked eye Review
- ◇ Transmit encrypted information
- ◇ Technical Principles
- ◇ Steps for hiding information
- ◇ Information Extraction steps
- ◇ Advantages
- ◇ Disadvantages
- ◇ Technical Principles
- ◇ Steps for hiding information
- ◇ Information Extraction steps
- ◇ Advantages
- ◇ Disadvantages
- ◇ Technical Principles
- ◇ Steps for hiding/extracting information
- ◇ Related tools
- ◇ Advantages
- ◇ Disadvantages
In the previous post, we introduced "using image propagation wall Turning Tools ". Today, let's talk about the technical principles. If you are not interested in it, Skip this article.
★Usage of image hiding information
First, let's talk about the purpose of information hiding. I roughly summarized that Information Hiding can be used in the following scenarios.
◇ Avoid sensitive word Filtering
The so-called "sensitive word filtering" should be familiar to those who often go over the wall. Using images to hide information can prevent GFW sensitive word filtering.
◇ Avoid naked eye Review
The method introduced in the previous post (embedding the wall flip tool into an image) is mainly to avoid manual review by website administrators. Many websites in China perform manual review on uploaded images. If the information can be hidden in the image through technical means, and the image itself does not look anything strange, it cannot be seen by manual review.
◇ Transmit encrypted information
Finally, images can be used to hide encrypted information. Regarding the purpose and importance of encryption, I have already emphasized encryption in "document encryption literacy Introduction. Using images to hide encrypted information is not only effective but also highly deceptive-it is difficult for outsiders to know whether an image contains encrypted information.
★Preparation-first Compress
Below, I will introduce several different hiding methods. Before you start, let's take a look at preparation-first compress the files to be hidden with a compression tool (such as 7zip or WinRAR.
Compression has the following benefits:
Advantage 1
If the file you want to hide is in text or office format, its internal content is clear. If it contains sensitive words, sensitive words will be filtered during network transmission. However, the original content of the compressed file has become completely invisible and can be filtered by regular sensitive words.
Advantage 2
After compression, the volume becomes smaller, helping increase concealment. Therefore, try to use the "maximum compression" option.
Advantage 3
For the two methods described later (tail append method and content overwrite method), if the file you hide is compressed, it will be easy to extract information at that time-simply extract the information using a compression tool.
★Tail append Method
First, we will introduce the simplest method.
◇ Technical Principles
As the name implies, the "APPEND method" is to append the object to be hidden to the end of the image. This method does not destroy any original data of the image. Therefore, the image looks exactly the same as the original one.
◇ Steps for hiding information
The hiding process is simple. You can simply use the built-in file copy command in windows. Assume that your image file is named A. jpg and the hidden compressed file is called B. Zip. You only need to execute the following command to merge the two files into a new one.
Copy/B a. jpg + B .zip C. jpg
After executing the preceding command, you can get a new image file C. jpg. The size of the image file is the sum of the first two. You can use various image watching tools to open C. jpg without any exceptions.
◇ Information Extraction steps
Because you append a compressed file, the extraction is simple-you only need to use the compression tool to open C. jpg, you can directly see the content in the compressed package.
◇ Advantages
1,
It is easy to create and a copy command can be done. If the compressed file is hidden, the extraction process is also very simple.
2,
The new file is still the same as the original file.
3,
The size of the hidden file is unrestricted. For example, you can append KB of hidden data to the end of a kb image.
◇ Disadvantages
1,
Because the hidden files are appended at the end. When you upload this new image file to a website with some textures (if this website has strict image format validation), it may find that there is excess data at the end of the image, the excess data will be discarded.
2,
After the image is appended, the file size of the image increases. If the file you append is too large, it is easy to detect flaws.
For example, a 640*480 JPEG image is several megabytes in size. For experienced it technicians, they will suddenly feel bored.
★Content coverage Method
After completing the append method, we will introduce the method of content coverage.
◇ Technical Principles
Generally, image files contain two parts: file header and data area. The "content overwriting method" means to directly hide the fileOverwriteTo the image fileData ZoneOfTail. For example, if an image has 100 K, and the file header occupies 1 K, the data zone is 99 K. That is to say, a maximum of K files can be hidden.
Remember:When overwriting, do not destroy the file header. Once the file header is damaged, the image file is no longer a legal image file.
In this way, the format of image files is exquisite-it is best to use24-bit BMP format. First, the BMP format itself is relatively simple, and the data area is covered at will, which is not a problem; second, the 24-bit BMP is larger than the other format BMP, and more content can be hidden.
◇ Steps for hiding information
Using this trick to hide information is a little troublesome and requires some small tools. For such a simple scheme, I usually use a Python script. The following is a simple Python script. If your computer has a python environment, you can use this script directly.
Statement in advance: the following code does not strictly calculate the size of the BMP file header. I just reserved 1024 bytes, and I think it should be enough.
--------------------------------
import sysdef embed(container_file, data_file, output_file) : container = open(container_file, "rb").read() data = open(data_file, "rb").read() if len(data)+1024 >= len(container) : print "Not enough space to save", data_file else : f = open(output_file, "wb") f.write(container[ : len(container)-len(data)]) f.write(data) f.close()if "__main__" == __name__ : try : if len(sys.argv) == 4 : embed(sys.argv[1], sys.argv[2], sys.argv[3]) else : print "Usage:" print sys.argv[0], "container data output" except Exception,err : print err
--------------------------------
The above Python code is very understandable. If you have basic programming skills, you can rewrite a similar code in a language you are familiar with within 10 minutes.
In addition, if you are interested in Python, you can read the series of posts you wrote before-why do you recommend python?
◇ Information Extraction steps
Similar to the previous method. If you are overwriting a compressed file, you can use a compression tool to open the image during extraction to directly view the content in the package.
◇ Advantages
1,
The file size of the image remains unchanged.
2,
Although the hidden file overwrites the data area, it breaks through the content of the original image. However, the format of the image file is valid.
Therefore, you can upload such images to websites with various textures without any technical problems.
3,
If a compressed file is hidden, the extraction process is simple.
◇ Disadvantages
1,
Because the hidden file overwrites the data area, when the image is displayed, an area is dimmed.
2,
The size of the hidden file is limited to a certain extent-it cannot be larger than the size of the image data area.
3,
There are certain requirements on the image format. We recommend that you use the 24-bit BMP format.
★Implicit writing
Finally, we will introduce the most complex but concealed method-implicit writing.
◇ Technical Principles
This method involves more profound technical fields. In layman's terms, if the color of a certain pixel of an image is slightly adjusted, it cannot be seen by the naked eye. Therefore, specialized software uses some advanced algorithms, you can hide the information in the changed pixels.
If you are interested, you can refer to the introduction of "here". If you are familiar with foreign languages, you can also refer to the introduction in "here ".
◇ Steps for hiding/extracting information
To use this method, you must use a dedicated tool to hide and extract information. In addition to specifying image files and hidden files, you also need to set a password. The implicit write tool encrypts your hidden files and then performs implicit write. During the extraction, you must use the same implicit write tool to extract the files and enter the same password, can be extracted.
When a fake file falls into the hands of an attacker, he must know two pieces of information at the same time (which implicit writing tool you use and the password you set during the implicit writing ), to crack the hidden information. Therefore, it is highly secure.
◇ Related tools
The following describes several tools. You can select one as per your preferences.
Name |
Official Website |
Interface |
Type |
Silent eye |
Here |
Graphic Interface |
Open source software |
Steg hide |
Here |
Command line interface |
Open source software |
Ultima Steganography |
Here |
Graphic Interface |
Commercial Software |
◇ Advantages
1,
Concealment is very good. The image looks almost unchanged (in fact, there is a slight change, but it cannot be seen ). In addition, the size of the image file does not change.
It is difficult for a professional to determine whether an image contains the data of implicit writing.
◇ Disadvantages
1,
Hiding and extracting information is troublesome and requires special tools.
2,
Only a small amount of information can be hidden.
The amount of information hidden in this method is related to the image area and the image format. For example, a 1600*1200 dimension image can only be hidden in either format.Several KB.
★End
The methods described earlier can be used in addition to image files or other multimedia files (such as audio files and video files ). If you are interested, you can study it on your own.
Posts related to this article on my blog (need to go through the wall):
Spread the wall by Image
Copyright Notice
All original articles in this blog are copyrighted by the author. This statement must be reprinted to keep this article complete, and the author's programming preferences and original addresses in the form of hyperlinks should be noted:
Http://program-think.blogspot.com/2011/06/use-image-hide-information.html