Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
steganography — 简单C++图像隐写工具,使用最低有效位编码加密并将文件隐藏到图像中。 | Kitploit
工具/GitHubGitHub/7thsamurai/steganography
加密/解密工具数据泄露隐写术密码学
GitHub7thsamurai/steganography

steganography

简单C++图像隐写工具,使用最低有效位编码加密并将文件隐藏到图像中。

查看仓库
1.1k779419天前Kitploit 审核通过
分享

图像隐写工具

简单的 C++ 加密与隐写工具,使用密码保护加密来保护文件内容,然后通过最低有效位编码将其嵌入图像的像素数据中。适用于 Linux、MacOS 和 Windows 系统。

编码

$ ./steganography encode -i data/orig.png -e data/jekyll_and_hyde.zip -o output.png
Password: 1234
* Image size: 640x426 pixels
* Encoding level: Low (Default)
* Max embed size: 132.38 KiB
* Embed size: 61.77 KiB
* Encrypted embed size: 61.78 KiB
* Generated CRC32 checksum
* Generated encryption key with PBKDF2-HMAC-SHA-256 (20000 rounds)
* Encrypted embed with AES-256-CBC
* Embedded jekyll_and_hyde.zip into image
* Successfully wrote to output.png

原始图像

包含整本书《Dr Jekyll and Mr Hyde》全部内容的嵌入 ZIP 的图像:

带嵌入内容的图像

解码

$ ./steganography decode -i output.png -o "out - jekyll_and_hyde.zip"
Password: 1234
* Image size: 640x426 pixels
* Generated decryption key with PBKDF2-HMAC-SHA-256 (20000 rounds)
* Successfully decrypted header
* File signatures match
* Detected embed jekyll_and_hyde.zip
* Encoding level: Low (Default)
* Encrypted embed size: 61.78 KiB
* Successfully decrypted the embed
* Decrypted embed size: 61.77 KiB
* CRC32 checksum matches
* Successfully wrote to out - jekyll_and_hyde.zip

构建

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make -j 4

用法

Usage: steganography [-h] {decode,encode}

Optional arguments:
  -h, --help   	shows help message and exits
  -v, --version	prints version information and exits

Subcommands:
  decode        Decodes and extracts an embed-file from an image
  encode        Encodes an embed-file into an image

编码

Usage: encode [-h] --input VAR --output VAR --embed VAR [--passwd VAR]

Encodes an embed-file into an image

Optional arguments:
  -h, --help   	shows help message and exits
  -v, --version	prints version information and exits
  -i, --input  	specify the input image. [required]
  -o, --output 	specify the output image. [required]
  -e, --embed  	specify the file to embed. [required]
  -p, --passwd 	specify the encryption password.

解码

Usage: decode [-h] --input VAR [--output VAR] [--passwd VAR]

Decodes and extracts an embed-file from an image

Optional arguments:
  -h, --help   	shows help message and exits
  -v, --version	prints version information and exits
  -i, --input  	specify the input image. [required]
  -o, --output 	specify the output file. [default: ""]
  -p, --passwd 	specify the encryption password.

工作原理

编码

该程序首先通过读取 /dev/urandom 中的二进制数据,随机生成一个 128 位密码盐 和一个 128 位 AES 初始化向量。 然后,它将该 密码盐 作为参数,通过对用户输入的字符串使用 PBKDF2-HMAC-SHA-256 来生成加密密钥。 接着计算待嵌入文件的 CRC32 哈希值,并将其存储在头部中,作为数据有效性的校验和。 随后,它使用 PKCS #7 算法对待嵌入文件的二进制数据进行填充,然后使用先前生成的 初始化向量,以 CBC 模式 下的 AES-256 实际加密头部和填充后的数据。 现在,数据通过首先选取一个随机偏移量,然后遍历数据的每一位并将其存储在实际的图像像素数据中,从而真正编码到图像内部,这是通过设置每个像素每个通道字节的 最低有效位 来实现的。

解码

解码过程与上述编码过程完全相同,只是反向进行。 唯一的区别在于,解码时,程序在尝试提取并解密数据后,会比较头部部分中的一些信息,以尝试验证提取过程。所比较的头部字段为:本程序自定义的 4 字节文件签名,以及解密数据的 CRC32 哈希值。 如果这些字段中有任何一个与其正确值不匹配,解密过程将失败。这仅会在以下情况下发生:你尝试解密的文件实际上不包含嵌入数据、你输入的密码错误,或者图像文件以某种方式损坏。

检测

虽然检测图像中是否嵌入了数据是一项简单的任务,但理论上无法得知是本程序所为,并且理论上在不知道密码的情况下,应该没有已知的方法可以解密数据,除非在此过程中花费数百万年。

免责声明

请勿使用本程序加密和隐藏你希望远离窥探的重要数据。这只是一个我出于兴趣制作的简单概念验证程序。 我不是密码学家,只是一个爱好者,使用风险自负。

版权

本软件根据 MIT 许可证授权。版权所有 © 2022 Zach Collins

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    524
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    478
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    357
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    317
  • 5

    estorides

    grisuno/estorides

    并行聚合 99+ 个免费 OSINT 来源,将实体解析为知识图谱,并借助 LLM 辅助分析导出 STIX 2.1、MISP 或 GraphML。

    305
  • 6

    opencti

    opencti-platform/opencti

    开放式网络威胁情报平台

    275

探索所有工具

浏览我们的工具集合

查看所有工具 →