【安全工具】Steghide:Linux下流行的命令行隐写工具

Steghide 是 Linux 下一款命令行隐写工具,预装在 Kali Linux 中,
对于 Ubuntu,使用下面的命令安装。web

sudo apt update && sudo apt install steghide
z@ubuntu:~$ steghide --help
steghide version 0.5.1

the first argument must be one of the following:
 embed, --embed          embed data
 extract, --extract      extract data
 info, --info            display information about a cover- or stego-file
   info <filename>       display information about <filename>
 encinfo, --encinfo      display a list of supported encryption algorithms
 version, --version      display version information
 license, --license      display steghide's license
 help, --help            display this usage information

embedding options:
 -ef, --embedfile        select file to be embedded
   -ef <filename>        embed the file <filename>
 -cf, --coverfile        select cover-file
   -cf <filename>        embed into the file <filename>
 -p, --passphrase        specify passphrase
   -p <passphrase>       use <passphrase> to embed data
 -sf, --stegofile        select stego file
   -sf <filename>        write result to <filename> instead of cover-file
 -e, --encryption        select encryption parameters
   -e <a>[<m>]|<m>[<a>]  specify an encryption algorithm and/or mode
   -e none               do not encrypt data before embedding
 -z, --compress          compress data before embedding (default)
   -z <l>                 using level <l> (1 best speed...9 best compression)
 -Z, --dontcompress      do not compress data before embedding
 -K, --nochecksum        do not embed crc32 checksum of embedded data
 -N, --dontembedname     do not embed the name of the original file
 -f, --force             overwrite existing files
 -q, --quiet             suppress information messages
 -v, --verbose           display detailed information

extracting options:
 -sf, --stegofile        select stego file
   -sf <filename>        extract data from <filename>
 -p, --passphrase        specify passphrase
   -p <passphrase>       use <passphrase> to extract data
 -xf, --extractfile      select file name for extracted data
   -xf <filename>        write the extracted data to <filename>
 -f, --force             overwrite existing files
 -q, --quiet             suppress information messages
 -v, --verbose           display detailed information

options for the info command:
 -p, --passphrase        specify passphrase
   -p <passphrase>       use <passphrase> to get info about embedded data

To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt
To extract embedded data from stg.jpg: steghide extract -sf stg.jpg

小实验:用 Steghide 制做图种


实验材料shell

  • Ubuntu + Steghide
  • 一张后缀名为 jpg 的图片和须要隐写的文件

在这里插入图片描述

将 secret.txt 的信息嵌入到 moon.jpg 里面,合成图种(内涵图)ubuntu

z@ubuntu:~$ steghide embed -cf moon.jpg -ef secret.txt

在这里插入图片描述
查看图种 moon.jpg 的内涵信息安全

z@ubuntu:~$ steghide info moon.jpg

在这里插入图片描述
处于安全考虑将图种和原始秘密文件分开保存(或直接删除原始文件,只保留图种),为了真实模拟我已将原始秘密文件删除。
在须要读取秘密文件的时候,使用下面的命令将原是秘密文件取出。ide

z@ubuntu:~$ steghide extract -sf moon.jpg

在这里插入图片描述