0% found this document useful (0 votes)
99 views

Lab2 1

This document describes how to hide files within images using steganography. It provides a step-by-step process for embedding a text file within a JPEG image using WinRAR. The steps include creating folders and files, compressing the text file, and using the copy command to insert the compressed file into the image. This increases the image file size slightly but keeps the hidden contents concealed from casual observers. Security analysts can detect such modifications using hash comparisons of the original and modified files.

Uploaded by

Amelia J.F
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Lab2 1

This document describes how to hide files within images using steganography. It provides a step-by-step process for embedding a text file within a JPEG image using WinRAR. The steps include creating folders and files, compressing the text file, and using the copy command to insert the compressed file into the image. This increases the image file size slightly but keeps the hidden contents concealed from casual observers. Security analysts can detect such modifications using hash comparisons of the original and modified files.

Uploaded by

Amelia J.F
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

20/12/2019 Hiding Files with Steganography|Get Certified Get Ahead

Network+ »
Security+ »
Linux »
Support »
FAQ »
Log In

Navigation
Home » Hiding Files with Steganography

Hiding Files with Steganography


This exercise complements material in the CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide. You can use
this as part of a use case to support obfuscation.

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:

Open File Explorer


Click the View tab
Select File name extensions (as shown in following graphic)

Click to see larger image

1. Create an empty folder on your system and name it StegExample.

2. Copy your picture into the folder and rename it to pic.

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:

Copiar / b pic.jpg + secret1.rar stegpic.jpg

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

Copiar / b pic.jpg + secret1.rar pic.jpg

9. Vea el contenido de la carpeta con el comando dir .

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:

copiar stegpic.jpg stegpic.rar

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.

Volver a SY0-501 Security + labs .

Politica de privacidad | Contáctenos

Apoyo

Términos de uso | Políticas de devolución

Diseñado por Elegant Themes | Desarrollado por WordPress

https://gcgapremium.com/steganography-lab/ 4/4

You might also like