PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Unveiling the World of Steganography: Secrecy Within Sight

Go down

Unveiling the World of Steganography: Secrecy Within Sight Empty Unveiling the World of Steganography: Secrecy Within Sight

Post by jamied_uk 15th March 2024, 12:36

Title: Unveiling the World of Steganography: Secrecy Within Sight
Introduction:
Steganography, an ancient technique dating back to ancient Greece, has experienced a modern resurgence in the digital age. While cryptography encrypts messages to keep them secret, steganography conceals the existence of the message itself. In this article, we'll delve into the captivating realm of steganography, exploring its applications on both Linux and Windows platforms. We'll provide comprehensive guidance on implementation using best practices, empowering users to safeguard their sensitive information with confidence.

Understanding Steganography:
Steganography operates by concealing information within seemingly innocuous carriers such as images, audio files, or text. By embedding data within these carriers, steganography ensures that the presence of the hidden message remains undetectable to anyone unaware of its existence.

Implementing Steganography on Linux:
On Linux systems, one of the most popular tools for steganography is Steghide. To install Steghide, execute the following command in your terminal:



[size=15]Copy code


[/size]
Code:
sudo apt install -y steghide

Once installed, you can create a steganographic file by embedding a message within an image using the following command:


[size=15]Copy code


[/size]
Code:
steghide embed -cf cover_image.jpg -ef secret_file.txt

To extract the hidden message from the steganographic file, utilize the following command:



Code:
steghide extract -sf steganographic_image.jpg

Implementing Steganography on Windows:
For Windows users, OpenStego is a powerful steganography tool. Download the installer from the official website and follow the installation instructions.

After installation, launch OpenStego and follow these steps:
[list="border: 0px solid rgb(227, 227, 227); box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-shadow: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-shadow-colored: 0 0 transparent; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; list-style: none; margin: 1.25em 0px; padding-right: 0px; padding-left: 0px; counter-reset: list-number 0; display: flex; flex-direction: column; color: rgb(236, 236, 236); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 20px; white-space-collapse: preserve; background-color: rgb(33, 33, 33);"][*]
Click on the "Hide Data" button.


[*]
Select the cover image and the secret file to embed.


[*]
Configure encryption options if desired.


[*]
Click "Next" and choose the output file location.


[*]
Finally, click "Finish" to create the steganographic image.

[/list]
To extract the hidden data from the steganographic image:
[list="border: 0px solid rgb(227, 227, 227); box-sizing: border-box; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-shadow: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-shadow-colored: 0 0 transparent; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; list-style: none; margin: 1.25em 0px; padding-right: 0px; padding-left: 0px; counter-reset: list-number 0; display: flex; flex-direction: column; color: rgb(236, 236, 236); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 20px; white-space-collapse: preserve; background-color: rgb(33, 33, 33);"][*]
Click on the "Reveal Data" button.


[*]
Select the steganographic image containing the hidden data.


[*]
Enter the password if encryption was used.


[*]
Choose the output location for the extracted file.


[*]
Click "Finish" to reveal the hidden data.

[/list]
Using Password Protection:
Enhance the security of steganographic files by utilizing password protection. When embedding a message, specify a password using the
Code:
-p
[size]
flag followed by your chosen password. For example:[/size]



Code:
steghide embed -cf cover_image.jpg -ef secret_file.txt -p your_password

Similarly, when extracting the hidden message, provide the password using the
Code:
-p
[size]
flag:[/size]
Code:
steghide extract -sf steganographic_image.jpg -p your_password

Conclusion:
Steganography offers a unique approach to concealing sensitive information, providing an additional layer of security for privacy-conscious individuals and professionals. By adhering to best practices and utilizing secure encryption methods, steganography empowers users to safeguard their confidential data effectively. Whether on Linux or Windows, incorporating steganography into your digital toolkit ensures the confidentiality of your information remains intact, hidden in plain sight.


Last edited by jamied_uk on 15th March 2024, 12:51; edited 1 time in total
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Unveiling the World of Steganography: Secrecy Within Sight Empty Re: Unveiling the World of Steganography: Secrecy Within Sight

Post by jamied_uk 15th March 2024, 12:40

Extracting Hidden Files After 



https://jnet.forumotion.com/t1349-extracting-hidden-files-with-foremost-on-linux?highlight=extracting




Code:
sudo apt install -y foremost




Code:
sudo gedit .bashrc




Code:
function unhide() {
myvar="$1"
myvar2="$2"
mkdir output
foremost -t all -i "$myvar" -o output
# Usage: unhide image.png
#https://jnet.forumotion.com/t1349-extracting-hidden-files-with-foremost-on-linux#1899
}











Code:
#!/bin/bash
#(c) J~Net 2016
# Usage ./Ext6ract.sh "filename.png"
#
myvar="$1"
myvar2="$2"
sudo apt-get install -y foremost
mkdir output
# steghide extract -sf "$myvar" -p "$myvar2"


Code:
foremost -t all -i "$myvar" -o output




Using windows to make a file to test for Extraction!

putting data into an image


Code:
copy /b pic.jpg+txt.rar final.jpg


Or


Code:
copy /b "file.jpg"+"file.zip" "newfile.jpg"

 
where pic.jpg is the original picture file, the .rar is the compressed data and final is the output file containing the original image plus compressed data!


now to extract open pic with winrar
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Unveiling the World of Steganography: Secrecy Within Sight Empty Re: Unveiling the World of Steganography: Secrecy Within Sight

Post by jamied_uk 15th March 2024, 13:53

All in 1 script that can run as a function


Code:
#!/bin/bash
# (c)J~Net 2024
# https://jnet.forumotion.com/t2003-unveiling-the-world-of-steganography-secrecy-within-sight#3089
#
# ./steg.sh
#
# Function to encrypt data into an image file
hide() {
    read -p "Enter the file you wish to hide: " data_file
    read -p "Enter the mask image: " mask_image

    # Remove single quotes from filenames
    data_file=$(sed -e "s/^'//" -e "s/'$//" <<< "$data_file")
    mask_image=$(sed -e "s/^'//" -e "s/'$//" <<< "$mask_image")

    # Create a duplicate file from the mask image with "_masked" suffix
    output_filename="${mask_image%.*}_masked.jpeg"
    cp "$mask_image" "$output_filename"

    # If password flag is enabled, prompt for password
    read -p "Do you want to add a password? (y/n): " add_password
    if [ "$add_password" =="y" ]; then
        read -s -p "Enter the password: " password
        steghide embed -cf "$output_filename" -ef "$data_file" -p "$password"
    else
        steghide embed -cf "$output_filename" -ef "$data_file"
    fi
}

# Function to extract data from an image file
unhide() {
    read -p "Enter the name of the image file containing hidden data: " image_file
    steghide extract -sf "$image_file"
}

# Main menu
while true; do
    echo "1. Encrypt data into an image file"
    echo "2. Extract data from an image file"
    echo "3. Exit"
    read -p "Choose an option: " choice

    case $choice in
        1) hide ;;
        2) unhide ;;
        3) exit ;;
        *) echo "Invalid option. Please choose again." ;;
    esac
done

jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Unveiling the World of Steganography: Secrecy Within Sight Empty Re: Unveiling the World of Steganography: Secrecy Within Sight

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum