Discuz!NT 3.0 SQL注入漏洞
发表下本人进行漏洞挖掘的首篇原创文章:
对Discuz nT3.0进行了分析,发现spacemanage.aspx页面存在一个注入漏洞,
该页面位置:dnt3_src\dnt3\Discuz.Web\space\Admin
代码如下:
public void BindData()
{
DataGrid1.AllowCustomPaging = true;
string username = Username.Text;
//string dateStart = joindateStart.SelectedDate.ToString().IndexOf("1900") >= 0 ? "" : joindateStart.SelectedDate.ToString();
//string dateEnd = joindateEnd.SelectedDate.AddDays(1).ToString().IndexOf("1900") >= 0 ? "" : joindateEnd.SelectedDate.AddDays(1).ToString();
string dateStart = joindateStart.SelectedDate.ToString();
string dateEnd = joindateEnd.SelectedDate.AddDays(1).ToString().IndexOf("1900") >= 0 ? DateTime.Now.AddDays(1).ToString() : joindateEnd.SelectedDate.AddDays(1).ToString();
DataGrid1.VirtualItemCount = DbProvider.GetInstance().GetSpaceRecordCount(username, dateStart, dateEnd);
DataGrid1.DataSource = buildGridData(username,dateStart,dateEnd);
DataGrid1.DataBind();
}
对USERNAME 进行跟踪,发现未对该参数进行任何过滤。存在SQL注入漏洞。
本人未对该漏洞进行测试,如果有人测试完证明确实存在请及时联系官方。
另外,转贴请注明出处。
相关文档:
SQL2000的数据类型及长度
==============================
bigint 8
binary 8000
bit 1
char 8000
datetime 8
decimal 17
float 8
image 16
int 4
money 8
nchar 8000
ntext 16
numeric 17
nvarchar 8000
real 4
smalldatetime 4
smallint 2
smallmoney 4
sql_variant 8016
sysname 256
text 16
tim ......
现在很多网站都提供了站内的搜索功能,有的很简单在SQL语句里加一个条件如:where names like ‘%words%’就可以实现最基本的搜索了。
我们来看看功能强大一点,复杂一点的搜索是如何实现的(在SQL SERVER200/2005通过存储过程实现搜索算法)。
我们 ......
I'm continually trying to track down what service packs are installed on various SQL Servers I support. I can never find the right support page on Microsoft's site. So here's an article with all the SQL Server version information I can track down. If you know of any older versions or can help me fil ......
SQL Server 系统全局变量
@@CONNECTIONS
返回自上次启动以来连接或试图连接的次数。
@@CURSOR_ROWS
返回连接上最后打开的游标中当前存在的合格行的数量(返回被打开的游标中还未被读取的有效数据行的行数)
@@DATEFIRST
返回每周第一天的数字
@@ERROR
返回最后执行的SQL 语句的错误代码。
@@FETCH_STATUS
返 ......
32
位的操作系统只能用
4G
的内存(不确定这句话是否正确),因为
2
的
32
次方是
4G
。默认的情况下,操作系统给自己留了
2G
,剩下的
2G
给应用程序。所以,每个应用程序所能使用的内存,最大不超过
2G
。据说可以改
WINDOWS
的
BOOT.INI
,强制操作系统只使用
1G
,即使这样,应用程序也至多是
......