来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 逐浪CMS某处编码SQL注入漏洞地址http: demo zoomla cn 3d InsertContext aspxprotected void Page_Load(object sender, EventArgs e){ if (base Request QueryString[type] != null) {...
逐浪CMS某处编码SQL注入漏洞 地址
protected void Page_Load(object sender, EventArgs e) { if (base.Request.QueryString["type"] != null) { this.md.Caddtime = DateTime.Now; this.md.Cadduser = this.user.GetLogin().UserName; string s = base.Request.Form.ToString(); s = base.Server.UrlDecode(s); try { s = BaseClass.FromBase64String(s); //base64转换 } catch (Exception exception) { s = exception.ToString() + s; } if (s.IndexOf("$") > -1) { string[] strArray = s.Split(new char[] { '$' }, StringSplitOptions.RemoveEmptyEntries); //分割 if (base.Request.QueryString["type"].ToString() == "Suser") { DataTable table = this.bduser.Select_Where(" Dutype=1 and DuShow=" + strArray[1], " * ", ""); //数组第二部分没处理 存在注入 if (table.Rows.Count > 0) { this.md.Ctouid = DataConverter.CLng(table.Rows[0]["DUid"].ToString()); } this.dt = this.bduser.Select_Where(" Duid=" + this.md.Ctouid, " * ", ""); if ((this.dt.Rows.Count > 0) && (this.mduser.Dislogin == 0)) { this.mduser.Dmessage++; } } else { this.md.Ctouid = DataConverter.CLng(strArray[1]); this.dt = this.bduser.Select_Where(" Duid=" + this.md.Ctouid, " * ", ""); this.mduser.Dmessage++; } this.md.Ccontent = BaseClass.Htmlcode(strArray[0]); this.md.ChatType = 0; this.SetUserContext(); } else { this.dt = this.bduser.Select_Where(" Duid=" + this.user.GetLogin().UserID, " * ", ""); this.md.Ccontent = BaseClass.Htmlcode(s); this.md.ChatType = 1; this.SetUserContext(); } this.bd.GetInsert(this.md); } if (this.dt != null) { this.dt.Dispose(); } } 访问
修复方案:对参数进行处理
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com