> For the complete documentation index, see [llms.txt](https://sarpers-organization.gitbook.io/ctftricks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sarpers-organization.gitbook.io/ctftricks/_chapter-intro-6/steganography/data-extraction/trick-0392.md).

# Steghide Password Extraction

***

To extract data hidden within an image file using `steghide`, utilize the `extract` command specifying the image file. The `-sf` or `--sf` option is used to specify the stego file (the image containing the embedded data).

```bash
steghide extract -sf <image_file>
```

This command will attempt to extract embedded data. If the file was embedded with a password, you’ll be prompted to enter it.

By default, `steghide` saves the extracted data in the current directory with its original filename. To specify a different output filename for the extracted data, use the `-xf` or `--xf` option:

```bash
steghide extract -sf <image_file> -xf <output_file>
```

Alternatively, you can specify the passphrase directly using the `-p` or `--passphrase` option, which can be useful for scripting or avoiding the interactive prompt:

```bash
steghide extract -sf <image_file> -p <passphrase>
```

If you need to overwrite an existing file with the extracted data, you can force `steghide` to do so using the `-f` or `--force` option:

```bash
steghide extract -sf <image_file> --force
```
