Understanding Steganography for Capture The Flag Challenges
what is Steganography? where it is used? Steganography in CTF’s

Hello everyone I hope you all are doing well. Today we gonna learn about Steganography and we will be doing some HackTheBox challenges. So without wasting any time let’s get started.
What is Steganography?
Steganography is a way of hiding a secret message inside something .For example hiding secret within a image or audio file.
There are many tools that can help you to hide a secret message inside an image or another file type. One of The most famous tool is steghide . More on this later.
There are two types of steganography :
(i) Physical
(ii) Digital
In this article, we will be learning about Digital steganography
Where is steganography used?
Government agency’s like SVR uses steganography for certain communications
Source :https://en.wikipedia.org/wiki/Steganography
Malicious hackers use steganography for different types of attacks. Some of the most famous are embedding actual scripts within macro-enabled Word document, Or in songs or movies.
If you want to learn more check this article
How to Hide a text file to an Image
We need to install steghide. If you are using kali then sudo apt install steghide .
We will use command steghide embed -ef select file to be embedded <filename> -cf embed into the file <filename>

Now we will extract our data
we will use command steghide extract -sf write result to <filename> instead of cover-file <filename>

Time to do Some CTF
1:- CTF Hackerman https://app.hackthebox.com/challenges/17
I will be telling you my method of how I do steg challenges in any CTF.
STEPS:-
1:- Download the challenge file
2:- After downloading the file I always run ExifTool against the file. (In CTF you can find passphrases or some other useful stuff.)
3:-Then I will run the strings command (print the sequences of printable characters in files). After that, I use other tools like steghide, foremost.



Since I don't know the passphrase, I tried to brute force it with stegcracker.


We have got our passphrase ‘almost’.Now we can extract the hidden file with steghide

Our output is base64 encoded we can simply base64 decode it.
Thanks for reading this, I hope you liked it. You can follow me on Twitter hac10101