### 简要描述:
发现最近Hdwiki的洞 官方都只给2Rank? 分就不能高一点?
牛逼。
虽然这样我还是继续发。
### 详细说明:
在control/pms.php中
```
function docheckrecipient(){
$sendto = $this->post['sendto'];
if (WIKI_CHARSET == 'GBK'){
$sendto = string::hiconv($sendto,'GBK','UTF-8',1);
}
$send = explode(',',$sendto);
if(count($send)>10){
$this->message($this->view->lang['fullsend'],'',2);
}
$checkreturn = $_ENV['pms']->check_recipient($sendto,0);
$message = ($checkreturn === true)? 'OK' : ($checkreturn.' '.$this->view->lang['loginTip3']);
$this->message($message,'',2);
}
```
```
$sendto = $this->post['sendto'];
if (WIKI_CHARSET == 'GBK'){
$sendto = string::hiconv($sendto,'GBK','UTF-8',1);
}
```
虽然转义 但是这里
```
function hiconv($str,$to='',$from='',$force=false) {
if (empty($str)) return $str;
if(!preg_match( '/[\x80-\xff]/', $str)) return $str; // is contain chinese char
if(empty($to)){
if ('utf-8' == strtolower(WIKI_CHARSET)){
return $str;
}
$to=WIKI_CHARSET;
}
if(empty($from)){
$from = ('gbk'==strtolower($to)) ? 'utf-8':'gbk';
}
$to=strtolower($to);
$from=strtolower($from);
//$isutf8=preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $str );
$re = strlen($str) > 6 ? '/([\xe0-\xef][\x80-\xbf]{2}){2}/' : '/[\xe0-\xef][\x80-\xbf]{2}/';
$isutf8 = preg_match($re, $str);
//$force = (substr($to, 0, 3) == 'utf') ? true : $force;
if(!$force && $isutf8 && $to=='utf-8' ) return $str;
if(!$force && !$isutf8 && $to=='gbk' ) return $str;
if (function_exists('iconv')){
$str = iconv($from, $to, $str);
```
只要force为true的话 就会iconv。
然后直接利用宽字节来注入。
```
function check_recipient($sendto, $type){
$userinfos = array();
$send = array_unique(explode(',', $sendto));
sort($send);
$num = count($send);
$sendto = str_replace(",", "','", $sendto);
$query = $this->db->query("SELECT username,uid FROM ".DB_TABLEPRE."user WHERE username IN ('$sendto')");
```
这里由于逗号会被替换 就放弃逗号把。
### 漏洞证明:
[<img src="https://images.seebug.org/upload/201404/06114914837124ea59d446de3b33946cb0d29bd7.jpg" alt="h1.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/06114914837124ea59d446de3b33946cb0d29bd7.jpg)
由于这里没回显 我就直接把结果输出一些把 至少能说明是可以注入的。
盲注。 就不用多说了。
暂无评论