博客文章:https://redteamer.tips/introducing-gg-aesy-a-stegocryptor/
警告:你可能需要还原NuGet包并重启Visual Studio才能编译。如果有人知道如何解决这个问题,请私信我。
首先,我强烈建议始终使用GG-AESY的详细模式或非常详细模式。如果你不使用非托管加载器,我也建议始终指定输出文件(outfile)。
不过请注意,在非常详细模式下,特别是当你要隐藏大型有效载荷时,该模式会将字节数组打印到控制台。
话虽如此,让我们深入了解这个工具的手册。
_______ _______ ___ _______ _______.____ ____
/ _____| / _____| / \ | ____| / |\ \ / /
| | __ | | __ ______ / ^ \ | |__ | (----` \ \/ /
| | |_ | | | |_ | |______| / /_\ \ | __| \ \ \_ _/
| |__| | | |__| | / _____ \ | |____.----) | | |
\______| \______| /__/ \__\ |_______|_______/ |__|
V1.0.0 by twitter.com/Jean_Maes_1994
Encryptor and (optional) stegano
Usage:
-h, -?, --help Show Help
-e, --encrypt-only Only encrypts given payload
-d, --decrypt decryption mode
--ps, --payload-size=VALUE
only needed if extracting payload from image for
decryption
--ef, --encrypted-file=VALUE
ENCRYPTION: The outfile for encrypted data
DECRYPTION:The inputfile needed to decrypt the
payload.
-p, --payload=VALUE The path to the payload you want to encrypt
-o, --outfile=VALUE The path to the outfile where all important data
will be written to (key,iv and encrypted
payload)
-i, --image=VALUE The image file to hide the key and/or IV in,
currently only supports JPEG (JPG) format!
--ok, --offset-key=VALUE
The offset to search for the key in image (in
decimal)
--okh, --offset-key-hex=VALUE
The offset to search for the key in image (in
hex)
--oIV, --offset-IV=VALUE
The offset to search for the IV in image (in
decimal)
--oIVh, --offset-IV-hex=VALUE
The offset to search for the IV in image (in
hex)
--op, --offset-payload=VALUE
The offset to search for the payload in image
(in decimal)
--oph, --offset-payload-hex=VALUE
The offset to search for the payload in image
(in hex)
-v, --verbose write all the good stuff to console,recommended
you actually always use this.
--vv, --very-verbose prints encrypted payload array to console
-k, --key=VALUE in case you want to use your own key value!
--IV, --initialization-vector=VALUE
in case you want to use your own IV
--rk, --random-key-mode
will hide your key in a random insertion point
in the provided image, without breaking said
image. will print the offset to console
--ra, --random-all-mode
will hide both Key and IV in a random insertion
point of the image.
--ak, --append-key-mode
will hide the key at the end of the image file
--aa, --append-all-mode
will hide the key and the IV at the end of the
image file.
--ap, --append-payload-mode
will hide the payload at the end of the image
file
--rp, --random-payload-mode
will hide the payload at a random insertion
point.
--apu, --append-payload-unencrypted
appends your payload without crypto, useful for
very quick and dirty data exfil.-e 或 --encrypt-only:仅加密给定的有效载荷(-p)。如果使用详细模式,会将密钥/初始向量写入控制台;如果使用输出文件(-o)标志,会将密钥/初始向量/有效载荷写入输出文件;最后,如果使用加密文件(-ef)标志,会将字节流写入另一个文件。
-d 或 --decrypt:解密模式。你可以通过偏移量指定解密参数(如果你将密钥或密钥和初始向量隐藏在了JPEG中)。偏移量通过 offset-key(-ok)或 offset-key-hex(-okh)标志传递给程序,你可以使用“-”作为分隔符,或者直接粘贴不带分隔符的十六进制值,两者均可。IV 使用 -oIV 和 -oIVh 标志以相同方式工作。
或者,你也可以直接提供 IV 和密钥(如果它们没有隐藏在 JPEG 中),使用 key(-k)和 initialization-vector(-IV)标志。与偏移标志一样,“-”可以用作分隔符,GG-AESY 接受 ASCII 和字节值。
为了解密,你还需要指定一个加密文件(-ef)。
如果你将有效载荷隐藏在了 JPEG 中并希望解密它,你必须指定有效载荷大小(-ps),以便 GG-AESY 正确提取所有数据,避免误报或漏报。
-u 或 --unpack:从 JPEG 中解包未加密的附加有效载荷(=apu 模式)。
如果未提供密钥/初始向量,将使用随机密钥/初始向量来加密你的数据。所有隐写模式都需要你向 GG-AESY 传入一个 JPEG 图片(-i)。如果你指定了输出文件(-o)来保存有关加密的重要信息(如密钥、初始向量、有效载荷),所有隐写模式也会将注入位置写入该文件。
-rk 或 --random-key-mode:此隐写模式会将你的 AES-256 密钥隐藏在一个随机注入点。
-ra 或 --random-all-mode:此隐写模式会将你的 AES-256 密钥和初始向量都隐藏在一个随机注入点,两个注入点可能是同一个位置(这是一个随机选择过程),在这种情况下,密钥和初始向量会被连续注入。
-ak 或 --append-key-mode:此隐写模式会将 AES-256 密钥附加到 JPEG 文件的末尾。
-aa 或 --append-all-mode:此隐写模式会将 AES-256 密钥和初始向量都附加到 JPEG 文件的末尾。
-ap 或 --append-payload-mode:此隐写模式会将加密后的有效载荷字节流附加到 JPEG 文件的末尾。
-rp 或 --random-payload-mode:此隐写模式会将加密后的有效载荷字节流注入到一个随机注入点。注意:这仅在有效载荷不超过 65,535 字节(约 65KB)时有效,如果你尝试更大的有效载荷,将会抛出一个错误。不用说,这个模式实际上没什么用。
-apu 或 --append-payload-unencrypted:此隐写模式会将有效载荷字节流原样附加到 JPEG 文件的末尾。
免责声明:此工具处于早期测试版。尚未经过实战考验,因此请通过 PR 提交改进,或在出现 bug 时提交问题。不过,由于我当前的工作量,目前我无法对此工具进行积极开发。但这并不意味着我会放弃这个项目。