虽然说故障页面还是有部分和WooYun-2014-56963相同,但是那个仅仅是提取普通会员权限,最后经过反编译,然后白盒审计,发现多处可以盲注,直接加入管理员 页面1: http://demo.zoomla.cn/user/AppBack.aspx?type=QQ&openID= 依然是这个页面逻辑判断有问题。 页面2: http://demo.zoomla.cn/user/UpdateMailChk.aspx?username=1&mail=1 页面1: ![]() ![]() ![]() ![]() string str = this.Username.Text.Trim(); this.info.UserName = str; int num = this.buser.InsertUser(this.info, muinfo);
好的,我们继续进入InsertUser这个函数看 public int InsertUser(M_UserInfo userInfo, M_Uinfo muinfo) { string commandText = " insert into ZL_User(UserName,UserPwd,email,Question,answer,GroupID) values('" + userInfo.UserName + "','" + userInfo.UserPwd + "','','','',1);select @@IDENTITY"; int num = SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, commandText)); string str2 = ""; if (muinfo.UserSex) { str2 = "1"; } else { str2 = "0"; } SqlHelper.ExecuteSql(string.Concat(new object[] { "insert into ZL_UserBase(birthday,userid,usersex)values('", muinfo.BirthDay, "',", num, ",", str2, ")" })); return num; }
看到这个commandText 大家都懂了。 漏洞2: if (!string.IsNullOrEmpty(base.Request["mail"]) && !string.IsNullOrEmpty(base.Request.QueryString["UserName"])) { if (this.buser.GetLogin().UserName == base.Request.QueryString["UserName"]) { this.buser.UpByWhere("ZL_User", "Email='" + base.Request["mail"] + "'", "UserName='" + base.Request.QueryString["UserName"] + "'");
mail参数用户可控,同时结合 UpByWhere函数: public bool UpByWhere(string tableName, string set, string where) { return ((((tableName.Length > 0) && (set.Length > 0)) && (where.Length > 0)) && SqlHelper.ExecuteSql("UPDATE " + tableName + " SET " + set + " WHERE " + where)); }
又可以构造出一个盲注点 敢不敢用参数化查询。全部都是拼接的,根本不安全。 |
-
上一篇: 融资城多个漏洞导致敏感信息泄露 - 网站安全
下一篇: pageadmin SQL注入漏洞及修复 - 网站安全 - 自学php
还没有人抢沙发呢~