74cms 逻辑漏洞导致sql注入

2014-05-19T00:00:00
ID SSV:94106
Type seebug
Reporter Root
Modified 2014-05-19T00:00:00

Description

简要描述:

74cms 逻辑漏洞导致sql注入

详细说明:

include/fun_personal.php(381-398)

``` $j=get_resume_basic($uid,$pid); $searchtab['sex']=$j['sex']; $searchtab['nature']=$j['nature']; $searchtab['marriage']=$j['marriage']; $searchtab['experience']=$j['experience']; $searchtab['district']=$j['district']; $searchtab['sdistrict']=$j['sdistrict']; $searchtab['wage']=$j['wage']; $searchtab['education']=$j['education']; $searchtab['photo']=$j['photo']; $searchtab['refreshtime']=$j['refreshtime']; $searchtab['talent']=$j['talent']; updatetable(table('resume_search_rtime'),$searchtab,"uid='{$uid}' AND id='{$pid}'"); $searchtab['key']=$j['key'];

    $searchtab['likekey']=$j['intention_jobs'].','.$j['recentjobs'].','.$j['specialty'].','.$j['fullname'];

    updatetable(table('resume_search_key'),$searchtab,"uid='{$uid}' AND id='{$pid}'");

```

当第一次提交的时候,参数做了过滤,然是系统存入数据库时候,又被还原回来了,所以$j=get_resume_basic($uid,$pid);所取出来的数据,是一个干净的没有被转义过的数据, 让数据流向$searchtab['likekey']=$j['intention_jobs'].','.$j['recentjobs'].','.$j['specialty'].','.$j['fullname']; 并且执行updatetable(table('resume_search_key'),$searchtab,"uid='{$uid}' AND id='{$pid}'"); 时候,漏洞产生了。 自己填写一份简历,然后修改求职意向那一栏,如图所示

<img src="https://images.seebug.org/upload/201405/151858360dfbe02a53304425a9bf060cb8814e81.png" alt="5.png" width="600" onerror="javascript:errimg(this);">

当我们点击提交后,sql完整执行,通过这里可以看出来,这是一个完全可控制的sql注入,所以你可以拿到你任何数据,危害比较大

漏洞证明: