国产亚洲欧美人成在线,免费视频爱爱太爽了无码,日本免费一区二区三区高清视频 ,国产真实伦对白精彩视频

歡迎您光臨深圳塔燈網(wǎng)絡(luò)科技有限公司!
電話圖標(biāo) 余先生:13699882642

織夢(mèng)member/reg_new.php SQL注入漏洞修復(fù)

發(fā)表日期:2018-08 文章編輯:小燈 瀏覽次數(shù):1781

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)行有效過(guò)濾就帶入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)行有效過(guò)濾 */$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))

{

..

黃色部分是添加的代碼



本頁(yè)內(nèi)容由塔燈網(wǎng)絡(luò)科技有限公司通過(guò)網(wǎng)絡(luò)收集編輯所得,所有資料僅供用戶參考了本站不擁有所有權(quán),如您認(rèn)為本網(wǎng)頁(yè)中由涉嫌抄襲的內(nèi)容,請(qǐng)及時(shí)與我們聯(lián)系,并提供相關(guān)證據(jù),工作人員會(huì)在5工作日內(nèi)聯(lián)系您,一經(jīng)查實(shí),本站立刻刪除侵權(quán)內(nèi)容。本文鏈接:http://m.jstctz.cn/6337.html
相關(guān)cms文章
 八年  行業(yè)經(jīng)驗(yàn)

多一份參考,總有益處

聯(lián)系深圳網(wǎng)站公司塔燈網(wǎng)絡(luò),免費(fèi)獲得網(wǎng)站建設(shè)方案及報(bào)價(jià)

咨詢相關(guān)問(wèn)題或預(yù)約面談,可以通過(guò)以下方式與我們聯(lián)系

業(yè)務(wù)熱線:余經(jīng)理:13699882642

Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.