Destruction of Image Steganography using Generative Adversarial Networks
Digital image steganalysis, or the detection of image steganography, has been studied in depth for years and is driven by Advanced Persistent Threat (APT) groups’, such as APT37 Reaper, utilization of steganographic techniques to transmit additional malware to perform further post-exploitation activity on a compromised host. However, many steganalysis algorithms are constrained to work with only a subset of all possible images in the wild or are known to produce a high false positive rate. This results in blocking any suspected image being an unreasonable policy. A more feasible policy is to filter suspicious images prior to reception by the host machine. However, how does one optimally filter specifically to obfuscate or remove image steganography while avoiding degradation of visual image quality in the case that detection of the image was a false positive? We propose the Deep Digital Steganography Purifier (DDSP), a Generative Adversarial Network (GAN) which is optimized to destroy steganographic content without compromising the perceptual quality of the original image. As verified by experimental results, our model is capable of providing a high rate of destruction of steganographic image content while maintaining a high visual quality in comparison to other state-of-the-art filtering methods. Additionally, we test the transfer learning capability of generalizing to to obfuscate real malware payloads embedded into different image file formats and types using an unseen steganographic algorithm and prove that our model can in fact be deployed to provide adequate results.
Steganography is the usage of an algorithm to embed hidden data into files such that during the transferral of the file only the sender and the intended recipient are aware of the existence of the hidden payload . In modern day applications, adversaries and Advanced Persistent Threat (APT) groups, such as APT37 Reaper , commonly utilize these algorithms to hide the transmission of shellcode or scripts to a compromised system. Once the file is received, the adversary then extracts the malicious payload and executes it to perform further post-exploitation activity on the target machine. Due to the highly undetectable nature of the current state-of-the-art steganography algorithms, adversaries are able to evade defensive tools such as Intrusion Detection Systems (IDS) and/or Antivirus (AV) software which utilize heuristic and rule-based techniques for detection of malicious activity.
Modern steganalysis methods, or techniques developed to specifically detect steganographic content, utilize analytic or statistical algorithms to detect traditional steganography algorithms, such as Least Significant Bit (LSB) steganography . However, these methods struggle to detect advanced steganography algorithms, which embed data using unique patterns based on the content of each individual file of interest. This results in high false positive rates when detecting steganography and poor performance when deployed, effectively making it unrealistic to perform preventative measures such as blocking particular images or traffic from being transmitted within the network. Furthermore, image steganalysis techniques are typically only capable of detecting a small subset of all possible images, limiting them to only detect images of a specific size, color space, or file format.
To address these issues, the usage of steganography destruction techniques can be used to provide a more feasible policy to handling potential false alarms. Instead of obstructing the transmission of suspicious images, filtering said images to remove steganographic content effectively making it unusable by potential adversaries provides a simpler solution. However, traditional and unintelligent steganographic filtering techniques result in the additional issue of degrading image quality.
In this paper, we propose an intelligent image steganography destruction model which we term Deep Digital Steganography Purifier (DDSP), which utilizes a Generative Adversarial Network (GAN)  trained to remove steganographic content from images while maintaining high perceptual quality. To the best of our knowledge, our DDSP model removes the greatest amount of steganographic content from images while maintaining the highest visual image quality in comparison to other state-of-the-art image steganography destruction methods detailed in Section II-A.
The rest of the paper is organized as follows. Section II will discuss the prior work in the image steganography purification domain, along with the background information on GANs. The dataset used for evaluating our image purification model will be presented in Section III, followed by a detailed description of DDSP in Section IV. The experimental results will be discussed and analyzed in Section V. Finally the conclusion and future works will be presented in Section VI.
Ii-a Prior Work
Attacks on steganographic systems  have been an active topic of research with differing objectives of either completely removing hidden steganographic content or slightly obfuscating the steganographic data to be unusable while avoiding significant degradation of file quality. Within the same realm of machine learning based steganographic attacks, the PixelSteganalysis  method utilizes an architecture based on PixelCNN++  to build pixel and edge distributions for each image which are then manually removed from the suspected image. The PixelSteganalysis method is experimented against three steganographic algorithms, Deep Steganography  a Deep Neural Network (DNN) based algorithm, Invisible Steganography GAN (ISGAN)  a GAN based algorithm, and the Least Significant Bit (LSB) algorithm. The majority of other steganographic destruction techniques are based on non-machine learning based methods which utilize various digital filters or wavelet transforms [4, 5, 2, 29, 1, 30, 3, 31]. While these approaches may appear simple to implement and do not require training on a dataset, they do not specifically remove artifacts and patterns left by steganographic algorithms. Instead these techniques look to filter out high frequency content, which can result in image quality degradation due to perceptual quality not being prioritized.
Ii-B Super Resolution GAN
The application of GANs for removing steganographic content while maintaining high visual quality draws inspiration from the application of GANs to the task of single image super resolution (SISR). Ledig et. al’s research  utilized the GAN framework to optimize a ResNet  to increase the resolution of low resolution images to be as visually similar as possible to their high resolution counterparts. Their research additionally detailed that using the GAN framework as opposed solely to a pixel-wise distance loss function, e.g. mean squared error (MSE), results in additional high frequency texture detail to be recreated. They note that using the MSE loss function alone results in images that appear perceptually smooth due to the averaging nature of their objective function. Instead, the authors optimize a multi-objective loss function which is composed of a weighted sum of the pixel-wise MSE as a content loss and the adversarial loss produced by the GAN framework to reconstruct the low and high frequency detail, respectively.
To train our proposed model, we utilized the BOSSBase dataset  because it is used as a benchmark dataset for numerous steganalysis papers. The dataset contains 10,000 grayscale images of size 512x512 of the portable gray map (PGM) format. The images were preprocessed prior to training by converting to the JPEG format with a quality factor of 95% and resizing to 256x256 dimensions. As seen in Figure 1, 4 different steganography algorithms are used to embed payloads into the 10,000 images. These algorithms (HUGO , HILL , S-UNIWARD , and WOW ) are a few state-of-the-art steganography algorithms which are difficult to detect even by modern steganalysis algorithms. These algorithms are open source and made available by the Digital Data Embedding Laboratory of Binghamton University . For each of these steganography algorithms, 5 different embedding rates, 10%, 20%, 30%, 40%, and 50%, were used with 10% being the most difficult to detect, and 50% being the easiest to detect. This process created a total of 210,000 images consisting of 200,000 steganographic images, and 10,000 cover images. The BOSSBase dataset was then split into train and test sets using a train/test split criterion of 75%/25%.
Iv Deep Digital Steganography Purification
Deep Digital Steganography Purifier (DDSP) consists of a similar architecture to SRGAN . However instead of using a large ResNet, DDSP utilizes a pretrained autoencoder as the generator network in the GAN framework to remove the steganographic content from images without sacrificing image quality. The DDSP model can be seen in Figure 2. The autoencoder is initially trained using the MSE loss function and then fine tuned using the GAN training framework. This is necessary because autoencoders are trained to optimize MSE which can cause images to have slightly lower quality than the original image due to the reasons discussed in Section II-B. More detailed descriptions of the architectures are discussed in the following sections.
Iv-a Autoencoder Architecture
The residual autoencoder, seen in Figure 3, consists of encoder and decoder networks. The encoder learns to reduce the size of the image while maintaining as much information necessary. The decoder then learns how to optimally scale the image to its original size while having removed the steganographic content.
The encoder, seen in Figure 4, takes an image with steganography as its input. The input image is then normalized using Min-Max normalization, which scales pixel values to the range of . After normalization, the image is fed into a 2-D convolutional layer with a kernel size of 9x9 and 64 filters, followed by a ReLU activation . The output of the convolutional layer is then fed into a downsample block, seen in Figure 5. The downsample block consists of two 2-D convolutional layers with the first one having a stride of 2 which causes the image to be downsampled by a factor of 2. The use of a convolutional layer to downsample the image is important because it allows the model to learn the near optimal approach to downsample the image while maintaining high image quality. The downsampled output is then passed into 16 serial residual blocks. The residual block architecture can be seen in Figure 6. Following the residual blocks, a final 2-D convolutional layer with batch normalization is added with the original output of the downsample block in a residual manner to form the encoded output.
The decoder, seen in Figure 9, takes the output of the encoder as its input. The input is then upsampled using nearest interpolation with a factor of 2. This will increase the shape of the encoder’s output back to the size of the original input image. The upsampled image is then fed into a 2-D convolutional layer with a kernel size of 3x3 and 256 filters followed by a ReLU activation. This is then fed into another 2-D convolutional layer with a kernel size of 9x9, and 1 filter followed by a Tanh activation. Since the output of the Tanh activation function is in the range , the output is denormalized to scale the pixel values back to the range . This output represents the purified image.
To train the autoencoder, steganographic images are used as the input to the encoder. The encoder creates the encoded image which is fed into the decoder which decodes the image back to its original size. The decoded image is then compared to its corresponding cover image counterpart using the MSE loss function. The autoencoder was trained using early stopping and was optimized using the Adam optimizer  with a learning rate , , and .
Iv-B GAN Training
Similar to the SRGAN training process, we use the pretrained model to initialize the generator network. As seen in Figure 7, the discriminator is similar to the SRGAN’s discriminator with the exception of DDSP’s discriminator blocks, seen in Figure 8, which contains the number of convolutional filters per layer in decreasing order to significantly reduce the number of model parameters which decreases training time.
To train the DDSP model, the GAN is trained by having the generator produce purified images. These purified images along with original cover images are passed to the discriminator which is then optimized to distinguish between purified and cover images. The GAN framework was trained for 5 epochs (enough epochs for the model to converge) to fine tune the generator to produce purified images with high frequency detail of the original cover image more accurately.
To assess the performance of our proposed DDSP model in comparison to other steganography removal methods, image resizing and denoising wavelet filters, the testing dataset was used to analyze the image purification quality of the DDSP model. Image quality metrics in combination with visual analysis of image differencing are used to provide further insight to how each method purifies the images. Finally, the DDSP model’s generalization abilities are analyzed by testing the transfer learning performance of purifying steganography embedded using different steganography algorithms and file types.
V-a Image Purification Quality
To compare the quality of the resulting purified images, the following metrics were calculated between the purified images and their corresponding steganographic counterpart images: Mean Squared Error (MSE), Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM) , and Universal Quality Index (UQI) . The MSE and PSNR metrics are point-wise measurements of error while the SSIM and UQI metrics were developed to specifically assess image quality. To provide a quantitative measurement of the model’s distortion of the pixels to destroy steganographic content, we utilize the bit error ratio (BER) metric, which in our use case can be summarized as the number of bits in the image that have changed after purification, normalized by the total number of bits in the image.
Our proposed DDSP is then baselined against several steganography removal or obfuscation techniques. The first method simply employs bicubic interpolation to downsize an image by a scale factor of 2 and then resize the image back to its original size. As seen in Figure 10(\subreffig:bicubic_scrub), the purified image using bicubic interpolation is blurry and does not perform well with respect to maintaining high perceptual image quality. The next baseline method consists of denoising filters using Daubechies 1 (db1) wavelets  and BayesShrink thresholding . An example of the resulting denoised image can be seen in Figure 10(\subreffig:wavelet_scrub). It is notable that the wavelet denoising method is more visually capable of maintaining adequate image quality in comparison to the bicubic resizing method. The final baseline method we compare our DDSP model against is using the pretrained autoencoder prior to GAN fine tuning as the purifier. As seen in Figure 10(\subreffig:autoencoder_scrub), the autoencoder does a sufficient job in maintaining image quality while purifying the image. Finally, the resulting purified image from the DDSP can be seen in Figure 10(\subreffig:gan_scrub). The DDSP and the autoencoder’s purified images have the best visual image quality, with the wavelet filtered image having a slightly lower image quality.
Not only does our proposed DDSP maintain very high perceptual image quality, it is quantitatively better image purifier based on image quality metrics. As seen in Table I, the images purified using DDSP resulted in the greatest performance with respect to the BER, MSE, PSNR, SSIM and UQI metrics in comparison to all baselined methods. Since our proposed DDSP model resulted in the highest BER at 82%, it changed the greatest amount of bits in the image, effectively obfuscating the most amount of steganographic content. Even though our proposed DDSP model changed the highest amount of bits within each image, it produces outputs with the highest quality as verified by the PSNR, SSIM, and UQI metrics, indicating it is the paramount method to use for steganography destruction.
V-B Image Differencing
To provide additional analysis of the different image purification models, we subtract the original cover image from their corresponding purified images allowing for the visualization of the effects caused by steganography and purification. As seen in Figure 11(\subreffig:cover_stego), when the cover image and the corresponding steganographic image are differenced, the resulting image contains a lot of noise. This is expected because the steganography algorithm injects payloads as high frequency noise into the images. The differenced bicubic interpolation purified image, seen in Figure 11(\subreffig:cover_resize), removes the majority of noise from the image. However, as discussed in the previous section, the bicubic interpolation method does not maintain good visual quality as it removes original content from the image. As seen in Figure 11(\subreffig:cover_wavelet) and Figure 11(\subreffig:cover_ae), both the denoising wavelet filter and autoencoder purifier do not remove the noise from the image. Instead, they both appear to inject additional noise into the image to obfuscate the steganographic content, making it unusable. This is visually apparent in the noise located in the whitespace near the top building within the image. For both the wavelet filter and autoencoder, this noise is visually increased in comparison to the original steganographic image. Lastly, as seen in Figure 11(\subreffig:cover_gan), the DDSP model removes the noise from the image instead of injecting additional noise. This is again apparent in the whitespace near the top of the image. In the DDSP’s purified image, almost all of the noise has been removed from these areas, effectively learning to optimally remove the steganographic pattern, which we infer makes the DDSP have the highest image quality in comparison to other methods.
V-C Transfer Learning
Transfer learning can be described as using a applying a model’s knowledge gained while training on a certain task to a completely different task. To understand the generalization capability of our model, we form experiments involving the purification of images embedded using an unseen steganography algorithm along with an unseen image format. Additionally we test the purification method of audio files embedded with an unseen steganography algorithm.
Application to LSB Steganography
To test the generalization of the DDSP model across unseen image steganography algorithms, we recorded the purification performance of the BOSSBase dataset in its original PGM file format embedded with steganographic payloads using LSB steganography . The images were embedded with real malicious payloads generated using Metasploit’s MSFvenom payload generator , which is a commonly used exploitation tool. This was done to mimic the realism of an APT hiding malware using image steganography. Without retraining, the LSB steganography images were purified using the various methods. Similar to the results in Section V-A, the DDSP model removed the greatest amount of steganography while maintaining the highest image quality. These results can be verified quantitatively by looking at Table II.
V-D Application to Audio Steganography
To test the generalization of DDSP across different file formats, we additionally recorded performance metrics on audio files embedded with the same malicious payloads detailed in Section V-C1, using the LSB algorithm. The audio files were from the VoxCeleb1 dataset , which contains over 1000 utterances from over 12000 speakers, however we only utilized their testing dataset. The testing dataset contains 40 speakers, and 4874 utterances. In order to use the DDSP model without retraining for purifying the audio files, the audio files were reshaped from vectors into matrices and then fed into the DDSP model. The output matrices from the DDSP model were then reshaped back to the original vector format to recreate the audio file. After vectorization, a butterworth lowpass filter  and a hanning window filter  were applied to the audio file to remove the high frequency edge artifacts created when vectorizing the matrices. The models were baselined against a 1-D denoising wavelet filter as well as upsampling the temporal resolution of the audio signal using bicubic interpolation after downsampling by a scale factor of 2. As seen in Table III, the pretrained autoencoder, denoising wavelet filter, and DDSP are all capable of successfully obfuscating the steganography within the audio files without sacrificing the quality of the audio, with respect to the BER, MSE, and PSNR metrics. However, the upsampling using bicubic interpolation method provides worse MSE and PSNR in comparison to the other techniques. This shows that those models are generalized and remove steganographic content in various file types and steganography algorithms. Although the wavelet denoising filter has slightly better metrics than the DDSP and the pretrained autoencoder, we believe that the DDSP model would greatly outperform wavelet filtering if trained to simultaneously remove image and audio steganography and appropriately handle 1-D signals as input.
In this paper, we developed a steganography purification model which we term Deep Digital Steganography Purifier (DDSP), which utilizes a Generative Adversarial Network (GAN) which, to the best of our knowledge, removes the highest amount of steganographic content from images while maintaining the highest visual image quality in comparison to other state-of-the-art techniques as verified by visual and quantitative results. In the future, we plan to extend the DDSP model to purify inputs of various types, sizes, and color spaces. Additionally we plan to train the DDSP model on a larger dataset to make the model more robust, thus making it ready to be operationalized for a real steganography purification system.
The authors would like to thank the members of our team for their assistance, guidance, and review of our research.
- footnotetext: Patent Applied for in the United States
- (2006) Destroying steganography content in image files. In The 5th International Symposium on Communication Systems, Networks and DSP (CSNDSPâ06), Greece, Cited by: §II-A.
- (2013) Optimal image steganography content destruction techniques. In International Conference on Systems, Control, Signal Processing and Informatics, pp. 453–457. Cited by: §II-A.
- (2016) Active warden attack on steganography using prewitt filter. In Proceedings of the International Conference on Soft Computing Systems, pp. 591–599. Cited by: §II-A.
- (2019) Anti-forensic approach to remove stego content from images and videos. Journal of Cyber Security and Mobility 8 (3), pp. 295–320. Cited by: §II-A.
- (2016) On the removal of steganographic content from images. Defence Science Journal 66 (6), pp. 574–581. Cited by: §II-A.
- APT37. External Links: Cited by: §I.
- (2017) Hiding images in plain sight: deep steganography. In Advances in Neural Information Processing Systems, pp. 2069–2079. Cited by: §II-A.
- (2011) ”Break our steganographic system”: the ins and outs of organizing boss. In International workshop on information hiding, pp. 59–70. Cited by: §III.
- (1996) Techniques for data hiding. IBM systems journal 35 (3.4), pp. 313–336. Cited by: §I.
- (1930) On the theory of filter amplifiers. Wireless Engineer 7 (6), pp. 536–541. Cited by: §V-D.
- (2000) Adaptive wavelet thresholding for image denoising and compression. IEEE transactions on image processing 9 (9), pp. 1532–1546. Cited by: §V-A.
- (2007) Digital watermarking and steganography. Morgan kaufmann. Cited by: §I.
- (1992) Ten lectures on wavelets. Vol. 61, Siam. Cited by: §V-A.
- (1986) Elements of statistical analysis. Cited by: §V-D.
- Steganographic algorithms. Digital Data Embedding Laboratory, SUNY Binghamton. External Links: Cited by: §III.
- (2014) Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680. Cited by: §I.
- (2016) Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778. Cited by: §II-B.
- (2014) Universal distortion function for steganography in an arbitrary domain. EURASIP Journal on Information Security 2014 (1), pp. 1. Cited by: §III.
- (2012) Designing steganographic distortion using directional filters. In 2012 IEEE International workshop on information forensics and security (WIFS), pp. 234–239. Cited by: §III.
- (2019) PixelSteganalysis: destroying hidden information with a low degree of visual degradation. arXiv preprint arXiv:1902.11113. Cited by: §II-A.
- (2014) Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980. Cited by: §IV-A3.
- (2017) Photo-realistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4681–4690. Cited by: §II-B, §IV.
- (2014) A new cost function for spatial image steganography. In 2014 IEEE International Conference on Image Processing (ICIP), pp. 4206–4210. Cited by: §III.
- MSFvenom. Offensive Security. External Links: Cited by: §V-C1.
- (2017) VoxCeleb: a large-scale speaker identification dataset. In INTERSPEECH, Cited by: §V-D.
- (2010) Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814. Cited by: §IV-A1.
- (2010) Using high-dimensional image models to perform highly undetectable steganography. In International Workshop on Information Hiding, pp. 161–177. Cited by: §III.
- (2017) Pixelcnn++: improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint arXiv:1701.05517. Cited by: §II-A.
- (2013) A novel active warden steganographic attack for next-generation steganography. In 2013 9th International Wireless Communications and Mobile Computing Conference (IWCMC), pp. 1138–1143. Cited by: §II-A.
- (2011) A general attack method for steganography removal using pseudo-cfa re-interpolation. In 2011 International Conference for Internet Technology and Secured Transactions, pp. 454–459. Cited by: §II-A.
- (2007) Denoising and the active warden. In 2007 IEEE International Conference on Systems, Man and Cybernetics, pp. 3317–3322. Cited by: §II-A.
- (2004) Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing 13 (4), pp. 600–612. Cited by: §V-A.
- (2002) A universal image quality index. IEEE signal processing letters 9 (3), pp. 81–84. Cited by: §V-A.
- (2009) Disappearing cryptography: information hiding: steganography and watermarking. Morgan Kaufmann. Cited by: §V-C1.
- (1999) Attacks on steganographic systems. In International workshop on information hiding, pp. 61–76. Cited by: §II-A.
- (2019) Invisible steganography via generative adversarial networks. Multimedia Tools and Applications 78 (7), pp. 8559–8575. Cited by: §II-A.