Hiding text in images
In the previous recipes, we've looked at hiding images within another. This is all well and good, but our main aim of this chapter is to pass text that we can use in a command and control style format. The aim of this recipe is to hide some text within an image.
How to do it…
So far, we've looked at focusing on the RGB values of a pixel. In PNGs, we can access another value, the A
value. The A
value of RGBA
is the transparency level of that pixel. In this recipe, we are going to work with this mode, as it will allow us to store 8 bits in the LSBs of each value across two pixels. This means that we can hide a single char
value across two pixels, so we will need an image that has a pixel count of at least twice the number of ...
Get Python Web Penetration Testing Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.