### Executable and Installation Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Defines the main executable and installation target. ```cmake add_executable(stegseek main.cc) install(TARGETS stegseek EXPORT stegseek DESTINATION bin) ``` -------------------------------- ### Install build tools on Ubuntu Source: https://github.com/rickdejager/stegseek/blob/master/BUILD.md Installs the essential compilation tools required to build the project. ```bash sudo apt install git build-essential cmake ``` -------------------------------- ### Build and install Stegseek Source: https://github.com/rickdejager/stegseek/blob/master/BUILD.md Compiles the project using CMake and installs the resulting binary. ```bash cd stegseek mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make sudo make install ``` -------------------------------- ### Install project dependencies on Ubuntu Source: https://github.com/rickdejager/stegseek/blob/master/BUILD.md Installs the required libraries for Stegseek, including mhash, mcrypt, jpeg, and zlib. ```bash sudo apt install libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev ``` -------------------------------- ### Build Stegseek from Source Source: https://context7.com/rickdejager/stegseek/llms.txt Compile Stegseek from source on Linux using CMake. This process includes installing dependencies, cloning the repository, building the optimized binary, and installing it system-wide. ```bash # Install dependencies on Ubuntu/Debian sudo apt install libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev git build-essential cmake ``` ```bash # Clone the repository git clone https://github.com/RickdeJager/stegseek.git cd stegseek ``` ```bash # Build with CMake mkdir -p build && cd build cmake -DCMAKE_BUILD_TYPE=Release .. make ``` ```bash # Install system-wide sudo make install ``` ```bash # Verify installation stegseek --help ``` ```bash # Or install from .deb package (Ubuntu/Debian) wget https://github.com/RickdeJager/stegseek/releases/download/v0.6/stegseek_0.6-1.deb sudo apt install ./stegseek_0.6-1.deb ``` -------------------------------- ### Library and Include Configuration Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Creates the library and sets include directories for dependencies. ```cmake add_library(stegseek_lib ${sources} ${headers}) find_path(MCRYPT_INCLUDE_PATH mcrypt.h) target_include_directories(stegseek_lib PUBLIC ${MCRYPT_INCLUDE_PATH}) ``` -------------------------------- ### Define Build Definitions Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Sets preprocessor definitions for system headers and versioning. ```cmake add_definitions(-DHAVE_DEV_URANDOM) add_definitions(-DHAVE_DEV_RANDOM) add_definitions(-DHAVE_TERMIOS_H) add_definitions(-DSTEGSEEK_VERSION="0.6") add_definitions(-DSTEGHIDE_VERSION="0.5.1") ``` -------------------------------- ### Stegseek Help Command Source: https://github.com/rickdejager/stegseek/blob/master/README.md Display the full list of available arguments and commands for Stegseek. Use '-v' for more detailed information, including steghide's help. ```bash stegseek --help ``` ```bash stegseek --help -v ``` -------------------------------- ### Define Source Files Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Lists the source files required for the project build. ```cmake set (sources "Arg.cc" "Arguments.cc" "AssertionFailed.cc" "AuFile.cc" "AuSampleValues.cc" "BFSAPHeuristic.cc" "BinaryIO.cc" "BitString.cc" "BmpFile.cc" "BmpPaletteSampleValue.cc" "BmpRGBSampleValue.cc" "BmpSampleValue.cc" "Cracker.cc" "CvrStgFile.cc" "DFSAPHeuristic.cc" "DMDConstructionHeuristic.cc" "Edge.cc" "EdgeIterator.cc" "EmbData.cc" "Embedder.cc" "EncryptionAlgorithm.cc" "EncryptionMode.cc" "error.cc" "Extractor.cc" "Graph.cc" "JpegFile.cc" "JpegSampleValue.cc" "MatchingAlgorithm.cc" "Matching.cc" "MCryptPP.cc" "MHashKeyGen.cc" "MHashPP.cc" "msg.cc" "PasswordCracker.cc" "ProgressOutput.cc" "PseudoRandomSource.cc" "RandomSource.cc" "RGBTriple.cc" "SampleValueAdjacencyList.cc" "SampleValue.cc" "SeedCracker.cc" "Selector.cc" "Session.cc" "SMDConstructionHeuristic.cc" "SteghideError.cc" "Terminal.cc" "Utils.cc" "Vertex.cc" "WavChunk.cc" "WavChunkHeader.cc" "WavChunkUnused.cc" "WavFile.cc" "WavFormatChunk.cc" "WavPCMSampleValue.cc" "WKSConstructionHeuristic.cc" ) ``` -------------------------------- ### Accessibility and Output Options Source: https://context7.com/rickdejager/stegseek/llms.txt Configure Stegseek for screen readers and customize output for logging or scripting. Options include accessible mode, disabling colored output, and redirecting all output. ```bash # Enable screen reader friendly output stegseek secret.jpg rockyou.txt --accessible ``` ```bash # Disable colored output (for logging/piping) stegseek secret.jpg rockyou.txt --nocolor ``` ```bash # Combine quiet mode with exit codes for scripting stegseek secret.jpg rockyou.txt -q && echo "Password found" || echo "No password found" ``` ```bash # Redirect all output to file stegseek secret.jpg rockyou.txt > crack_results.txt 2>&1 ``` -------------------------------- ### Run Stegseek using Docker Source: https://github.com/rickdejager/stegseek/blob/master/README.md Execute Stegseek within a Docker container. Mount the current working directory to access stego files and wordlists. ```bash docker run --rm -it -v "$(pwd):/steg" rickdejager/stegseek [stegofile.jpg] [wordlist.txt] ``` -------------------------------- ### Link Dependencies Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Locates and links required system libraries to the executable. ```cmake find_library(MCRYPT_LIBRARY mcrypt) find_library(MHASH_LIBRARY mhash) find_library(JPEG_LIBRARY jpeg) target_link_libraries(stegseek PRIVATE stegseek_lib PUBLIC -lpthread -lz ${MCRYPT_LIBRARY} ${MHASH_LIBRARY} ${JPEG_LIBRARY}) ``` -------------------------------- ### Stegseek Help Output Source: https://github.com/rickdejager/stegseek/blob/master/README.md The detailed help output for Stegseek, listing commands, positional arguments, and keyword arguments with their descriptions. ```text === StegSeek Help === To crack a stegofile: stegseek [stegofile.jpg] [wordlist.txt] Commands: --crack Crack a stego file using a wordlist. This is the default mode. --seed Crack a stego file by attempting all embedding patterns. This mode can be used to detect a file encoded by steghide. In case the file was encoded without encryption, this mode will even recover the embedded file. Positional arguments: --crack [stegofile.jpg] [wordlist.txt] [output.txt] --seed [stegofile.jpg] [output.txt] Keyword arguments: -sf, --stegofile select stego file -wl, --wordlist select the wordlist file -xf, --extractfile select file name for extracted data -t, --threads set the number of threads. Defaults to the number of cores. -f, --force overwrite existing files -v, --verbose display detailed information -q, --quiet hide performance metrics (can improve performance) -s, --skipdefault don't add guesses to the wordlist (empty password, filename, ...) -n, --nocolor disable colors in output -c, --continue continue cracking after a result has been found. (A stego file might contain multiple embedded files) -a, --accessible simplify the output to be more screen reader friendly Use "stegseek --help -v" to include steghide's help. ``` -------------------------------- ### Specify Custom Output File Source: https://context7.com/rickdejager/stegseek/llms.txt Cracks steghide-encrypted files and saves the extracted data to a specified output file. ```bash stegseek secret.jpg rockyou.txt -xf extracted_data.txt ``` -------------------------------- ### Clone the Stegseek repository Source: https://github.com/rickdejager/stegseek/blob/master/BUILD.md Downloads the source code from the official GitHub repository. ```bash git clone https://github.com/RickdeJager/stegseek.git ``` -------------------------------- ### Include Headers Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Globally includes all header files in the current directory. ```cmake file(GLOB headers "*.h" ) ``` -------------------------------- ### Continue Cracking After First Result Source: https://context7.com/rickdejager/stegseek/llms.txt Continues the cracking process even after finding the first successful passphrase, useful for files with multiple hidden files. ```bash stegseek secret.jpg rockyou.txt --continue ``` -------------------------------- ### Release Build Flags Source: https://github.com/rickdejager/stegseek/blob/master/src/CMakeLists.txt Sets optimization and stripping flags for release builds. ```cmake set(CMAKE_CXX_FLAGS_RELEASE "-O2") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") ``` -------------------------------- ### Seed Cracking with Custom Output Source: https://context7.com/rickdejager/stegseek/llms.txt Performs seed cracking and saves any extracted data to a specified output file. ```bash stegseek --seed challenge.jpg -xf recovered.txt ``` -------------------------------- ### Analyze Stego File Information Source: https://context7.com/rickdejager/stegseek/llms.txt Use the info command to analyze a stego file, determining if it contains hidden data and showing capacity information. This command also validates the file format. ```bash # Get file information and capacity stegseek --info cover.jpg ``` ```bash # Check multiple files for steghide content (scripting) for file in *.jpg; do echo "Checking $file..." if stegseek --seed "$file" -q 2>/dev/null; then echo " -> Contains steghide data!" else echo " -> No steghide data found" fi done ``` ```bash # Quick detection with exit code checking stegseek --seed suspicious.jpg -q if [ $? -eq 0 ]; then echo "Steghide content detected" fi ``` -------------------------------- ### Continue Seed Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Continues seed cracking to find multiple embedded files within the same cover file. ```bash stegseek --seed challenge.jpg --continue ``` -------------------------------- ### Wordlist Cracking with Explicit Flags Source: https://context7.com/rickdejager/stegseek/llms.txt Performs wordlist cracking using explicit command-line flags for clarity. ```bash stegseek --crack -sf secret.jpg -wl rockyou.txt -xf output.txt ``` -------------------------------- ### Embed Data with Stegseek Source: https://github.com/rickdejager/stegseek/blob/master/README.md Use this command to embed data into a cover image. Optionally specify an output stegofile name. ```bash stegseek --embed [] ``` -------------------------------- ### Stegseek Cracking Command Source: https://github.com/rickdejager/stegseek/blob/master/README.md Use this command to crack a steghide file using a provided wordlist. This is the default mode for Stegseek. ```bash stegseek [stegofile.jpg] [wordlist.txt] ``` -------------------------------- ### Embed Data with Explicit Arguments Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image using explicit command-line arguments for input and output files, and password. ```bash stegseek --embed -ef secret.txt -cf cover.jpg -sf stego.jpg -p "password123" ``` -------------------------------- ### Embed Data from Standard Input Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image by reading the secret data from standard input. ```bash cat secret.txt | stegseek --embed -cf cover.jpg -sf output.jpg -p "password" ``` -------------------------------- ### Multi-threaded Wordlist Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Accelerates wordlist cracking by utilizing multiple threads for password attempts. ```bash stegseek secret.jpg rockyou.txt -t 16 ``` -------------------------------- ### Basic Wordlist Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Cracks steghide-encrypted files using a wordlist. Extracted data is saved to a file named '[filename].out'. ```bash stegseek secret.jpg /usr/share/wordlists/rockyou.txt ``` -------------------------------- ### Embed Data With Compression Disabled Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image with compression disabled, potentially speeding up the embedding process. ```bash stegseek --embed secret.txt cover.jpg output.jpg -p "password" -Z ``` -------------------------------- ### Stegseek Detection and Passwordless Extraction Source: https://github.com/rickdejager/stegseek/blob/master/README.md This command is used to detect steghide content and extract unencrypted data without a password. It attempts to bruteforce the limited number of seeds used by steghide's random number generator. ```bash stegseek --seed [stegofile.jpg] ``` -------------------------------- ### Verbose Mode Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Enables verbose output to display detailed processing information during cracking. ```bash stegseek secret.jpg rockyou.txt -v ``` -------------------------------- ### Docker Usage for Stegseek Operations Source: https://context7.com/rickdejager/stegseek/llms.txt Utilize official Stegseek Docker images for various operations like wordlist cracking, seed cracking, data extraction, and embedding. The current directory is mounted to /steg for file access. ```bash # Pull the official Docker image docker pull rickdejager/stegseek ``` ```bash # Basic wordlist cracking via Docker docker run --rm -it -v "$(pwd):/steg" rickdejager/stegseek secret.jpg rockyou.txt ``` ```bash # Seed cracking mode via Docker docker run --rm -it -v "$(pwd):/steg" rickdejager/stegseek --seed challenge.jpg ``` ```bash # Extract with known password via Docker docker run --rm -it -v "$(pwd):/steg" rickdejager/stegseek --extract stego.jpg -p "password" ``` ```bash # Embed data via Docker docker run --rm -it -v "$(pwd):/steg" rickdejager/stegseek --embed secret.txt cover.jpg output.jpg -p "password" ``` ```bash # Show help via Docker docker run --rm rickdejager/stegseek --help ``` ```bash # Build custom Docker image from source docker build -t stegseek-custom . docker run --rm -it -v "$(pwd):/steg" stegseek-custom secret.jpg wordlist.txt ``` -------------------------------- ### Embed Data with Password Protection Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image with password protection using AES-256 encryption. ```bash stegseek --embed secret.txt cover.jpg stego_output.jpg -p "mypassword" ``` -------------------------------- ### Seed Cracking for Steghide Detection Source: https://context7.com/rickdejager/stegseek/llms.txt Detects steghide content using seed cracking and attempts passwordless extraction if data is unencrypted. ```bash stegseek --seed challenge.jpg ``` -------------------------------- ### Force Overwrite Output Files Source: https://context7.com/rickdejager/stegseek/llms.txt Forces Stegseek to overwrite existing output files without prompting for confirmation. ```bash stegseek secret.jpg rockyou.txt -f ``` -------------------------------- ### Quiet Mode Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Runs Stegseek in quiet mode, suppressing progress metrics for use in scripts. ```bash stegseek secret.jpg rockyou.txt -q ``` -------------------------------- ### Embed Data with AES-256 Encryption Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image using AES-256 encryption, overriding the default rijndael-128. ```bash stegseek --embed secret.txt cover.jpg output.jpg -p "password" -e rijndael-256 ``` -------------------------------- ### Stegseek Extraction Performance Source: https://github.com/rickdejager/stegseek/blob/master/README.md This output shows a successful extraction of hidden data using Stegseek, highlighting the time taken for the operation. ```bash > StegSeek 0.6 - https://github.com/RickdeJager/StegSeek [i] Found passphrase: " 1" [i] Original filename: "secret.txt". [i] Extracting to "7spaces1.jpg.out". real 0m1,211s user 0m9,488s sys 0m0,084s ``` -------------------------------- ### Configure C++ Compiler Flags with CMake Source: https://github.com/rickdejager/stegseek/blob/master/CMakeLists.txt Sets compiler flags for GNU and AppleClang compilers. For GNU, it enables Wall and Wno-long-long warnings. For AppleClang, it enforces C++17 standard. ```cmake cmake_minimum_required(VERSION 3.5) project(stegseek VERSION 0.6) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Update if necessary set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # enforce modern C++, will not compile otherwise set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17") endif() add_subdirectory("src") # Testing only available if this is the main app if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) enable_testing() add_subdirectory(tests/steghide) endif() ``` -------------------------------- ### Quiet Mode Seed Cracking Source: https://context7.com/rickdejager/stegseek/llms.txt Executes seed cracking in quiet mode, suitable for scripting and automation. ```bash stegseek --seed challenge.jpg -q ``` -------------------------------- ### Skip Default Guesses Source: https://context7.com/rickdejager/stegseek/llms.txt Skips Stegseek's default password guesses, such as an empty password or filename variations. ```bash stegseek secret.jpg rockyou.txt --skipdefault ``` -------------------------------- ### Embed Data Without Original Filename Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image without storing the original filename, which can save space. ```bash stegseek --embed secret.txt cover.jpg output.jpg -p "password" -N ``` -------------------------------- ### Extract Data with Stegseek Source: https://github.com/rickdejager/stegseek/blob/master/README.md Use this command to extract hidden data from a stegofile. Optionally specify an output file name for the extracted data. ```bash stegseek --extract [] ``` -------------------------------- ### Embed Data Without Encryption Source: https://context7.com/rickdejager/stegseek/llms.txt Embeds data into a cover image without any encryption. This data is vulnerable to seed cracking. ```bash stegseek --embed secret.txt cover.jpg output.jpg -p "password" -e none ``` -------------------------------- ### Force Overwrite Stego File Source: https://context7.com/rickdejager/stegseek/llms.txt Forces Stegseek to overwrite an existing stego file during the embedding process without prompting. ```bash stegseek --embed secret.txt cover.jpg output.jpg -p "password" -f ``` -------------------------------- ### Extract Hidden Data with Known Password Source: https://context7.com/rickdejager/stegseek/llms.txt Use the extract command with a known password to retrieve hidden data. Options include specifying an output file, piping to stdout, verbose output, and forcing overwrite. ```bash # Extract hidden data using known password stegseek --extract stego.jpg -p "mypassword" ``` ```bash # Extract to specific output file stegseek --extract stego.jpg -xf recovered_secret.txt -p "password123" ``` ```bash # Extract to stdout (for piping) stegseek --extract stego.jpg -xf "" -p "password" | base64 ``` ```bash # Verbose extraction showing all steps stegseek --extract stego.jpg -p "password" -v ``` ```bash # Force overwrite existing output file stegseek --extract stego.jpg -p "password" -f -xf output.txt ``` -------------------------------- ### Stegseek Embed Command Source: https://github.com/rickdejager/stegseek/blob/master/README.md Stegseek can embed data using a command format similar to the original steghide. This command embeds data into a file. ```bash stegseek --embed [...] ``` -------------------------------- ### Stegseek Extract Command Source: https://github.com/rickdejager/stegseek/blob/master/README.md Stegseek can extract data using a command format similar to the original steghide. This command extracts data from a file. ```bash stegseek --extract [...] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.