Lab2 1
Lab2 1
Network+ »
Security+ »
Linux »
Support »
FAQ »
Log In
Navigation
Home » Hiding Files with Steganography
Here’s a simple method of using steganography by embedding a text file into an image file.
Requirements: This exercise assumes you’re running a Windows system and know how to access the command line. You’ll
need a copy of WinRAR, which is available as a free download. Search Google with “winrar download” if necessary to
download and install it on your system. You’ll also need a .jpg picture file from any digital camera or smartphone.
Note: Be default, extensions (such as .jpg, .txt, and .rar) are not viewable in Windows. To make them viewable in Windows 10
File Explorer, follow these steps:
3. Create a text file by right-clicking in the folder, and selecting New -> Text Document. Name the document Secret1. It should
have a .txt extension.
4. Open the text document and type My Secrets into it. Save and close the file.
5. Use WinRAR to compress the text document. You can do this by right-clicking on the document and selecting Add to
Secret1.rar. If you want to embed multiple files into your image, select them all and add them to the .rar file. This exercise uses
only one file for simplicity.
https://gcgapremium.com/steganography-lab/ 1/4
20/12/2019 Hiding Files with Steganography|Get Certified Get Ahead
6. Open a command line on your Windows system. Change the directory with this command: cd \stegexample
7. Vea el contenido de su carpeta con el comando dir . Verás algo como esto:
Directorio de C: \ StegExample
06/08/2017 01:31 PM <DIR> .
06/08/2017 01:31 PM <DIR> ..
28/05/2017 05:25 PM 210,817 pic.jpg
06/08/2017 01:31 PM 83 Secret1.rar
06/08/2017 01:31 PM 8 Secret1.txt
3 archivo (s) 210,825 bytes
2 Dir (s) 977,883,119,616 bytes gratis
8. Copie el archivo de texto y el archivo de imagen en un nuevo archivo de imagen con el siguiente comando:
Este ejemplo crea un nuevo archivo llamado stegpic.jpg para que pueda mostrar fácilmente las diferencias de tamaño. Sin
embargo, también es posible insertar simplemente el archivo secret1.rar dentro del archivo pic.jpg original con este comando:
https://gcgapremium.com/steganography-lab/ 2/4
20/12/2019 Hiding Files with Steganography|Get Certified Get Ahead
Directorio de C: \ StegExample
06/08/2017 01:31 PM <DIR> .
06/08/2017 01:31 PM <DIR> ..
28/05/2017 05:25 PM 210,817 pic.jpg
06/08/2017 01:31 PM 83 Secret1.rar
06/08/2017 01:31 PM 8 Secret1.txt
06/08/2017 01:31 PM 210,900 stegpic.jpg
3 archivo (s) 843,422 bytes
2 Dir (s) 977,882,718,208 bytes gratis
10. Observe la diferencia en el tamaño del archivo stegpic.jpg del archivo pic.jpg original. Ahora es más grande de lo que
originalmente indicaba que contiene el contenido del archivo de texto comprimido. Sin embargo, hay ocasiones en las que
agrega un archivo relativamente pequeño a un archivo de imagen, simplemente llenará el espacio en blanco del archivo y no
cambiará su tamaño.
11. Si desea extraer los archivos ocultos, debe cambiar el nombre de la extensión de la imagen de jpg a rar (stegpic.jpg a
stegpic.rar). Es posible que deba cambiar la pantalla para mostrar las extensiones. También puede crear una copia del archivo
dándole una nueva extensión como esta:
12. Luego puede extraer el archivo de texto usando WinRAR dentro del Explorador de Windows haciendo clic derecho y
seleccionando Extraer archivos.
https://gcgapremium.com/steganography-lab/ 3/4
20/12/2019 Hiding Files with Steganography|Get Certified Get Ahead
Tenga en cuenta que los archivos se ven iguales para un usuario casual.
Los analistas de seguridad utilizan herramientas de hash para detectar archivos modificados con esteganografía. Por ejemplo, si
un analista tiene una copia del archivo original y una copia del archivo con los datos incrustados, el analista puede crear hashes
de ambos archivos. Si los hashes no son los mismos, muestra definitivamente que los archivos son diferentes y la explicación
más probable es que alguien ocultó datos dentro del archivo usando esteganografía.
Consulte el laboratorio Creación y comparación de hashes para ver cómo se realiza el hash.
Apoyo
https://gcgapremium.com/steganography-lab/ 4/4