With this, this API could be exploited when reading the image on the parameter endpoint : In the date that this article was written, the official Exiftool lib on CPAN (Image::ExifTool) was still vulnerable. My $informations = $exifTool -> ImageInfo("files/$generate") ĭate => $informations -> , My $path = Mojo::File -> new("files/$generate") My $generate = create_uuid_as_string(UUID_V4) My $getContent = $userAgent -> get($endpoint) -> result() My $userAgent = Mojo::UserAgent -> new() If (($endpoint) & (length($endpoint) new($endpoint) My $endpoint = $request -> param("endpoint") A toolkit for DjVu file manipulation.We will also use the tool bzz to compress our payload, then it will not be easily visible in the DjVu file. To create this valid DjVu file, we used the tool djvumake, from the djvulibre toolkit. To trigger the vulnerable function, we need to create a valid DjVu file that contains an annotation chunk with the payload that will be executed by the eval function as Perl code. This is done because this content is then use in a eval function in line 34, that executes the content as code.
EXIFTOOL KALI VERIFICATION
Path: exiftool/lib/Image/ExifTool/DjVu.pmIt’s possible to see that the vulnerable version does a verification on line 31 that is responsible to remove the attributes that uses $ (Perl variables) or (Perl arrays), to have some security sanitization. Then download the vulnerable version 12.23, and could see in the source code the vulnerable function:
EXIFTOOL KALI PATCH
The vulnerability happens when Exiftool tries to parse the DjVu filetype, more specifically the annotations field in the file structure.To analyse it, let’s first checked the fix patch in the Exiftool project on Github:
Improper neutralization of user data in the DjVu file format in ExifTool versions 7.44 and up allows arbitrary code execution when parsing the malicious image." We have a strong hint of where to begin looking for the problem, when we read the CVE description:
His article about the exploit can also be found listed in the References. We would also like to thank for the help he gave us that has contributed to make this exploit possible.
EXIFTOOL KALI MP4
Īnyone using ExifTool make sure to update to 12.24+ as CVE-2021-22204 can be triggered with a perfectly valid image (jpg, tiff, mp4 and many more) leading to arbitrary code execution! /VDoybw07f5- William Bowling April 24, 2021 The author recently wrote a detailed write-up about the process and you can find this material in the reference links. This article was made to show our study process of the CVE to make a reliable exploit for it. We choose this CVE to our study because it was found in a high impact program, and by the date that we began the process there was no public exploit available. You can listen to the audio version of this blogspot:Įxiftool is a tool and library made in Perl that extracts metadata from almost any type of file.
This vulnerability was found in the Gitlab bug bounty program, where they use this tool as dependency for their product. Recently, the researcher wcbowling found a vulnerability in the Exiftool tool, that enabled a malicious actor to perform a Remote code Execution attack.