User Tools

Site Tools


security:steganography

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
security:steganography [2011/12/29 01:57] cedricsecurity:steganography [2016/07/05 13:01] cedric
Line 1: Line 1:
 +====== Installation of Stéganô ======
 +
 +For the examples you need to install Stéganô.
 +
 +<code bash>
 +sudo pip install Stegano
 +</code>
 +
 +You can read the [[http://stegano.readthedocs.io | documentation of Stéganô]] (included in the sources).
 +
 ====== Steganography ====== ====== Steganography ======
 Steganography is the art and science of writing hidden messages. Steganography is the art and science of writing hidden messages.
Line 10: Line 20:
 We will dive into digital steganography. We will dive into digital steganography.
  
-The folowing sections will present some techniques of digital steganography.+The following sections will present some techniques of digital steganography.
  
 ===== Simple steganography art ===== ===== Simple steganography art =====
  
-In computer scinece a well known method of hiding data (message) is to concatenate these data to an archive.+In computer science a well known method of hiding data (message) is to concatenate these data to an archive.
 For example, if I want to hide a text file in a music file: For example, if I want to hide a text file in a music file:
  
Line 135: Line 145:
  
 ===== Steganalysis of the LSB method with sets ===== ===== Steganalysis of the LSB method with sets =====
-We will hide a message in a picture with the simple LSB method and with the LSP method + sets.+You must [[security:steganography#installation_of_stegano|install Stéganô]] before running these commands. 
 + 
 +First, we will hide a message in a picture with the simple LSB method and with the LSB method + sets.
  
 <code bash> <code bash>
-python ./slsb-gen.py --hide -i ../examples/pictures/Montenach.png -o ./Montenach-enc-gen.png --generator eratosthenes -f ../examples/lorem_ipsum.txt +cd stegano 
-python ./slsb.py --hide -i ../examples/pictures/Montenach.png -o ./Montenach-enc.png  -f ../examples/lorem_ipsum.txt+ 
 +# LSB with The Eratosthenes set 
 +slsb-set --hide -i ./examples/pictures/Montenach.png -o ~/Montenach-enc-gen.png --generator eratosthenes -f ./examples/lorem_ipsum.txt 
 + 
 +# LSB only 
 +$ slsb --hide -i ./examples/pictures/Montenach.png -o ~/Montenach-enc.png  -f ../examples/lorem_ipsum.txt
 </code> </code>
  
 +The selected generator //Sieve of Eratosthenes// (''--generator eratosthenes'') will generate the set of points. This set of points will be used in order to select the pixels where the informations will be hidden.
 +
 +The following will generate the corresponding steganalysed pictures (left column):
 <code bash> <code bash>
-python steganalysis-parity.py -i ./Montenach-enc.png -o ./Montenach-enc-steg.png  +# Steganalysis of the original image 
-$ python steganalysis-parity.py -i ./Montenach-enc-gen.png -o ./Montenach-enc-gen-steg.png +$ steganalysis-parity -i ../examples/pictures/Montenach.png -o ~/Montenach-steg.png 
  
-python steganalysis-parity.py -i ../examples/pictures/Montenach.png -o ./Montenach-steg.png +# Steganalysis of the image with hidden text (LSB only) 
 +$ steganalysis-parity -i ~/Montenach-enc.png -o ~/Montenach-enc-steg.png  
 + 
 +# Steganalysis of the image with hidden text (LSB + Eratosthenes) 
 +$ steganalysis-parity -i ~/Montenach-enc-gen.png -o ~/Montenach-enc-gen-steg.png 
 </code> </code>
 +
 +
 +{{:security:montenach.png?700*500|Original image}}
 +{{ :security:montenach-steg.png?700*500|(1) Steganalysis of the original image}}
 +
 +
 +{{:security:montenach-enc.png?700*500|Image with hidden text  (LSB only)}}
 +{{ :security:Montenach-enc-steg.png?700*500|(2) Steganalysis of the image with hidden text (LSB only)}}
  
 {{:security:montenach-enc-gen.png?700*500|Image with hidden text  (LSB + Eratosthenes)}} {{:security:montenach-enc-gen.png?700*500|Image with hidden text  (LSB + Eratosthenes)}}
-{{ :security:montenach-enc-gen-steg.png?700*500|Steganalysis of the image with hidden text (LSB + Eratosthenes)}}+{{ :security:montenach-enc-gen-steg.png?700*500|(3) Steganalysis of the image with hidden text (LSB + Eratosthenes)}}
  
  
 +Compare the pictures 1 and  2 and compare the pictures 1 and 3, left column.
 +
 +==== Reveal the message ====
 +<code bash>
 +$ slsb-set --reveal --generator eratosthenes -i ~/Montenach-enc-gen.png -b ~/file-gen.txt
 +$ slsb --reveal  -i ~/Montenach-enc.png -b ~/file.txt
 +$ cmp ~/file-gen.txt ~/file.txt 
 +$ cat ~/file.txt 
 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam placerat fermentum
 +lorem, at porttitor metus congue eu. Mauris vitae tell
 +.
 +.
 +.
 +$ slsb-set --reveal --generator fermat -i ~/Montenach-enc-gen.png -b ~/file.txt
 +Impossible to detect message.
 +
 +$ slsb-set --reveal --generator mersenne -i ~/Montenach-enc-gen.png -b ~/file.txt
 +Impossible to detect message.
 +</code>
  
  
security/steganography.txt · Last modified: 2021/06/27 00:36 by cedric