Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[Samaritans] Hiding Files In Images Using Steganography

[Image: aCqGsyl.gif]
[Image: svMdwsE.png] [Image: ZDlZ5zU.png][Image: svMdwsE.png]



Hiding Files In Images Steganography.

[Image: sep1.png]

Written by Wake

[Image: sep1.png]

Disclaimer

This thread is for informational and educational purpose only. I will not be responsible for any action performed by any reader.

Introduction

In this thread i will be covering how to embed hidden data into an image using Steganography and then extract that hidden data. Steganography is the art of hiding information in plain site and in this tutorial i will teach you how to use a very simple tool called Steghide. This is a very simple tool that is easily configurable and only takes a few seconds to hide information in many file types.

What will i need for this?

[+] A machine running a linux distro or a Virtual machine.

[+] An image of your choice.

[+] Steghide (a little later on i will go over how to install this)

[Image: MzT5lvg.png]

What is Steganography?
 
Steganography is the technique of hiding data in an ordinary non-secret file to avoid detection the secret data is then extracted at its destination. You can use Steganography combined with encryption as an extra step for hiding protected data. Steganography is used to conceal almost any type of digital content including text, image, video or audio. If you want to send some one a secret file you could encrypt the file and then send it to them, but that is going to make it pretty obvious that you are sending something secret if that message is intercepted.

The whole idea of Steganography is that if some one intercepts this image to any one that is not aware this will look just like a normal innocent picture. Steganography is useful in situations where sending encrypted information might raise suspicion such as in countries where free speech is suppressed it is also commonly used as a digital watermark in images and audio files.

What is Steghide?

Steghide is a steganography program that is able to hide data in various kinds of image and audio files.

[Image: MzT5lvg.png]

How to embed hidden data into a file

The first thing we are going to need to do is boot into are Linux machine or virtual machine. I will be using Kali linux for this.

Once we are logged in open a terminal and type in apt-get install steghide and press enter

Steghide is the program thats going to be doing all the heavy lifting for us
its going to be hiding the files in images.

Its will ask you if you wish to continue type "y" for yes.

Now that we have Steghide installed we can type "man steghide" and this will give us a manual of
steghide and you can read through some of the commands its a very simple program to use.
Spoiler (Click to View)
We are going to be looking at Embedding. I will break down the arguements below.

[+]-ef embedfile To embed we will need an embed file this is the file that contains are secret message that we want to hide.

[+]-cf coverfile The cover file is the file that will be used to embed the data. For this example i am
going to use a .jpg

[+]-sf stegofile The stegofile is the out file this will be our output

We will also be using a password what steghide does is it encrypts the hidden file then puts the
hidden file into the image. If some one was to figure out there was something in the image they can
just extract that data encrypting it gives us another layer of protection.

[+]-p passphrase This is where we will encrypt our data before putting it into the image using a
password.

Here is the image i am going to be using the image file size is 93.6 kB so its not really that big.
Spoiler (Click to View)
Now i am going to create a .txt file containing any information i like and that is the file we will
hide inside our image. You can see i have now created a .txt file containing our very secret
information.
Spoiler (Click to View)
We can now embed this information into our image using the commands below.

For this tutorial i have my files that i will be using saved in my Documents so i am going to head to
directory in terminal using "cd Documents". Now we are in the correct directory we can use the
commands below to embed our file into our image.

[+]steghide embed -ef information.txt -cf batcat.jpg -sf innocent.jpg -p password

[+]Our -ef is the information we want to hide in our case information.txt

[+]Our -cf is our coverfile this is our file that will be used to embed our data so in our case we are
using batcat.jpg

[+]Our -sf is our stegofile this is the name we want our new file to be called we have called
ours innocent.jpg

[+]Our -p is our passphrase for this example i have used a really secure passphrase "password"

Once we have ran that command we will get a file in our case we have innocent.jpg
Spoiler (Click to View)
Now if we open innocent.jpg it looks exactly the same as our original image

How ever a clue that they are not the same file is that the file size of our original file batcat.jpg
is 93.6 kB and our new file innocent.jpg is 97.7 kB
Spoiler (Click to View)
[Image: MzT5lvg.png]

How to extract hidden data from a Stegofile

Now lets go and extract that message from innocent.jpg we can do that using the command below

[+]steghide extract -sf innocent.jpg -xf secrets.txt

Again our -sf is our Stegofile that we just created for us this will be innocent.jpg

-xf is what we want to name our file that will be created with our extracted data in it in our case
secrets.txt

Now we could add -p onto the end and specify the password but for now we will just enter this command
and it will prompt us to enter a password.

Enter the password we created before ours is "password" and press enter now you can see we get a
.txt file created with the name we chose called secrets.txt and once we open that we can see it
contains our very secret information that we embedded in our original image.
Spoiler (Click to View)
So that is how you embed a file into an image and extract a file from an image it is all very simple.

Thank you for taking the time to read this thread.
[Image: New-Project.png]
Coming from knowing how to do this, this tutorial is comprehensive as all hell. Great tutorial right here
What a very well wrote tutorial on how to embed information inside a image, i personally have used this method many times. This will help many users here to understand how this is done.
(Jun 8, 2019 08:46 AM)ShinyThings Wrote:  Coming from knowing how to do this, this tutorial is comprehensive as all hell. Great tutorial right here

(Jun 8, 2019 12:25 PM)__Digital__ Wrote:  What a very well wrote tutorial on how to embed information inside a image, i personally have used this method many times. This will help many users here to understand how this is done.

Thank you both for reading and for your kind words hoping this will teach a few people something new. I also forgot to mention that if you upload your embedded image to any site that compresses the image, the data inside will be destroyed.
[Image: New-Project.png]
Interesting read, thanks Wake :)

A lot of HQ posts from you recently mate!
[Image: pog.gif]
Sui Generis Owner | Former Leader of
Wolfpack / Samaritans / Sociopaths / Sui Generis / Appraisers / PROFIT / Coven
(Jun 8, 2019 10:23 PM)Spaark Wrote:  Interesting read, thanks Wake :)

A lot of HQ posts from you recently mate!

I try my best and work hard on my threads thank you and thanks for reading.
[Image: New-Project.png]
although it s old but thank you very much for putting such efforts to write this post ..
(Jun 9, 2019 02:48 PM)SchwererGustav Wrote:  although it s old but thank you very much for putting such efforts to write this post ..

Thanks for reading this may be old but there will be a lot of members who do not know about this that will find it useful.
[Image: New-Project.png]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Infamous] by Dotexe5 hours ago 6 208 5 hours ago
Last Post: Th3HulK
by PsychoArsenalSep 14, 2023 05:14 PM 0 141 Sep 14, 2023 05:14 PM
Last Post: PsychoArsenal
by Mac MillerJun 2, 2022 08:11 PM 2 136 Jun 2, 2022 08:11 PM
Last Post: Mac Miller