CleasbyCode/jdvrif_rust

GitHub: CleasbyCode/jdvrif_rust

一款基于 JPG 应用段隐写技术的文件隐藏与提取工具,支持直接发布到多个社交平台。

Stars: 0 | Forks: 0

# jdvrif_rust ***这是我的 C++ 隐写术工具 [***jdvrif***](https://github.com/CleasbyCode/jdvrif) 的实验性 Rust 移植版*** ***jdvrif*** 是一个快速、易于使用的隐写术命令行工具,用于通过 **JPG** 图像隐藏和提取任何文件类型。 此外还有一个 [***Web 版本***](https://cleasbycode.co.uk/jdvrif/app/),你可以立即使用,作为下载和编译 CLI 源代码的便捷替代方案。Web 文件上传限制为 **20MB**。 ![Demo Image](https://github.com/CleasbyCode/jdvrif_rust/blob/main/demo_image/jrif_661748.jpg) *演示图像:**“隐藏之地”** / ***PIN:5608171548286279209**** 与在载体图像像素中隐藏数据的常见隐写术方法([***LSB***](https://ctf101.org/forensics/what-is-stegonagraphy/))不同,***jdvrif*** 将文件隐藏在 ***JPG*** 图像的 ***应用段*** 内。 你可以隐藏最大 ***2GB*** 的任何文件类型,尽管兼容站点(*如下所列*)有其自己的 ***小得多*** 的大小限制和 *其他要求。 为了增加存储容量和更好的安全性,你嵌入的数据文件使用 ***zlib*** 压缩,并使用 ***libsodium*** 加密库进行加密。 ***jdvrif*** 部分源自安全研究员 ***[David Buchanan](https://www.da.vidbuchanan.co.uk/)*** 的 ***[实现技术](https://www.vice.com/en/article/bj4wxm/tiny-picture-twitter-complete-works-of-shakespeare-steganography)***。 ## 用法 (Linux) ``` $ sudo apt install libsodium-dev libturbojpeg0-dev pkg-config $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh $ cargo build --release Build complete. Binary at 'target/release/jdvrif-rs'. $ sudo cp target/release/jdvrif-rs /usr/bin $ jdvrif-rs Usage: jdvrif-rs conceal [-b|-r] jdvrif-rs recover jdvrif-rs --info $ jdvrif-rs conceal your_cover_image.jpg your_secret_file.doc Platform compatibility for output image:- ✓ X-Twitter ✓ Tumblr ✓ Mastodon ✓ Pixelfed ✓ PostImage ✓ ImgBB ✓ ImgPile ✓ Flickr Saved "file-embedded" JPG image: jrif_129462.jpg (143029 bytes). Recovery PIN: [***2166776980318349924***] Important: Keep your PIN safe, so that you can extract the hidden file. Complete! $ jdvrif-rs recover jrif_129462.jpg PIN: ******************* Extracted hidden file: your_secret_file.doc (6165 bytes). Complete! Please check your file. ``` jdvrif ***mode*** 参数: ***conceal*** - 压缩、加密并将你的秘密数据文件嵌入到 ***JPG*** 载体图像中。 ***recover*** - 从 ***JPG*** 载体图像中解密、解压并提取隐藏的数据文件。 jdvrif ***conceal*** 模式 ***platform*** 选项: "***-b***" 要创建用于在 ***Bluesky*** 平台上发布的兼容“*文件嵌入*” ***JPG*** 图像,你必须在 ***conceal*** 模式下使用 ***-b*** 选项。 ``` $ jdvrif-rs conceal -b my_image.jpg hidden.doc ``` 这些图像仅兼容在 ***Bluesky*** 上发布。如果发布在不同的平台上,你嵌入的数据文件将被移除。 你还需使用 Python 脚本 ***“bsky_post.py”***(位于仓库 ***src*** 文件夹中)将图像发布到 ***Bluesky***。 如果你通过浏览器站点或移动应用程序将图像发布到 ***Bluesky***,它将无法工作。 要使用该脚本,你需要从你的 ***Bluesky*** 账户创建一个 [***应用密码***](https://bsky.app/settings/app-passwords)。 以下是 ***bsky_post.py*** 脚本的一些基本用法示例。 发布到你的 bsky 个人资料的标准图像帖子: ``` $ python3 bsky_post.py --handle you.bsky.social --password xxxx-xxxx-xxxx-xxxx --image your_image.jpg --alt-text "alt-text here (optional)" "standard post text here (required)" ``` 如果你想要发布多张图片(最多 4 张): ``` $ python3 bsky_post.py --handle you.bsky.social --password xxxx-xxxx-xxxx-xxxx --image img1.jpg --image img2.jpg --alt-text "alt_here" "standard post text..." ``` 如果你想要发布一张图片作为对另一个话题的回复: ``` $ python3 bsky_post.py --handle you.bsky.social --password xxxx-xxxx-xxxx-xxxx --image your_image.jpg --alt-text "alt_here" --reply-to https://bsky.app/profile/someone.bsky.social/post/8m2tgw6cgi23i "standard post text..." ``` https://github.com/user-attachments/assets/8d21cdbb-30f0-424c-aeb8-bcacca8c4255 https://github.com/user-attachments/assets/b2cc33ff-b2c2-46c2-960b-f7b9ba65223d ## 兼容平台 *发布大小限制由 ***载体图像*** + ***压缩数据文件*** 的 ***组合*** 大小衡量:* ● ***Flickr*** (**200MB**), ***ImgPile*** (**100MB**), ***ImgBB*** (**32MB**), ● ***PostImage*** (**32MB**), ***Reddit*** (**20MB** | ***-r 选项***), ***Pixelfed*** (**15MB**). *大小限制 ***仅*** 由 ***压缩数据文件大小*** 衡量:* ● ***Mastodon*** (**~6MB**), ***Tumblr*** (**~64KB**), ***X-Twitter*** (**~10KB**). 例如,对于 ***Mastodon***,如果你的载体图像是 **1MB**,你仍然可以嵌入最大 **~6MB** 大小限制的数据文件。 **其他:***Bluesky*** 平台对 ***载体图像*** 和 ***压缩数据文件*** 有 ***单独的*** 大小限制:** ● ***Bluesky*** (***-b 选项***)。载体图像大小限制 (**800KB**)。压缩数据文件大小限制 (**~171KB**)。 ● 需要 "***bsky_post.py***" 脚本才能在 ***Bluesky*** 上发布图像。*更多信息在页面下方。* 对于像 ***X-Twitter*** 和 ***Tumblr*** 这样具有较小大小限制的平台,你可能需要关注压缩效果好的数据,例如文本文件等。 https://github.com/user-attachments/assets/b4c72ea7-40e3-49b0-89aa-ae2dd8ccccb9 "***-r***" - 要创建用于在 ***Reddit*** 平台上发布的兼容“*文件嵌入*” ***JPG*** 图像,你必须在 ***conceal*** 模式下使用 ***-r*** 选项。 ``` $ jdvrif-rs conceal -r my_image.jpg secret.mp3 ``` 从 ***Reddit*** 站点,选择“***创建帖子***”,然后选择“***图片与视频***”标签,以附加并发布你的 ***JPG*** 图像。 这些图像仅兼容在 ***Reddit*** 上发布。如果发布在不同的平台上,你嵌入的数据文件将被移除。 要从 ***X-Twitter*** 或 ***Reddit*** 正确下载图像,请在保存前单击帖子中的图像以将其完全展开。 https://github.com/user-attachments/assets/f56f54bb-658f-4b0e-a2f3-7d3428333304 ## 第三方库 本项目使用了以下第三方库: - **libsodium**:用于加密函数。 - [**许可证**](https://github.com/jedisct1/libsodium/blob/master/LICENSE) - 版权所有 (C) 2013-2025 Frank Denis (github@pureftpd.org) - libjpeg-turbo(参见 [***LICENSE***](https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md) 文件) - {本软件部分基于 Independent JPEG Group 的工作。} - 版权所有 (C) 2009-2024 D. R. Commander。保留所有权利。 - 版权所有 (C) 2015 Viktor Szathmáry。保留所有权利。 - **zlib**:通用压缩库 - 许可证:zlib/libpng 许可证(参见 [***LICENSE***](https://github.com/madler/zlib/blob/develop/LICENSE) 文件) - 版权所有 (C) 1995-2024 Jean-loup Gailly 和 Mark Adler
标签:CTF工具, JPG图像, libsodium, meg, Rust, Steganography, zlib压缩, 信息安全, 免杀技术, 加密, 可视化界面, 数字取证, 数据伪装, 数据隐藏, 文件嵌入, 暴力破解检测, 漏洞扫描器, 漏洞搜索, 网络安全, 网络流量审计, 自动化脚本, 通知系统, 通知系统, 隐写术, 隐私保护