If you have an image that has malicious code written into it using steganography would a screenshot of that image have functional malicious code as well? Or does the recapture transform the image data enough to scramble anything that was previously arranged?
-
What's your definition of functional ? Stego'd malware in an image will not jump up and begin doing things. There would need to be another piece of code to read the malware out of the image and execute it.– user10216038May 21, 2020 at 0:40
-
good point. My functioning case would be that a program like a browser loads the resulting screenshot img as an element.– Li BraryMay 21, 2020 at 18:47
1 Answer
That depends entirely on the kinds of steganography used
For example, you could modify the least significant bit of every pixel to store data in it. This has a visible, although barely noticable effect on the image. It requires the file to be transmitted as is, as even slight changes in the colour values of the image will destory the associated information.
If you make a screenshot and that screenshot is a perfect, pixed-by-pixel replica of the original image, that screenshot will also contain that information, although it will be much more difficult to extract, since it will also contain a lot of irrelevant data.
It's also possible that the program you use to make that screenshot compresses the data in a lossy format. As such, if you have a large white background - as you do on a document, for example - tiny variations in color - as you would have when hiding information via the LSB method - would be "smoothed" over and stored as one blob of colour, thus effectively destroying the information.
Other methods of steganography rely on the way a file is structured to hide the information. As such, methods that copy the visual information will not copy the hidden information.
Summary
Is it possible? Yes. Always? No.