# Stegbrute | Fast Steganography Bruteforce Tool Written In Rust Useful For CTF’s

**URL:** <https://onehack.st/t/stegbrute-fast-steganography-bruteforce-tool-written-in-rust-useful-for-ctf-s/170026>\
**Category:** Tools & Scripts\
**Tags:** tools, cracking\
**Created:** [January 16, 2021, 11:49am UTC](https://onehack.st/t/stegbrute-fast-steganography-bruteforce-tool-written-in-rust-useful-for-ctf-s/170026 "2021-01-16T11:49:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheStrength](https://onehack.st/user_avatar/onehack.st/thestrength/32/46753_2.png) [@TheStrength](https://onehack.st/u/TheStrength)\
**Post date:** [January 16, 2021, 11:49am UTC](https://onehack.st/t/stegbrute-fast-steganography-bruteforce-tool-written-in-rust-useful-for-ctf-s/170026/1 "2021-01-16T11:49:10Z")

</div>

[![](https://camo.githubusercontent.com/0c6081afa37d6f8bb2f855ce792a35d72d9d1d94f7f28ae18a0c5e3445c7b4ca/68747470733a2f2f6170692e7472617669732d63692e6f72672f523479474d2f5374656742727574652e737667)](https://camo.githubusercontent.com/0c6081afa37d6f8bb2f855ce792a35d72d9d1d94f7f28ae18a0c5e3445c7b4ca/68747470733a2f2f6170692e7472617669732d63692e6f72672f523479474d2f5374656742727574652e737667) [![](https://camo.githubusercontent.com/3c4f2d5218f46882973d92ad98716773a1dae7cf46082933018450ec87cc6373/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f636c6f75642f6275696c642f723479616e2f737465676272757465)](https://camo.githubusercontent.com/3c4f2d5218f46882973d92ad98716773a1dae7cf46082933018450ec87cc6373/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f636c6f75642f6275696c642f723479616e2f737465676272757465)

# stegbrute

stegbrute is a fast steganography brute force tool written in Rust using also threads to achieve a faster execution

[![](https://camo.githubusercontent.com/670705afa312cdede8eb8bb013ae8ba87f58ae4e6ca2ac08bf100607eb6e15d4/68747470733a2f2f692e696d6775722e636f6d2f7a47466f6c55742e706e67)](https://camo.githubusercontent.com/670705afa312cdede8eb8bb013ae8ba87f58ae4e6ca2ac08bf100607eb6e15d4/68747470733a2f2f692e696d6775722e636f6d2f7a47466f6c55742e706e67)

# Dependencies

Stegbrute cannot run without **steghide**!, to install steghide run :

`apt-get install -y steghide`

if you are not in a debian distribution you can download it from steghide [website](http://steghide.sourceforge.net/)

# Installation

stegbrute can be installed in different ways:

## **Cargo**

[![](https://camo.githubusercontent.com/1ffd866c83ffc6b54dc45b6aa6eaecc2af70dcebc73f932c321283986e6e042b/68747470733a2f2f636f6d6d756e6974792e6b64652e6f72672f696d616765732e636f6d6d756e6974792f7468756d622f352f35652f527573742d6c6f676f2d353132783531322d626c6b2e706e672f33303070782d527573742d6c6f676f2d353132783531322d626c6b2e706e67)](https://camo.githubusercontent.com/1ffd866c83ffc6b54dc45b6aa6eaecc2af70dcebc73f932c321283986e6e042b/68747470733a2f2f636f6d6d756e6974792e6b64652e6f72672f696d616765732e636f6d6d756e6974792f7468756d622f352f35652f527573742d6c6f676f2d353132783531322d626c6b2e706e672f33303070782d527573742d6c6f676f2d353132783531322d626c6b2e706e67)

throught [cargo](https://github.com/rust-lang/cargo) (Rust package manager)

if you don’t have cargo you can install it either from apt or by downloading Rust lang

`cargo install stegbrute`

**this will work for every platform**

## Debian distributions

[![](https://camo.githubusercontent.com/17466f06b05150cec93ca74569354c81789d6aebb9e10d02d462bb8065b05536/68747470733a2f2f63646e302e69636f6e66696e6465722e636f6d2f646174612f69636f6e732f666c61742d726f756e642d73797374656d2f3531322f64656269616e2d3531322e706e67)](https://camo.githubusercontent.com/17466f06b05150cec93ca74569354c81789d6aebb9e10d02d462bb8065b05536/68747470733a2f2f63646e302e69636f6e66696e6465722e636f6d2f646174612f69636f6e732f666c61742d726f756e642d73797374656d2f3531322f64656269616e2d3531322e706e67)

if you have ubuntu/kali or other debian distributions you can install the .deb file you find on the [releases](https://github.com/R4yGM/stegbrute/releases) section, then unpack the file and run it

```auto
wget https://github.com/R4yGM/stegbrute/releases/download/0.1.1/stegbrute_0.1.1_amd64.deb &&
dpkg --install stegbrute_0.1.1_amd64.deb

```

## **Docker**

[![](https://camo.githubusercontent.com/930fe0d3b58632547ba94527b3c822f4696574e0c0f0530812d65037393b7003/68747470733a2f2f63646e332e69636f6e66696e6465722e636f6d2f646174612f69636f6e732f6c6f676f732d616e642d6272616e64732d61646f62652f3531322f39375f446f636b65722d3531322e706e67)](https://camo.githubusercontent.com/930fe0d3b58632547ba94527b3c822f4696574e0c0f0530812d65037393b7003/68747470733a2f2f63646e332e69636f6e66696e6465722e636f6d2f646174612f69636f6e732f6c6f676f732d616e642d6272616e64732d61646f62652f3531322f39375f446f636b65722d3531322e706e67)

if you don’t have docker installed you can follow their [guide](https://docs.docker.com/engine/install/)

first you have to pull the docker image (only **4.93 MB** ) from the docker registry, you can see it [here](https://hub.docker.com/r/r4yan/stegbrute), if you don’t want to pull the image you can also clone the repository and then build the image from the Dockerfile

`docker pull r4yan/stegbrute:latest`

you can also decide to pull different images by replacing ‘latest’ with a stegbrute version, ex.

`docker pull r4yan/stegbrute:0.1.0`

if you don’t want to pull the image you can download/copy stegbrute Dockerfile that can be found [here](https://github.com/R4yGM/stegbrute/blob/main/Dockerfile) and then build the image from the Dockerfile

then if you want to launch the container you have to first create a volume to share your files to the container

`docker volume create --name stegbrute_data`

then move or copy the files you want to use for stegbrute inside the volume folder wich usually is here `/var/lib/docker/volumes/stegbrute_data/_data` by just doing

```auto
cp wordlist.txt /var/lib/docker/volumes/stegbrute_data/_data && cp file.jpg /var/lib/docker/volumes/stegbrute_data/_data

```

and now run stegbrute

```auto
docker run -v stegbrute_data:/stegbrute_data -it --rm --name stegbrute r4yan/stegbrute:latest <options>

```

replace the `<options>` with the options/arguments you want to give to stegbrute, once you did everything you don’t have to pull/build the image again only if there are new updates or features

**Always save your results inside the volume and not in the container because then the results will be deleted! you can save them by adding this option `-x /$VOLUME_NAME/results.txt` or `--extract-file /$VOLUME_NAME/results.txt`**

if you added this and did everything correctly at the end of every attack you’d find the results inside the folder `/var/lib/docker/volumes/stegbrute_data/_data`

**this will work for every platform**

## Executable

you can also download the already compiled programn and then execute it, example :

```auto
wget https://github.com/R4yGM/stegbrute/releases/download/0.1.1/stegbrute && chmod +x stegbrute
mv stegbrute /usr/local/bin/

```

# Usage

```auto
============================================================
     _________ _
    / ___|| |____  ___|__ ) _ ___ _| |____
    ___|__ / _ / _` | _ | ' __| | | |__ / _ 
     ___) | ||__/ (_| | |_) | | | |_| | || __/
    | ____/_____ | __, |____ /|_| __,_|_____ |
                   |___/

StegBrute v0.1.1 - By R4yan
https://github.com/R4yGM/StegBrute

StegBrute 0.1.1
R4yan <yessou.rayan@gmail.com>
Steganography bruteforce tool

USAGE:
    stegbrute [FLAGS] [OPTIONS] --file-name <file-name> --wordlist <wordlist>

FLAGS:
    -h, --help Prints help information
    -V, --version Prints version information
    -v, --verbose shows every try the program does

OPTIONS:
    -x, --extract-file <extract-file> the file name path where you want to write the results [default:
                                         stegbrute_results.txt]
    -f, --file-name <file-name> the file name path you want to crack
    -t, --threads <threads> number of threads to bruteforce the file [default: 3]
    -w, --wordlist <wordlist> path of the wordlist

```

for example :

[![](https://camo.githubusercontent.com/6d7b7aeb764a34c3ac475ce4d7e07de25b92959dd71c0d262da788b5c0031f98/68747470733a2f2f61736369696e656d612e6f72672f612f3559557051685937364d51453676584449564e4e794b3954372e737667)](https://asciinema.org/a/5YUpQhY76MQE6vXDIVNNyK9T7)

Options :

- `-x` or `--extract-file` with `<file_name>` will save the results of the extracted data into the file\_name, if no file is specified stegbrute will save your results inside ./stegbrute\_results.txt file
- `-t` or `--threads` with `<number_of_threads>` will launch a number of programs bruteforcing the file simultaneously, incrementing the number of threads doesn’t always mean this will run more faster it all depends on how many threads your machine can handle
- `-f` or `--file_name` with `<file_name>` the file name that stegbrute is going to attack, must be one of these supported formats : JPEG, BMP, WAV or AU
- `-w` or `--wordlist` with `<wordlist>` the file where stegbrute is going to take the passwords line by line and then start trying them to the file you want to crack, if you don’t have one you can install for example [rockyou.txt](https://github.com/praetorian-inc/Hob0Rules/blob/master/wordlists/rockyou.txt.gz)

# Benchmark

stegbrute benchmark on different wordlists using 3 threads

| Wordlist passwords | Time |
| --- | --- |
| 100 | 841.12ms |
| 1000 | 8.57s |
| 10000 | 77.79s |
| 100000 | 775.93s |

## GitHub:

> **[GitHub - R4yGM/stegbrute: Fast Steganography bruteforce tool written in Rust...](https://github.com/R4yGM/stegbrute)**
>
> Fast Steganography bruteforce tool written in Rust useful for CTF's
